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

QuickTile fails pathologically when encountering panel reservations on edges between monitors #45

Closed
avaly opened this issue Oct 18, 2014 · 30 comments

Comments

@avaly
Copy link
Contributor

avaly commented Oct 18, 2014

Was: Windows get resized to (0,0,0,0) on a clean install of Ubuntu 14.04.1

On a fresh install of Ubuntu 14.04.1 I get the following results when running quicktile on the latest master branch (commit 7571ac6).

$ ./quicktile.py -d --debug
<class 'Xlib.protocol.request.QueryExtension'>
DEBUG: window: <wnck.Window object at 0x7ff418e7d5f0 (WnckWindow at 0x1955e00)>
DEBUG: Monitor: 0, gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: dims [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Result overlaps panel. Falling back to usableRect.
DEBUG: result (0, 0, 0, 0)
DEBUG: Monitor: 0, gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: repositioning to (0, 0, 0, 0)

Earlier today, before performing the fresh install of Ubuntu 14.04.1, I was running Ubuntu 14.04.1 which was upgraded from a fresh install of Ubuntu 13.04. On that installation I was running a quicktile fork based on an old commit (7a5bf6f). Everything worked fine.

However, on the fresh install of 14.04.1, when running the old commit 7a5bf6f, I get the following debug output:

$ ./quicktile.py -d --debug
<class 'Xlib.protocol.request.QueryExtension'>
DEBUG: NET_WM_WINDOW_TYPE: ('ATOM', 32, ['_NET_WM_WINDOW_TYPE_NORMAL'])
DEBUG: win <gtk.gdk.Window object at 0x7f2b10078280 (GdkWindow at 0x27d1480)>
DEBUG: useArea []
DEBUG: useRect gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: winGeom (49, 24, 200, 228)
DEBUG: monitorID 0
DEBUG: dims [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Result overlaps panel. Falling back to usableRect.
DEBUG: result (0, 0, 0, 0)

Could it be that quicktile depeneds on some library that was available in Ubuntu 13.04, but is not present in 14.04?

Any suggestions to track down the issue and find a workaround would be appreciated!

@avaly
Copy link
Contributor Author

avaly commented Oct 18, 2014

This might be related to #44, but I couldn't tell for sure.

@ssokolow
Copy link
Owner

If QuickTile were missing a dependency, you wouldn't get that far. It'd just exit with an error about missing dependencies. The fact that you're getting that debug output means that your problem has to do with how it's interacting with the desktop.

Could you clarify what you mean by "broken window cycling"? Also, try the test I just posted in issue #44 and let me know what result you get.

Between those two commits, most of QuickTile's guts were ripped out and outsourced to libwnck to fix certain hard-to-solve bugs. If, by "broken window cycling", you mean that it stops at the 1/2-wide preset and doesn't let you progress to 1/3 and 2/3, then you may be tripping over one of the last major bodges still to be redesigned. (The other being the hard-coded tiling sequences, which require a new config file syntax to be resolved, as explained in #13.)

(Currently, QuickTile doesn't actually keep any state. When you ask it to tile a window, it just requests the active window's geometry and guesses its place in the cycle from that... and WMs don't always give it exactly the dimensions it asked for last time you hit the keybind. That old code is the cause of issues #20, #24, and #30 and the hold-up for implementing #10.)

@avaly
Copy link
Contributor Author

avaly commented Oct 19, 2014

Sorry for not being clear in the initial report. I got the debug output just because I started QuickTile with the debug flag in order to see why it's behaving like it does. What I am seeing is exactly what the debug messages say: it is trying and does actually resize the window I am trying to tile to the dimension (0, 0, 0, 0), meaning some windows will get resized to a line of 1px by 10-20px while other windows have a minimum size. I will try to run the commands you posted on #44 and will also post a screen capture of the issue in action. Thanks!

@avaly
Copy link
Contributor Author

avaly commented Oct 19, 2014

Here's a short recording of the issue I am seeing: https://dl.dropboxusercontent.com/u/1326394/quicktile-1.webm

You can see the debug output below when I press <Ctrl>+<Mod4>+7 (since I changed my modifier keys to <Ctrl><Mod4> - it behaves the same if I switch to <Ctrl><Alt>) on a Files window (I guess that window has a minimum size) and a Terminator window (which does not have a minimum size).

I tried running the command from #44, but I get the same result as in the video.

@avaly avaly changed the title Broken window cycling on a clean install of Ubuntu 14.04.1 Windows get resized to (0,0,0,0) on a clean install of Ubuntu 14.04.1 Oct 19, 2014
@avaly
Copy link
Contributor Author

avaly commented Oct 19, 2014

I thought maybe something got screwed on the installation of Ubuntu, so I decided to try to re-install it again. These were my first commands after a clean install:

avaly@avaly-desktop:~/quicktile$ history 
    1  sudo apt-get install git
    2  git clone https://github.com/ssokolow/quicktile.git 
    3  cd quicktile/
    4  sudo apt-get install python-wnck python-xlib python-dbus
    5  ./quicktile.py 
    6  nano ~/.config/quicktile.cfg 
    7  ./quicktile.py -d --debug

The debug output and the visual behaviour is exactly the same as the ones posted in the earlier messages. I can't figure out why it is behaving like this.

@avaly
Copy link
Contributor Author

avaly commented Oct 19, 2014

It seems I only get this behaviour when the window I am trying to move is on my main monitor. I have two monitors connected to my computer. If I move the window using <Ctrl>+<Mod4>+<Enter> to the second monitor, it then gets properly resized to whatever grid I choose to use next. As soon as I move it back to the first monitor, I get the behaviour described above.

@ssokolow
Copy link
Owner

That shows what a mess my --debug output is. I didn't recognize that it was trying to resize to (0, 0, 0 ,0).

However, the "works on one monitor but not the other" is a very important clue.

Later today, I'll try to renovate the --debug output to be more useful and then we can track it down.

@ssokolow
Copy link
Owner

Alright. Here's how the --debug output should look now. Retry it with the newest revision and let me know what you get.

DEBUG: Received keybind: <Primary><Alt>KP_Home
DEBUG: Executing command 'top-left' with arguments (), {}
DEBUG: Operating on window 0x4a00003 with title "(Untitled)" and geometry (1920, 0, 640, 501)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1280, 0, 1280, 1024)
DEBUG: Selected preset sequence resolves to these absolute pixel dimensions:
        [[0, 0, 640, 501], [0, 0, 426, 501], [0, 0, 853, 501]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 640, 501) relative to monitor gtk.gdk.Rectangle(1280, 0, 1280, 1002)
DEBUG: Calling reposition() with default gravity and dimensions (1280, 0, 640, 501)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1280, 0, 1280, 1024)
DEBUG:  Repositioning to (1280, 0, 640, 501)

@avaly
Copy link
Contributor Author

avaly commented Oct 20, 2014

Here is what I get now with the latest master. Same behaviour as before.

$ ./quicktile.py -d --debug
<class 'Xlib.protocol.request.QueryExtension'>
DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Home
DEBUG: Executing command 'top-left' with arguments (), {}
DEBUG: Operating on window 0x3200192 with title "Home" and geometry (973, 24, 947, 1176)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Selected preset sequence resolves to these absolute pixel dimensions:
    [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 0, 0) relative to monitor gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Result exceeds usable (non-rectangular) region of desktop. (overlapped a non-fullwidth panel?) Reducing to within largest usable rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Calling reposition() with default gravity and dimensions (0, 0, 0, 0)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Repositioning to (0, 0, 0, 0)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Enter
DEBUG: Executing command 'monitor-switch' with arguments (), {}
DEBUG: Operating on window 0x3200192 with title "Home" and geometry (59, 34, 200, 228)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Moving window to monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Repositioning to (1979, 34, 200, 228)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Home
DEBUG: Executing command 'top-left' with arguments (), {}
DEBUG: Operating on window 0x3200192 with title "Home" and geometry (1979, 34, 200, 228)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG: Selected preset sequence resolves to these absolute pixel dimensions:
    [[0, 0, 935, 588], [0, 0, 623, 588], [0, 0, 1247, 588]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 935, 588) relative to monitor gtk.gdk.Rectangle(1969, 24, 1871, 1176)
DEBUG: Calling reposition() with default gravity and dimensions (1969, 24, 935, 588)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG:  Repositioning to (1969, 24, 935, 588)

@ssokolow
Copy link
Owner

Interesting. I'll need to add some more --debug lines and ask you to re-run it, but it looks like, somewhere between the first two of these lines, the detected monitor geometry is getting reset to (0, 0, 0, 0) but only for one of your monitors.

DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Selected preset sequence resolves to these absolute pixel dimensions:
    [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 0, 0) relative to monitor gtk.gdk.Rectangle(0, 0, 0, 0)

On the plus side, your monitors are the same size, just as mine are, so that's one less thing I'd have to replicate if I tried to reproduce the problem locally.

@avaly
Copy link
Contributor Author

avaly commented Oct 20, 2014

Sure, I'll be happy to run any version you have to help track down this issue. You can create a debug branch on your repo and I'll use that.

@ssokolow
Copy link
Owner

I'll probably just do it in the main branch. The original choice of what to --debug wasn't actually mine. It arrived via a contribution from someone else and I'm only now bringing it up to my standards for clarity and utility.

@ssokolow
Copy link
Owner

Ok, I suspect the problem is in the complex and somewhat under-tested WindowManager.get_workarea method so that's where I'm starting.

  • It's responsible for reinventing part of your window manager because the window manager only exposes its "usable region" calculations via _NET_WORKAREA which can't communicate non-rectangular shapes.
  • Doing so involves asking every window on the desktop whether it wants to reserve "I'm a panel. Don't overlap me" space, parsing the raw X11 properties, and then calculating the (potentially non-rectangular) region of the desktop that remains. (Plenty of room for mistakes)
  • I have neither asymmetric monitors nor panels less than 100% width, so the fancy bits don't get dogfooded.

The newest code should now produce something like this:

DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1280, 0, 1280, 1024)
DEBUG: Desktop reports usable region of monitor as:
        Region: [gtk.gdk.Rectangle(1280, 0, 1280, 1002)]
        Rectangle: gtk.gdk.Rectangle(1280, 0, 1280, 1002)
DEBUG: Selected preset sequence:
        ((0.0, 0.0, 0.5, 0.5), (0.0, 0.0, 0.3333333333333333, 0.5), (0.0, 0.0, 0.6666666666666666, 0.5))
DEBUG: Selected preset sequence resolves to these monitor-relative pixel dimensions:
        [[0, 0, 640, 501], [0, 0, 426, 501], [0, 0, 853, 501]]

I want to try to avoid adding debug output I'm just going to remove later, so I'm going to add new debugging statements bit-by-bit in response to what the previous steps say on your machine.

@ssokolow ssokolow self-assigned this Oct 20, 2014
@ssokolow ssokolow added the bug label Oct 20, 2014
@avaly
Copy link
Contributor Author

avaly commented Oct 21, 2014

$ ./quicktile.py -d --debug
<class 'Xlib.protocol.request.QueryExtension'>
DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Page_Up
DEBUG: Executing command 'top-right' with arguments (), {}
DEBUG: Operating on window 0x3000190 with title "Home" and geometry (1191, 24, 729, 843)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Desktop reports usable region of monitor as:
    Region: []
    Rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Selected preset sequence:
    ((0.5, 0.0, 0.5, 0.5), (0.6666666666666667, 0.0, 0.3333333333333333, 0.5), (0.33333333333333337, 0.0, 0.6666666666666666, 0.5))
DEBUG: Selected preset sequence resolves to these monitor-relative pixel dimensions:
    [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 0, 0) relative to monitor gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Result exceeds usable (non-rectangular) region of desktop. (overlapped a non-fullwidth panel?) Reducing to within largest usable rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Calling reposition() with default gravity and dimensions (0, 0, 0, 0)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Repositioning to (0, 0, 0, 0)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Enter
DEBUG: Executing command 'monitor-switch' with arguments (), {}
DEBUG: Operating on window 0x3000190 with title "Home" and geometry (59, 34, 200, 228)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Desktop reports usable region of monitor as:
    Region: []
    Rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Moving window to monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Repositioning to (1979, 34, 200, 228)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Page_Up
DEBUG: Executing command 'top-right' with arguments (), {}
DEBUG: Operating on window 0x3000190 with title "Home" and geometry (1979, 34, 200, 228)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG: Desktop reports usable region of monitor as:
    Region: [gtk.gdk.Rectangle(1969, 24, 1871, 1176)]
    Rectangle: gtk.gdk.Rectangle(1969, 24, 1871, 1176)
DEBUG: Selected preset sequence:
    ((0.5, 0.0, 0.5, 0.5), (0.6666666666666667, 0.0, 0.3333333333333333, 0.5), (0.33333333333333337, 0.0, 0.6666666666666666, 0.5))
DEBUG: Selected preset sequence resolves to these monitor-relative pixel dimensions:
    [[935, 0, 935, 588], [1247, 0, 623, 588], [623, 0, 1247, 588]]
DEBUG: Target preset is gtk.gdk.Rectangle(935, 0, 935, 588) relative to monitor gtk.gdk.Rectangle(1969, 24, 1871, 1176)
DEBUG: Calling reposition() with default gravity and dimensions (2904, 24, 935, 588)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG:  Repositioning to (2904, 24, 935, 588)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Enter
DEBUG: Executing command 'monitor-switch' with arguments (), {}
DEBUG: Operating on window 0x3000190 with title "Home" and geometry (2904, 34, 935, 588)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG: Desktop reports usable region of monitor as:
    Region: [gtk.gdk.Rectangle(1969, 24, 1871, 1176)]
    Rectangle: gtk.gdk.Rectangle(1969, 24, 1871, 1176)
DEBUG: Moving window to monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1920, 0, 1920, 1200)
DEBUG:  Repositioning to (984, 34, 935, 588)

