After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659848 - window: Fix _NET_WM_FRAME_EXTENTS to work properly
window: Fix _NET_WM_FRAME_EXTENTS to work properly
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-22 17:44 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-09-24 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Fix _NET_WM_FRAME_EXTENTS to work properly (1.21 KB, patch)
2011-09-22 17:44 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
window: Fix window placement to exclude invisible borders (1.21 KB, patch)
2011-09-22 18:17 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
window: Fix _NET_FRAME_EXTENTS to work properly (1.29 KB, patch)
2011-09-22 18:21 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-09-22 17:44:53 UTC
Spotted by Cosimo. This property should be set properly so that clients
that need the visible frame extents (like gnome-screenshot) work properly.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-09-22 17:44:55 UTC
Created attachment 197272 [details] [review]
window: Fix _NET_WM_FRAME_EXTENTS to work properly

_NET_WM_FRAME_EXTENTS should contain the *visible* frame extents of the window.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-09-22 18:17:54 UTC
Created attachment 197275 [details] [review]
window: Fix window placement to exclude invisible borders

A window can specify geometry that it is placed at. We need to exclude invisible
borders when calculating where to place the window, otherwise the window will have
a strange offset.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-09-22 18:21:51 UTC
Created attachment 197276 [details] [review]
window: Fix _NET_FRAME_EXTENTS to work properly

_NET_FRAME_EXTENTS should contain the difference between where a window asked
to be placed, and where it is. Ideally, this should be the same as the visible
extents.



Fix up commit message. _NET_WM_FRAME_EXTENTS is certainly not a thing.
Comment 4 Owen Taylor 2011-09-22 18:44:42 UTC
Review of attachment 197275 [details] [review]:

Makes sense to me... this fixes xterm -geometry to place correctly. Since movement as specified by an application goes through the same code path, this should also fix up applications repositioning themselves dynamically.
Comment 5 Owen Taylor 2011-09-22 18:48:40 UTC
Review of attachment 197276 [details] [review]:

The visible borders are the ones we want - applications won't be written with any assumption that there will be invisible borders. This is definitely the case once we fix positioning to work according to the visible borders - the code in gtkwindow.c:gtk_window_get_position() is assuming that the offsets for gravity are based on the reported frame extents.
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-09-24 18:05:52 UTC
Attachment 197275 [details] pushed as 764569e - window: Fix window placement to exclude invisible borders
Attachment 197276 [details] pushed as c4692b8 - window: Fix _NET_FRAME_EXTENTS to work properly