XLib: How do I return to windowed mode when I make it fullscreen?

I managed to run the application in full screen mode, but I can not get it to return to windowed mode with visible borders . . I tried calling XDeleteProperty to clear the settings for full screen viewing, but it does not work.

+4
source share
1 answer

If you use _NET_WM_STATE http://standards.freedesktop.org/wm-spec/latest/ar01s05.html#id2569140 , then you set the property before matching the window, but after matching the window, you must send a client message and the window manager will update the property. Read the part of EWMH that launches "To change the state of the displayed window, the client MUST send the _NET_WM_STATE client message to the root window ..."

This is due to the fact that as soon as you type a window, the window manager is responsible for maintaining its state, there will be a race if both the application and WM can directly change the property.

See the source code for toolkits such as GTK +, for example, code.

+2
source

Source: https://habr.com/ru/post/1392297/


All Articles