-
Notifications
You must be signed in to change notification settings - Fork 79
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
Overlapping windows when positioning vertically on Ubuntu 20.04 #117
Comments
I think it's a GNOME Shell bug. You're not the first person to report this problem with QuickTile receiving no strut reservations. To remedy it, I might have no other option than to prioritize the config file rewrite that allows hierarchical data and then add an option that allows manually specifying rectangles to be injected into the list of harvested strut data before doing usable region calculations. If you want to double-check that a strut-harvesting bug didn't creep into QuickTile, there are two other ways I can suggest to query struts:
|
Thank you for your response! Manually adding the dock's dimensions sounds like a solution you wouldn't really want to be forced to support, but if you find the time to implement something like this, I'll be happy to test it. I double-checked the struts with both of your suggested methods and neither of them gave me a result, so I guess it is indeed a bug outside of QuickTile. Aren't these kinds of things standardized in some way to ensure you've got something to rely on when doing window management and calculations? I hope to find the time to check an older version of Ubuntu, as I have just started using QuickTile and am unsure if the problem is occurring there as well. |
That is the standard.
As far as I can guess, since GNOME Shell is both compositor and desktop panel provider, and their primary target is Wayland now, they just stopped caring about complying with X11 standards that have no Wayland equivalent because, by design, tools like QuickTile (ie. applications which manipulate other applications' windows) are impossible on Wayland for security reasons.
Point. Maybe I should just add a FAQ entry instructing people to query the geometry of their panel using something like |
That would be a big help for people like me who've never looked into these things in depth. Experimenting with Another thing I don't quite understand is why it works correctly and respects the dock's height when using left, center or right positioning. The windows in those situations do not get cut off at the bottom where the dock is placed. I might as well be changing over to another Ubuntu flavor as I am not really bound to GNOME by any means and just set up the systems a few days ago. I just reproduced the issue with Ubuntu 18.04.4, so I guess the behavior is not going to change anywhere in the near future. |
It's probably using
Hmm. What do you get if you run
QuickTile can't force window positioning... just request it. The window manager then modifies the requested geometry to apply rules like "only a human, moving a window directly, may position it partly off-screen". Normally, the window manager will prefer to move the requested rectangle to be entirely within the usable region of the desktop without altering its size, resulting in overlap. However, for a full-height preset, the window manager will usually be programmed to assume that allowing the window to extend off screen is the greater of two evils and shrink the window once it finds that merely moving it can't satisfy the rules. Thus, QuickTile spends an inordinate amount of code on anticipating how the WM will modify the geometry it requests, so it can pre-emptively compensate. |
Thank you for the detailed explanation! I am slowly starting to understand how the different layers work together.
The dock is 68px high, the status bar has 27px height, so I tried to set I confirmed that the value was correctly added to the window by running
|
I can't double-check that right now (I had one of my sites break late last night and need to prioritize figuring out how to fix it) but, If
Is that line all you got? I'd expected something like this output from my Plasma panel:
It occurs to me that, if GNOME Shell isn't setting struts, it's probably also not making proper use of the mechanism QuickTile uses to get a list of top-level windows: The WM putting a list of top-level windows into the Now, to be fair, that is a |
Unfortunately that's all there is when running
with the first line being the one I added manually. It was missing before that. Examining the bare desktop with |
Well, I can't do anything today or tomorrow but, once I've cleared out the more pressing concerns, maybe I'll try spinning up an Ubuntu 20.04 VM to see if I can find a solution better than "allow the user to manually specify the struts". |
No hurry, I'll still be here in a few days 😉 Looking forward to your findings! |
Sorry for the delay. I've got the VM set up and it looks like GNOME might have decided to provide their own non-standard solution. What does this command say on your system? xprop -root | grep _GTK_WORKAREAS_ I need to see what it reports on a system not as artificial as my VM, but my intuition is that the following might work, since it appears that, unlike
|
Thank you for the investigation. I've tried some other desktop environments in the meantime and am keeping Budgie for now. The problem does not occur there, so you might as well just close this issue. But in the interest of anyone running into this issue in the future, I've set up a Raspberry Pi running Ubuntu 20.04 with a 1400x900 resolution. That's as close as I can get to a real setup without wiping my system again. Here is the output I am getting:
Hope this helps! |
Are you sure it's 1400x900 and not 1440x900? Assuming I've got my math right, that data looks like it's indicating a 1440x900 monitor with 27px of panel on top and 68px of panel on the bottom. |
Of course you're right. Sorry about that! |
Same issue exists on Ubuntu 18.04 by the way. After manually setting _NET_WM_STRUT_PARTIAL with the space used by the top bar (tray?) and dock, quicktile aligns the windows without overlap. |
*nod* Does it also have (I suppose, worst case, I could go with the option where the constraints are specified manually, but have an option which tries to discover un-announced panels by creating a bunch of windows in the cardinal and ordinal positions and seeing where they get shoved to, then saving the results to the config file.) |
No _GTK_WORKAREAS_* here. I stole the offsets from _NET_WORKAREA. |
Ugh. That makes three situations I need to find time to address. (Obeying |
I don't envy you... If I can help out by providing some more data/stats, let me know. In the meantime very happy with Quicktile making me the master of my new widescreen monitor. |
*chuckle* If I can clear out some tools I need a Minimum Viable Product on more urgently, you might see some new tools being thrown in soon. I'm on Kubuntu 16.04 LTS, which has a problem with KWin starting to ignore drag-based window move/resize after 50 days of uptime and I'm stubborn enough about having to get my desktop back the way I want it after a needless reboot that QuickTile is currently my only means of moving and resizing windows. |
Hi, thanks for this great app!. I've been working on a hotfix for this based on the comments of this issue. It is definitely not perfect but works at least for my use case. |
Sorry for the delayed response. I'm currently working to migrate my system to some new hard drives (multiple terabytes take time to copy) and do a "clean upgrade" from Kubuntu 16.04 LTS to 20.04 LTS (I let my Ansible deployment scripts atrophy and need to fix them up) but I'll see if I can find time to work on QuickTile in the not too distant future. Having a starting point to poke at will definitely help things though, to be honest, half the delay was that I don't run GNOME and have been too busy to shuffle files around to make room and then set up a GNOME VM for testing. (Something the new hard drives will help with.) |
Got hit by this issue. Were you able to test it with GNOME? It's been a while since the last message, but trying my lack anyway :) |
Life sorta fell apart and I'm working on pulling things back together. No promises, but I'll leave this tab open and try to get to it whenever I can justify interrupting things to diagnose why my "only un-pin the nVidia driver version for updates during restarts" helper failed, end my X session, and reboot to bring the kernel module and libGL versions back into sync and get accelerated graphics back. Could be a while though. Psychologically, I'd rather go several weeks without the ability to launch anything that requires OpenGL than have to reopen and reposition all the stuff I leave open on my desktop when I go to bed. That's why I have a UPS and, at one point, wrote my own minimal update notifier to kill off the "reboot to update your kernel" nags. (Yeah, in theory X Session Management Protocol should enable KDE to do that automatically but, in practice, few of the applications I use implement it and those that do tend to implement it brokenly.) |
GNOME is enough of a pain to virtualize that I've only tested under the 22.04 I installed to reproduce another bug, not the 20.04 mentioned here, but this appears to have been fixed by the new code to use |
At first I want to thank you for this great tool! Using both OS X and Ubuntu I was looking for a solution that was similar to what Rectangle does on Mac and found it with quicktile.
I recently upgraded to Ubuntu 20.04 and am facing an issue where vertically positioned windows would overlap (e.g. two windows with 50% height, one at the top and the other at the bottom) when using the dock at the bottom. This is also true for a left-positioned dock and horizontal side-by-side windows.
In another issue you mention the dock not being respected properly when quicktile starts before the dock has occupied its space, so I tried to investigate in that direction.
This is the debug output from the scenario mentioned above:
Surprisingly (or maybe not?) I am not getting any
DEBUG: Gathered _NET_WM_STRUT_PARTIAL
whatsoever. So my guess would be that no struts result in quicktile handling the whole resolution as a basis for its calculations. Is there a way to dig deeper into this and see if Ubuntu actually sets these things correctly? I don't have any experience with window management, but I'll be glad to provide further information if needed.As a sidenote: I was also able to reproduce this issue on my 1080p-notebook in case that's helpful for debugging.
The text was updated successfully, but these errors were encountered: