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

Show Menu when application is in full screen and mouse is moved to the top #164

Open
louies0623 opened this issue Sep 8, 2023 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@louies0623
Copy link

When the application is in full screen, the top menu is not displayed when the mouse is moved to the top.

@probonopd probonopd changed the title When the application is in full screen, the top menu is not displayed when the mouse is moved to the top. Show Menu when application is in full screen and mouse is moved to the top Sep 10, 2023
@probonopd probonopd added the enhancement New feature or request label Sep 10, 2023
@probonopd
Copy link
Member

Good idea. But I currently have no clue how to implement this.

@probonopd
Copy link
Member

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.

@probonopd
Copy link
Member

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."

@probonopd
Copy link
Member

probonopd commented Sep 10, 2023

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.

@probonopd
Copy link
Member

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.

@probonopd probonopd added the help wanted Extra attention is needed label Sep 10, 2023
@probonopd
Copy link
Member

probonopd commented Oct 1, 2023

Interestingly, ksnip and the Menu seach box manage to be above even fullscreen. How?
Does it have to do with WM_TAKE_FOCUS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants