Disabling swallow, I need to find better way.

This commit is contained in:
Bartek Stalewski 2022-07-31 19:07:38 +02:00
parent 7c253b549c
commit 99e8ee4eb7

View File

@ -170,25 +170,25 @@ floating_layout = layout.Floating(
border_width=2,
)
@hook.subscribe.client_new
def _swallow(window):
pid = window.window.get_net_wm_pid()
ppid = psutil.Process(pid).ppid()
cpids = {c.window.get_net_wm_pid(): wid for wid, c in window.qtile.windows_map.items()}
for i in range(5):
if not ppid:
return
if ppid in cpids:
parent = window.qtile.windows_map.get(cpids[ppid])
parent.minimized = True
window.parent = parent
return
ppid = psutil.Process(ppid).ppid()
# @hook.subscribe.client_new
# def _swallow(window):
# pid = window.window.get_net_wm_pid()
# ppid = psutil.Process(pid).ppid()
# cpids = {c.window.get_net_wm_pid(): wid for wid, c in window.qtile.windows_map.items()}
# for i in range(5):
# if not ppid:
# return
# if ppid in cpids:
# parent = window.qtile.windows_map.get(cpids[ppid])
# parent.minimized = True
# window.parent = parent
# return
# ppid = psutil.Process(ppid).ppid()
@hook.subscribe.client_killed
def _unswallow(window):
if hasattr(window, 'parent'):
window.parent.minimized = False
# @hook.subscribe.client_killed
# def _unswallow(window):
# if hasattr(window, 'parent'):
# window.parent.minimized = False
auto_fullscreen = True
auto_minimize = True