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
Fullscreen window gets tiled after show/hide #279
Comments
I wonder if this is related to the resize issue I've brought up (but don't see offhand in the issue tracker) about floating windows getting resized by the default border width by X.O.windows, so it's no longer exactly fullscreen on subsequent mappings. |
To be more clear on this, xmonad automatically floats any window which is full screen. But if on a subsequent remapping it is not exactly fullscreen, this won't happen any more. This can sometimes be caused by xmonad, but also sometimes by applications which don't take the window border into account properly. |
How does it determines full-screenness of the window? According to xprop, the one from telegram has If the border makes a difference, does that mean that xmonad considers window as a full screen by its dimensions (so the it should be a rectangle (0, 0, resolution_x, resolution_y) or something like that)? Also, where does this border comes from? Not sure what "X.O.windows" are. I'd expect that full screen windows don't have any borders. Do I understand correctly that possible scenario is:
And, somewhere before the step 4 window size was changed? |
The built-in rule compares the pixel size of the window to the pixel size of the screen. Xmonad doesn't speak EWMH by default, so Xmonad uses the internal window border to indicate that a window is focused. It does this even for full screen windows, although there are some ways around this — but I said "default border" for a reason, those ways won't help because the window's size is computed using the default border before anything can disable it.
|
Thanks for clarifying, @geekosaur! Is there a way to check this? Like, for example, print windows size in some debug log when it appears? |
I have a number of debugging functions available including one that captures What this comes down to, however, is that we inherited maintenance of a window manager whose floating window story is an ugly hack that is quite brittle, and I'm not that surprised that it's breaking here. |
Even using hook from Window preview wobbling, while tiled, is an unrelated? issue caused by telegram desperately trying to stay in the full screen - when you try to resize it, it tries to resize that window back. |
Yep, that's exactly how I found the issue. Wobbling is telegram's weird reaction to resize/move of the window which meant to be fullscreen one. So EwmhDesktops doesn't add this fullscreen hook by itself (via its config-patching |
To prevent Telegram windows from moving themselves, one might use my https://github.com/liskin/dotfiles/blob/home/.xmonad/xmonad.hs#L290-L295
Yes, fullscreen handling isn't enabled by default. I think we might reconsider that default, but then a lot of people actually don't want fullscreen requests to be honored, so we may just stick to keeping backward compat and just making it somewhat easier to enable correct fullscreen handling. |
Just to be clear: Also there shouldn't be any concerns about backwards compatibility with |
Oh, that's a good observation! So I guess that Telegram isn't fullscreening an existing window but rather opening a new one, and then a manage hook is needed instead. Perhaps
I quite like this suggestion actually. :-) |
I have this issue with mpv, you watch something and if you press 'f' or double click the window it goes fullscreen, but it's not a 'real' fullscreen, when you get out of it everything is well (before going FS it's float and exiting the FS it's float) , I mean in config I have set mpv to be float, also I have btw man page for mpv and this option mention Xmonad, in bad way I think
|
Also tried latest git and used |
I managed to get it kinda solved by changing in What this problem needs is storing the window state and x,y,w,h before going fullscreen and then restoring that on exiting the fullscreen |
This can (theoretically) be solved by using EDIT: the magnifier portion is complete (mostly?) - now time for the floating tag and state. |
Problem Description
When using media viewer in Telegram Desktop for the first time, everything works fine. Media viewer is just a fullscreen window with, for example, a photo. For the second and following times xmonad instead of placing the media viewer window (which, again, is supposed to be a fullscreen one) above others puts it into the tiling, and that is an issue.
Unfortunately, it's not clear to me where the problems arises (in telegram itself, in Qt it uses, somewhere in X11 layer or really in xmonad, the latter means I've created this issue in the right place).
The tricky thing Telegram does is hiding/showing a media view windows instead of creating a new one from scratch every time. One may investigate how its media view overlay widget plays around
isHidden
. I'd expect this to result in calls toxcb_unmap_window
/xcb_map_window
, which is then transferred to xmonad as x11 events.. So looks like xmonad incorrectly deals with hiding/showing fullscreen windows.I'm using gentoo with xmonad-0.15.
Configuration File
This is reproducible even on my minimal xmonad config:
I see from discussion in issue #54 that fullscreen windows may require some additional configuration, but the issue here is difference between first and latter appearances of the media viewer. If configuration was the issue, the first try will not work either.
Checklist
[yes] I've read CONTRIBUTING.md
[no, just a minimal config is enough] I tested my configuration with xmonad-testing
The text was updated successfully, but these errors were encountered: