Menu
Menu copied to clipboard
Show Menu when application is in full screen and mouse is moved to the top
When the application is in full screen, the top menu is not displayed when the mouse is moved to the top.
Good idea. But I currently have no clue how to implement this.
Menu currently has set:
% xprop | grep ATOM
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _KDE_NET_WM_STATE_SKIP_SWITCHER
XdndAware(ATOM) = BITMAP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
A full screen browser window has:
% sleep 5 && xprop | grep ATOM
XdndTypeList(ATOM) = STRING, TEXT, UTF8_STRING, _NETSCAPE_URL, text/x-moz-url, text/plain, chromium/x-renderer-taint, text/html
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_FOCUSED
XdndAware(ATOM) = BITMAP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST
So the first step would be to find a way to make the Menu appear on top of the full screen application (z-stacking order). Then, we would need to check whether any application is full-screen, and set the menu to transparent unless the mouse touches the top area of the screen on which the Menu is.
It seems that the _NET_WM_STATE_FULLSCREEN hint takes precedence over _NET_WM_STATE_ABOVE. Full-screen windows are handled differently by the window manager (KWin), and they seem to cover all other windows, including those set as "above."
Strangely, even when we also set _NET_WM_STATE_FULLSCREEN (_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _KDE_NET_WM_STATE_SKIP_SWITCHER), it still is not above a full-screen browser window.
Adding the following to ~/.config/kwinrc also doesn't change this:
[Windows]
WindowClassName=Menu
State=Above
So if anyone has any idea, please let me know.
Interestingly, ksnip and the Menu seach box manage to be above even fullscreen. How?
Does it have to do with WM_TAKE_FOCUS?