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 524110 - Gdk should not assume reparenting WMs when retrieving window frame extents
Gdk should not assume reparenting WMs when retrieving window frame extents
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.13.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 536159 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-24 12:32 UTC by Danny Baumann
Modified: 2009-11-25 05:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch for using _NET_FRAME_EXTENTS (2.93 KB, patch)
2008-03-24 12:34 UTC, Danny Baumann
none Details | Review
Use _NET_FRAME_EXTENTS, but fall back to parent check (2.55 KB, patch)
2008-03-25 10:19 UTC, Danny Baumann
committed Details | Review

Description Danny Baumann 2008-03-24 12:32:56 UTC
Please describe the problem:
Currently, Gdk assumes a reparenting window manager when retrieving window frame extents in the function gdk_window_get_frame_extents.
The problem with that approach is that while reparenting is common among WMs, not every WM does that as it's not required by any spec to do so. This will cause wrong frame extents being reported under non-reparenting WMs, such as Compiz.

A better solution would be using the _NET_FRAME_EXTENTS property defined by the EWMH: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2512071
This would cause the frame extents being correctly reported by _any_ EWMH compliant WM, and assuming EWMH compliance should be way safer than assuming reparenting.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Danny Baumann 2008-03-24 12:34:31 UTC
Created attachment 107913 [details] [review]
Patch for using _NET_FRAME_EXTENTS

This patch implements using _NET_FRAME_EXTENTS instead of walking up the window tree. See above for reasons.
If desired, I can also create a patch that leaves the old code in for compatibility reasons.
Comment 2 Owen Taylor 2008-03-24 13:42:17 UTC
I don't think we want to break compatibility with older window managers.
Comment 3 Danny Baumann 2008-03-25 10:19:37 UTC
Created attachment 107983 [details] [review]
Use _NET_FRAME_EXTENTS, but fall back to parent check

This patch uses _NET_FRAME_EXTENTS, if available. If not, the old, parent-checking code is used as a fallback path.
This patch should cause no regressions on older WMs.
Comment 4 Cédric Bellegarde 2008-04-24 11:00:28 UTC
Can confirm this bug...

Really annoying...
Comment 5 Federico Mena Quintero 2008-05-16 01:12:56 UTC
The corresponding bug in openSUSE is https://bugzilla.novell.com/show_bug.cgi?id=342595
Comment 6 Matthias Clasen 2008-05-24 02:25:07 UTC
Patch looks good to me. Please commit.
Comment 7 Cody Russell 2008-05-25 23:15:10 UTC
2008-05-25  Cody Russell  <bratsche@gnome.org>

        Bug 524110 - Gdk should	not assume reparenting	WMs when retrieving
        window	frame extents

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
        Use _NET_FRAME_EXTENTS,	if available. 	Patch by Danny Baumann.
Comment 8 Michel Alexandre Salim 2008-06-06 21:56:21 UTC
*** Bug 536159 has been marked as a duplicate of this bug. ***
Comment 9 William Friesen 2009-11-25 05:15:07 UTC
I am seeing this behavior in Ubuntu Karmic using
libgtk2.0-0                           2.18.3-1ubuntu2

I can see that this was fixed some time ago, so is this a regression in gtk or something specific to the Ubuntu package?