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 724306 - Recent GTK+ does not like it when the titlebar is reset on a realized window
Recent GTK+ does not like it when the titlebar is reset on a realized window
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.11.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
3.12
: 725370 725371 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-02-13 15:58 UTC by Debarshi Ray
Modified: 2014-03-15 07:25 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12


Attachments
Avoid resetting the titlebar on a realized window (2.17 KB, patch)
2014-03-14 09:26 UTC, Debarshi Ray
none Details | Review
Avoid resetting the titlebar on a realized window (2.73 KB, patch)
2014-03-14 10:07 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-02-13 15:58:26 UTC
Now that we have split the toolbars for different modes into their own classes, we reset the titlebar every time the application changes modes. This does not work very well with recent versions of GTK+ if the window has already been realized. You get a WARNING and the window jumps around.
Comment 1 Matthias Clasen 2014-02-15 19:48:08 UTC
Its hard to do much better on the gtk side. While theoretically possible, a lot of the csd setup happens in the realize path.

To work around the issue, you can put your different mode titlebars into a stack and switch that way, or just put them all in a box and show/hide as needed
Comment 2 Debarshi Ray 2014-02-28 07:23:53 UTC
*** Bug 725371 has been marked as a duplicate of this bug. ***
Comment 3 Debarshi Ray 2014-02-28 07:24:53 UTC
*** Bug 725370 has been marked as a duplicate of this bug. ***
Comment 4 Debarshi Ray 2014-03-14 09:26:34 UTC
Created attachment 271841 [details] [review]
Avoid resetting the titlebar on a realized window

I think this is simpler than using a GtkStack. Much of our logic around changing the sensitivity of toolbar buttons and so on is based on the assumption that the toolbar is destroyed and recreated on each mode change. By using a GtkBox we can continue doing that and still avoid resetting the titlebar.

Using a GtkStack with different toolbars that were created once and then switched around would require adjusting the logic in a few more places and it would be wise to avoid intrusive changes at this point in the 3.11.x cycle.
Comment 5 Debarshi Ray 2014-03-14 10:07:15 UTC
Created attachment 271848 [details] [review]
Avoid resetting the titlebar on a realized window

Missed out one line.
Comment 6 Cosimo Cecchi 2014-03-14 17:37:37 UTC
Review of attachment 271848 [details] [review]:

Looks good as a fix for 3.12, thanks.
Comment 7 Debarshi Ray 2014-03-15 07:25:04 UTC
Comment on attachment 271848 [details] [review]
Avoid resetting the titlebar on a realized window

Thanks for the review.