! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Tiled windows are centered wrt to the center of the screen


Description Andrzej editbugs 2012-04-23 08:07:04 CEST
Tiled windows are centered wrt to the center of the screen and do not take struts into account. If I have a wide panel on one of the screen edges (e.g. a deskbar), the window tiled next to it will be narrower than window tiled at the other edge.

IMHO the tiling should use a center of available area, not center of the whole screen.
Comment 1 Alberto 2013-01-03 18:51:49 CET
*** Bug 9644 has been marked as a duplicate of this bug. ***
Comment 2 Alberto 2013-03-02 19:32:49 CET
Created attachment 4943 
Patch to correct the bug

This patch fixes the bug at hand (done over 4.10):
( everything done inside clientNewMaxSize() )

The tiling was using the whole screen coordinates and then cutting the area that overlapped with the pannels with clientMaxSpace().
Now, clientMaxSpace() is called first to get the space of the screen that is free from panels. Afterwards the tiling works over that space.

+ Minor thing:
tmp_h and tmp_w for the rigth/bottom tiles are now calculated as the remaining space that is not taken by the up/left window tile space (if the number of avaliable pixels wasn't even, 1 would be wasted):
that is, for TILE_DOWN instead of tmp_h = full_h/2;
is now tmp_h = full_h - full_h/ 2;

+ Another minor thing (cleanup):
Lines 3118 to 3121 seemed to be some kind of leftover(?): not used by anything afterwards. I removed them.

I checked the patched version on my computer and a virtual machine, seems to work fine with changing number of panes and 1 or 2 monitors.
Comment 3 Cédric Leporcq 2014-06-04 22:21:40 CEST
Created attachment 5512 
Take account of panels reserved space for tilling


Your patch work as expected on my system. Thanks!

I'm totally agree with this:
"that is, for TILE_DOWN instead of tmp_h = full_h/2;
is now tmp_h = full_h - full_h/ 2;"

However, If you remove lines 3118 to 3121 alone, tmp_h will not be initialised in some part of the code; and this is a source of memory leak. We should avoid this I think.

Eventually, it is even possible to remove tmp_* completely, we don't even need to use them.

I've submit a patch with such modifications.
Comment 4 Alistair Buxton 2014-08-05 17:48:18 CEST
Have you tested how this interacts with multimonitor setups with different sized monitors? Especially L-shaped configurations seem to have issues with struts. The whole struts mechanism is not really multimonitor aware at all, so I am a little bit worried this might have really bad side-effects...
Comment 5 Alistair Buxton 2014-08-05 17:52:02 CEST
See for example https://bugzilla.xfce.org/show_bug.cgi?id=10625 for what can happen if you test against struts from another monitor (and there isn't a way to tell which monitor struts belong to). Having menus open half way down the screen... if windows started doing that, it would be bad.
Comment 6 Alberto 2014-08-05 19:10:32 CEST
Created attachment 5594 
screenshot without the patch and 2 monitors
Comment 7 Alberto 2014-08-05 19:13:33 CEST
Created attachment 5595 
screenshot with the patch and 2 monitors
Comment 8 Alberto 2014-08-05 19:17:19 CEST
At least with what I tried here, it seems to work equally bad with and without my patch (over 4.10) with 2 monitors. (I played a bit with different dispay and panel positions and different amount of panels and it seemed always reasonable)

See the screenshots attached
Comment 9 Olivier Fourdan editbugs 2015-01-08 22:18:17 CET
Pushed, thanks!

Bug #8764

Reported by:
Reported on: 2012-04-23
Last modified on: 2015-01-08
Duplicates (1):
  • 9644 Tiling does not include space reserved by panel


Olivier Fourdan
CC List:
3 users




Additional information