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 722108 - window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage
window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-13 14:33 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-01-13 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage (3.47 KB, patch)
2014-01-13 14:33 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2014-01-13 14:33:41 UTC
When GDK sends an unmaximize _NET_WM_STATE ClientMessage, it tells us to remove
the _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT states. Before
this time, it would independently call:

  meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL);
  meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL);

Which, besides being foolishly inefficient, would also mess up our saved_rect
tracking, causing the window to only look like it was unmaximized vertically.

Make this code more intelligent, so it causes us to unmaximize in one call.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-01-13 14:33:43 UTC
Created attachment 266164 [details] [review]
window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage
Comment 2 Rui Matos 2014-01-13 16:22:06 UTC
Review of attachment 266164 [details] [review]:

Other than that it looks fine to me.

::: src/core/window.c
@@ +6892,3 @@
         {
           gboolean max;
+          MetaMaximizeFlags directions;

This can't go uninitialized.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-01-13 16:35:28 UTC
Attachment 266164 [details] pushed as 0b003bb - window: Atomically unmaximize both directions from a _NET_WM_STATE ClientMessage