! 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 !
Strut sizes are off by one
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Dan Callaghan 2011-06-19 03:08:57 CEST
Created attachment 3737 
Patch

I have two 1680x1050 monitors side by side with NVidia TwinView. I have a panel set to fill 100% of Monitor 1, docked at the top. Using xprop I get the following struts info for the panel:

_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 29, 0, 0, 0, 0, 0, 0, 1680, 0, 0

So top_end_x is 1680. But I think this should be 1679.

The reason it matters for me is that I am using xmonad as my window manager, and with the current strut behaviour of the panel xmonad reserves 29 pixels along the top edge of my *second* monitor as well as the first, presumably because it thinks there is a strut butting 1 pixel into the second monitor.

Attaching a patch which fixes this problem for me.
Comment 1 Nick Schermer editbugs 2011-06-19 10:17:46 CEST
The 1680th pixel is still on the first monitor. Doesn't hurt tho, so I think its safe to apply this patch.
Comment 2 Nick Schermer editbugs 2011-06-19 13:03:57 CEST
It works as expected in xfwm4 and I'm sure the prop is correct, so report the bug against xmonad instead.
Comment 3 Dan Callaghan 2011-06-20 00:38:05 CEST
(In reply to comment #1)
> The 1680th pixel is still on the first monitor.

Right, but the 1680th pixel is pixel 1679. :-) Pixel 1680 is the 1681st pixel, on the second monitor.

I guess the question here is whether a top_end_x value of 1680 means that the strut ends *on* pixel 1680, or *before* pixel 1680. I don't think the EWMH spec makes this clear at all. Xmonad seems to be taking the former interpretation, but you're saying XFCE is taking the latter interpretation?
Comment 4 Nick Schermer editbugs 2011-06-20 07:49:46 CEST
Yeah I guess that the difference here. Olivier enlighten me ;-).
Comment 5 Dan Callaghan 2011-06-20 07:55:16 CEST
For what it's worth, the panel in GNOME 2 agrees with xmonad here. A buddy of mine has a similar setup to what I described, but with a 1600x900 monitor on the left. He gets:

_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 25, 0, 0, 0, 0, 0, 0, 1599, 0, 0
Comment 6 Nick Schermer editbugs 2011-06-20 08:40:45 CEST
*** Bug 7703 has been marked as a duplicate of this bug. ***
Comment 7 Nick Schermer editbugs 2011-06-21 18:06:22 CEST
Applied in dbc73e9.

Bug #7739

Reported by:
Dan Callaghan
Reported on: 2011-06-19
Last modified on: 2011-06-21
Duplicates (1):
  • 7703 wrong maximization size with multiple screens

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Patch (1.78 KB, patch)
2011-06-19 03:08 CEST , Dan Callaghan
no flags

Additional information