diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-09-17 12:17:01 -0600 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-09-19 17:35:38 -0600 |
commit | 461aea47dd1da1b32a734d080aa160ca2709f6b3 (patch) | |
tree | 0544e98300102cc7ffec40bd2d713cee7cccbf61 | |
parent | d87093fe29a61923037e5682739918a1fbfdc485 (diff) | |
download | mutter-461aea47dd1da1b32a734d080aa160ca2709f6b3.tar.gz |
window: Adjust the frame rect when _GTK_FRAME_EXTENTS is set on map
-rw-r--r-- | src/x11/window-props.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/x11/window-props.c b/src/x11/window-props.c index e857788c1..316498564 100644 --- a/src/x11/window-props.c +++ b/src/x11/window-props.c @@ -350,7 +350,8 @@ gtk_border_equal (GtkBorder *a, static void meta_window_set_custom_frame_extents (MetaWindow *window, - GtkBorder *extents) + GtkBorder *extents, + gboolean is_initial) { if (extents) { @@ -359,6 +360,17 @@ meta_window_set_custom_frame_extents (MetaWindow *window, window->has_custom_frame_extents = TRUE; window->custom_frame_extents = *extents; + + /* If we're setting the frame extents on map, then this is telling + * us to adjust our understanding of the frame rect to match what + * GTK+ thinks it is. Future changes to the frame extents should + * trigger a resize and send a ConfigureRequest to the application. + */ + if (is_initial) + { + meta_window_client_rect_to_frame_rect (window, &window->rect, &window->rect); + meta_window_client_rect_to_frame_rect (window, &window->unconstrained_rect, &window->unconstrained_rect); + } } else { @@ -391,12 +403,12 @@ reload_gtk_frame_extents (MetaWindow *window, extents.right = (int)value->v.cardinal_list.cardinals[1]; extents.top = (int)value->v.cardinal_list.cardinals[2]; extents.bottom = (int)value->v.cardinal_list.cardinals[3]; - meta_window_set_custom_frame_extents (window, &extents); + meta_window_set_custom_frame_extents (window, &extents, initial); } } else { - meta_window_set_custom_frame_extents (window, NULL); + meta_window_set_custom_frame_extents (window, NULL, initial); } } |