Open wgrr opened 5 years ago
Thanks! this patch worked fine for me! would you contribute a PR?
@gdiazlo well, i could, but first i need to make it work on rio, rio just ignore NET_WM_STATE_FULLSCREEN messages, this patch breaks devdraw on rio.
Wow... It's rio which should be fixed, NET_WM_STATE_FULLSCREEN must be nearly 20 years old. It doesn't look complicated: "_NET_WM_STATE_FULLSCREEN indicates that the window should fill the entire screen and have no window decorations. Additionally the Window Manager is responsible for restoring the original geometry after a switch from fullscreen back to normal window." -- https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
Alternative: Use just-about any other window manager. There's even a rio-like compositor for Wayland; it's called wio.
I think _NET_WM_STATE_FULLSCREEN and its specification, "Extended Window Manager Hints", are just Freedesktop's preference. Thus it may be preferable to stick to the standard, ICCCM, if possible, and pretend EWMH does not exist.
To clarify, I am not really familiar with EWMH, but it is my understanding that it is somewhat geared towards the "big" "desktop environments" like Gnome, KDE, etc.; and thus I fear that relying on it too much might be harmful to users like me who use simple window managers.
Can we just do both?
That is, can we just do the XConfigureWindow call and the NET_WM_STATE_FULLSCREEN call?
@nsajko: EWMH doesn't seem very large and part of the reason for its existence is clarifying the notoriously difficult and obscure ICCCM. I'm no fan of freedesktop.org, but I think they did good with EWMH; I recall things started working better with its introduction.
@rsc: I can hardly find anything on it; even more so than usual for my searches. Is it possible to test if the window manager supports _NET_WM_STATE_FULLSCREEN? If yes, then we have a way to fall back to XConfigureWindow.
dwm's source came up, which might be helpful if fixing rio. I used to follow its development, they had quite a discussion on getting fullscreen working properly.
if devdraw was supposed to be used under rio in X11 systems, ignore this issue.
most of windows managers wont let client draw over the window decorations, so you cannot fullscreen on these, some like rio will. for me, i did what this freedesktop spec suggests, sent an event atom "_NET_WM_STATE_FULLSCREEN" and it works as expected.