Skip to content

x11: log aw-none if _NET_ACTIVE_WINDOW == 0 - #30

Open
powellnorma wants to merge 1 commit into
2e3s:mainfrom
powellnorma:aw-none
Open

x11: log aw-none if _NET_ACTIVE_WINDOW == 0#30
powellnorma wants to merge 1 commit into
2e3s:mainfrom
powellnorma:aw-none

Conversation

@powellnorma

Copy link
Copy Markdown
Contributor

Based on #28

@2e3s

2e3s commented Oct 9, 2024

Copy link
Copy Markdown
Owner

Thank you, the fix makes sense, but it needs to come first. If you prefer, I can cherry-pick it a bit later without the other change, unless you do.

@powellnorma

Copy link
Copy Markdown
Contributor Author

If you prefer, I can cherry-pick it a bit later without the other change, unless you do.

IIRC they are intertwined, so probably there will be some conflicts when removing the first commit. I'd do it once I find the time and #28 is merged.

Feel free to do this earlier, if you'd like

@powellnorma

Copy link
Copy Markdown
Contributor Author

@2e3s I think it should be good now

@2e3s

2e3s commented Jul 31, 2026

Copy link
Copy Markdown
Owner

@powellnorma Yes, thank you, however, I realized that I don't understand the utility of the change. As far as I understand, now nothing is sent is no window is active. What is the use case where this is a problem and a window/app aw-none would be helpful?

This is also the behavior on other OS, like MacOS. So sending nothing seems at least consistent.

@powellnorma

Copy link
Copy Markdown
Contributor Author

Could it be that maybe before the case was not handled, and it just crashed? I am not 100% sure myself anymore.

@powellnorma

Copy link
Copy Markdown
Contributor Author

Could it be that maybe before the case was not handled, and it just crashed? I am not 100% sure myself anymore.

In that case, probably the PR could be adjusted such that it returns nothing instead of "aw-none". But it's still worth adding this logic, as to prevent crashes. Does that make sense?

@2e3s

2e3s commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Could it be that maybe before the case was not handled, and it just crashed? I am not 100% sure myself anymore.

I doubt, honestly, because it's a normal use case to close/hide all windows. Someone would notice, I assume. I would notice, I used X11 just recently.

it returns nothing instead of "aw-none"

I thought this should be the current behaviour, so that the window watcher doesn't send anything to the server (so the timeline there shows an empty space). I tried it now under KDE & Wayland and, unlike MacOS, this combination shows "plasmashell" for no opened windows 🤷

@powellnorma

Copy link
Copy Markdown
Contributor Author

Hm, but if you look at the code, previously active_window_data always returned WindowsData. What is it supposed to return if _NET_ACTIVE_WINDOW is 0?

I tried it now under KDE & Wayland

Yes maybe different window manager handle "no focussed window" differently. How does e.g. i3wm handle it?

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.

2 participants