Skip to content
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

Fix showing notifications in Wayland apps when running XWayland #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kira-bruneau
Copy link

@kira-bruneau kira-bruneau commented Apr 27, 2021

XWayland will return 0x0 (the root window id) when a Wayland window is focused, so if you switch to another Wayland window, the notification will not be displayed. To workaround this, I just replaced nowindowid with 0x0 as a marker for no window being focused.

NOTE: This change doesn't implement window checking for Wayland, so notifications from a focused Wayland window will be displayed.

I also added an exit code check to only use the window id from xprop if it succeeds. This isn't essential to support Wayland + XWayland, but it should act as a safe guard if the X connection fails.

XWayland will return 0x0 (the root window id) when a Wayland window is
focused, so if you switch to another Wayland window, the notification
will not be displayed. To workaround this, I just replaced
`nowindowid` with `0x0` as a marker for no window being focused.

NOTE: This change doesn't implement window checking for Wayland, so
notifications from a focused Wayland window will be displayed.

I also added an exit code check to only use the window id from xprop
if it succeeds. This isn't essential to support Wayland + XWayland,
but it should act as a safe guard if the X connection fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant