-
-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[x11] Better stacking unmanaged windows #4583
base: master
Are you sure you want to change the base?
[x11] Better stacking unmanaged windows #4583
Conversation
@@ -171,6 +171,8 @@ def __init__(self, display_name: str | None = None) -> None: | |||
|
|||
self.last_focused: base.Window | None = None | |||
|
|||
self.override_redirect_map: dict[int, window._Window] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be badly named as rofi (as an example) does not set the override redirect window.
@@ -736,6 +737,9 @@ def handle_MappingNotify(self, event): # noqa: N802 | |||
def handle_MapRequest(self, event) -> None: # noqa: N802 | |||
assert self.qtile is not None | |||
|
|||
if event.window in self.override_redirect_map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're mapping it then the window will be in windows_map so we should remove it here.
@@ -771,9 +775,17 @@ def handle_MapRequest(self, event) -> None: # noqa: N802 | |||
self.update_client_lists() | |||
win.change_layer() | |||
|
|||
def handle_CreateNotify(self, event) -> None: # noqa: N802 | |||
xwin = window.XWindow(self.conn, event.window) | |||
win = window._Window(xwin, self.qtile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the _Window
class as Window
sets various attributes etc on __init__
which results in errors for some windows.
libqtile/backend/x11/window.py
Outdated
self.qtile.windows_map[wid].window.configure( | ||
stackmode=xcffib.xproto.StackMode.Below, sibling=same[0] | ||
) | ||
win = self.qtile.windows_map.get(wid, self.qtile.core.override_redirect_map[wid]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks up the wid in windows_map and, if it's not there then it must be in the override_redirect map.
Need to check the tests too! |
libqtile/backend/x11/core.py
Outdated
@@ -47,7 +47,7 @@ | |||
from libqtile.core.manager import Qtile | |||
|
|||
_IGNORED_EVENTS = { | |||
xcffib.xproto.CreateNotifyEvent, | |||
# xcffib.xproto.CreateNotifyEvent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it instead
Tbf I don't really understand the details here still, but the code to me looks pretty clean |
This didn't work for the OP of the issue. Back to the drawing board... |
5079448
to
af4c61e
Compare
This PR is stale because it has been open 90 days with no activity. Remove the |
3ed42e6
to
37587a7
Compare
Where qtile has unmanaged windows (e.g. override redirect) then these windows were ignored for stacking purposes which meant they could appear in the wrong place. This PR adds the ability for qtile to stack these windows correctly while still not fully managing the windows. Fixes qtile#4466
37587a7
to
31623e1
Compare
This PR is stale because it has been open 90 days with no activity. Remove the |
DRAFT FOR NOW - will add some comments.
Where qtile has unmanaged windows (e.g. override redirect) then these windows were ignored for stacking purposes which meant they could appear in the wrong place.
This PR adds the ability for qtile to stack these windows correctly while still not fully managing the windows.
Fixes #4466