DEBUG: Received keybind: <Primary><Mod2><Mod4>KP_Page_Up
DEBUG: Executing command 'top-right' with arguments (), {}
DEBUG: Operating on window 0x3000190 with title "Home" and geometry (984, 34, 935, 588)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG: Desktop reports usable region of monitor as:
    Region: []
    Rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Selected preset sequence:
    ((0.5, 0.0, 0.5, 0.5), (0.6666666666666667, 0.0, 0.3333333333333333, 0.5), (0.33333333333333337, 0.0, 0.6666666666666666, 0.5))
DEBUG: Selected preset sequence resolves to these monitor-relative pixel dimensions:
    [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
DEBUG: Target preset is gtk.gdk.Rectangle(0, 0, 0, 0) relative to monitor gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Result exceeds usable (non-rectangular) region of desktop. (overlapped a non-fullwidth panel?) Reducing to within largest usable rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Calling reposition() with default gravity and dimensions (0, 0, 0, 0)
DEBUG:  Window is on monitor 0, which has geometry gtk.gdk.Rectangle(0, 0, 1920, 1200)
DEBUG:  Repositioning to (0, 0, 0, 0)

@ssokolow
Copy link
Owner

Ugh. I was hoping it would be some kind of pathological "Oddly-shaped region degenerates into a zero-size rectangle" problem but Region: is empty.

Here's another update so I can see the raw usable region data being retrieved from X11 window properties on your desktop.

DEBUG: Gathered _NET_WM_STRUT_PARTIAL values:
        [[0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 2560]]

@avaly
Copy link
Contributor Author

avaly commented Oct 21, 2014

The debug is getting quite big, so I'll add them to this gist: https://gist.github.com/avaly/73eb8e6798e46147022e

Still same behaviour. Thanks a lot for helping with tracking down this issue!

@ssokolow
Copy link
Owner

No problem. Thank you for helping me track down a tricky bug in my program.

As for the behaviour, that's normal. I don't want to alter it until I fully understand what's causing the problem.

I'm not sure if I'll have time to inspect that _NET_WM_STRUT_PARTIAL dump tonight, but, if I don't, I'll take a look tomorrow morning.

@ssokolow
Copy link
Owner

Sorry. It's going to have to be tomorrow. Today, I didn't realize how much of the day I'd spent helping my brother in his efforts to learn to program.

@ssokolow
Copy link
Owner

Ok, I haven't tested it yet (partly because I'm running LXPanel and it's not flexible enough to let me take 30 seconds to replicate what I suspect is going on), but I think I know what's going on from those _NET_WM_STRUT_PARTIAL values.

If I'm reading _NET_WM_STRUT_PARTIAL correctly here's your panel layout:

  • [49, 0, 0, 0, 24, 1199, 0, 0, 0, 0, 0, 0] (49px wide, left edge of your left monitor)
  • [1969, 0, 0, 0, 24, 1199, 0, 0, 0, 0, 0, 0] (49px wide, left edge of your right monitor)
  • [0, 0, 24, 0, 0, 0, 0, 0, 0, 1919, 0, 0] (24px wide, top edge of your left monitor)
  • [0, 0, 24, 0, 0, 0, 0, 0, 1920, 3839, 0, 0] (24px wide, top edge of your right monitor)

Am I correct?

Either way, that second one is the problem because QuickTile is naïve. If the panel requests to reserve space extending from the left edge to the 1969px column, QuickTile interprets "from the left edge" to mean the left edge of the desktop, not the left edge of the monitor, resulting in the entire left monitor as being marked off-limits for window positioning.

Given how complex that code already is, I'll need some time to think on the best way to add this extra complexity, but I'll put it on my TODO list.

@avaly
Copy link
Contributor Author

avaly commented Oct 24, 2014

Yes, what you described seems to be correct. I have the default Ubuntu Launcher bar on the left edge of both screens which should take around 49px and the top title/indicators bar also on both screens which is around 24px.

I still can't see why quicktile (with the old git hash I referred to in the first message) used to work fine on the same hardware setup before I re-installed.

I have been able to replicate the issue even in a VirtualBox machine with the Ubuntu Live USB, without even installing it (just click Try Ubuntu).

@ssokolow
Copy link
Owner

The old version of QuickTile you were running had no awareness of _NET_WM_STRUT_PARTIAL and relied on _NET_WORKAREA to find the usable part of the desktop.

_NET_WORKAREA is calculated by the window manager from all the _NET_WM_STRUT_PARTIAL values but the problem is, _NET_WORKAREA can only represent a rectangle, so QuickTile would behave badly if the user had screens of different sizes or had a panel on one monitor but not the other.

The current version of QuickTile only falls back to _NET_WORKAREA if it can't access the _NET_WM_STRUT_PARTIAL values for some reason.

@avaly
Copy link
Contributor Author

avaly commented Feb 15, 2015

Any updates on this one?

@avaly
Copy link
Contributor Author

avaly commented Feb 15, 2015

Weirdly enough, removing the launcher bar from the second monitor was enough to fix the issue I was experiencing.

However, I do think the code can still be improved to handle this edge cases.

@ssokolow
Copy link
Owner

Sorry for dropping the ball. My schedule got messed up and I've been struggling to keep the TODO completion rate above the TODO arrival rate. I can't promise anything, but I'll try to push this closer to the front of my TODO list.

As for fixing it, that's not weird at all. The problem happens because, when QuickTile receives word that the panel on the second monitor has reserved space, it misinterprets that request as reserving the entire left monitor.

You'd have the same problem if you had a panel on the right-hand side of the left monitor.

@ssokolow
Copy link
Owner

Renaming this to the actual problem as part of cleaning up TODOs in preparation to fix them.

Sorry for going silent for so long.

@ssokolow ssokolow changed the title Windows get resized to (0,0,0,0) on a clean install of Ubuntu 14.04.1 QuickTile fails pathologically when encountering panel reservations on edges between monitors Jan 24, 2020
@ssokolow
Copy link
Owner

In case anyone's wondering about the root cause of this issue, it's that I was working from the official spec for _NET_WM_STRUT_PARTIAL, and it makes no mention of this use case in such a way as to imply that the correct behaviour is to treat an entire monitor as reserved.

@ssokolow ssokolow added this to the 0.4 (First GTK 3 Release) milestone Jan 25, 2020
@ssokolow
Copy link
Owner

Since UseWorkarea has been removed in the GTK 3.x port, I'm setting this as a requirement for that release to remind myself to write a fix for this before I release it.

I may need to rethink my internal representation of panels so it remembers which edge of the desktop the panel was calculated against (ie. which dimension is length and which is thickness) but I'm imagining something along the lines of "if a panel's thickness covers the entire span of the monitor in question, ignore it."

@ssokolow
Copy link
Owner

No fix yet, but I just converted the numbers from your --debug output into a unit test so I'll know once I have successfully fixed it.

@ssokolow
Copy link
Owner

A fix that superficially seems to work is now in my local copy of QuickTile. I'll be pushing it to the gtk3_port branch as soon as I've written some unit tests to improve my confidence in its correctness.

@ssokolow
Copy link
Owner

OK. The version with the fix is now in the gtk3_port branch. I don't have any panels on interior edges, but the code passes the unit test I built from your --debug output.

Please test and let me know if you encounter any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants