ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
860 stars 78 forks source link

Windows disappear from screen #98

Closed michaelkunzmann-sap closed 4 years ago

michaelkunzmann-sap commented 5 years ago

Since today, the windows keep disappearing from my screen completely when I try to tile them.

My configuration:

[general]
cfg_schema = 1
ColumnCount = 3
UseWorkarea = True
ModMask = <Ctrl><Mod4>
MovementsWrap = True

[keys]
C = move-to-center
H = horizontal-maximize
V = vertical-maximize
KP_0 = maximize
KP_1 = bottom-left
KP_2 = bottom
KP_3 = bottom-right
KP_4 = left
KP_5 = middle
KP_6 = right
KP_7 = top-left
KP_8 = top
KP_9 = top-right
KP_Enter = monitor-switch

I am using Ubuntu 16.04 with the standard desktop, with 3 monitors (running in VMWare Fusion). Tried to restart daemon, system, nothing helped.

michaelkunzmann-sap commented 5 years ago

This is the log output of repositioning a window:

$ quicktile --debug --daemonize
DEBUG: Received keybind: <Primary><Mod4>KP_Right
DEBUG: Executing command 'right' with arguments (), {}
DEBUG: Operating on window <wnck.Window object at 0x7fb76db7ff00 (WnckWindow at 0x250fd10)> with title "Windows disappear from screen · Issue #98 · ssokolow/quicktile - Google Chrome" and geometry (3432, 222, 1688, 1416)
DEBUG:  Window is on monitor 1, which has geometry gtk.gdk.Rectangle(1680, 198, 3440, 1440)
DEBUG: Gathered _NET_WM_STRUT_PARTIAL values:
    [(65, 0, 0, 0, 419, 1444, 0, 0, 0, 0, 0, 0), (1745, 0, 0, 0, 222, 1637, 0, 0, 0, 0, 0, 0), (5185, 0, 0, 0, 24, 1919, 0, 0, 0, 0, 0, 0), (0, 0, 419, 0, 0, 0, 0, 0, 0, 1679, 0, 0), (0, 0, 222, 0, 0, 0, 0, 0, 1680, 5119, 0, 0), (0, 0, 24, 0, 0, 0, 0, 0, 5120, 6319, 0, 0)]
DEBUG: Usable region of monitor calculated as:
    Region: []
    Rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)
DEBUG: Selected preset sequence:
    ((0.5, 0.0, 0.5, 1.0), (0.667, 0.0, 0.333, 1.0), (0.333, 0.0, 0.667, 1.0))
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 1, which has geometry gtk.gdk.Rectangle(1680, 198, 3440, 1440)
DEBUG:  Repositioning to (0, 0, 0, 0)
ssokolow commented 5 years ago
DEBUG: Usable region of monitor calculated as:
    Region: []
    Rectangle: gtk.gdk.Rectangle(0, 0, 0, 0)

Ugh. Looks like it's probably another bug in how I calculate what portion of the desktop is not reserved by panels. That code has known bugs when panels are present on monitor edges which aren't also desktop edges (eg. when panels exist on the boundaries between monitors) and really needs a major refactoring.

As a diagnostic technique, try changing the UseWorkarea setting in quicktile.cfg to see if that changes the behaviour. (That'll ignore reservations, relying on the window manager to shove windows out of reserved space when requested to overlap it.)

michaelkunzmann-sap commented 5 years ago

Hi @ssokolow , setting UseWorkarea = False indeed helped.

ssokolow commented 5 years ago

OK, then it is a bug in the workarea calculation.

Do you have any "don't allow applications to overlap" panels on boundaries between screens? That's known to be especially buggy at the moment.

ssokolow commented 4 years ago

Due to the lack of reply, I'm going to assume that this is the same bug as #45 and close it in favour of that one.