mirror of
https://github.com/brl/mutter.git
synced 2025-01-22 17:38:56 +00:00
window: Adjust the frame rect when _GTK_FRAME_EXTENTS is set on map
This commit is contained in:
parent
d87093fe29
commit
461aea47dd
@ -350,7 +350,8 @@ gtk_border_equal (GtkBorder *a,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_set_custom_frame_extents (MetaWindow *window,
|
meta_window_set_custom_frame_extents (MetaWindow *window,
|
||||||
GtkBorder *extents)
|
GtkBorder *extents,
|
||||||
|
gboolean is_initial)
|
||||||
{
|
{
|
||||||
if (extents)
|
if (extents)
|
||||||
{
|
{
|
||||||
@ -359,6 +360,17 @@ meta_window_set_custom_frame_extents (MetaWindow *window,
|
|||||||
|
|
||||||
window->has_custom_frame_extents = TRUE;
|
window->has_custom_frame_extents = TRUE;
|
||||||
window->custom_frame_extents = *extents;
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -391,12 +403,12 @@ reload_gtk_frame_extents (MetaWindow *window,
|
|||||||
extents.right = (int)value->v.cardinal_list.cardinals[1];
|
extents.right = (int)value->v.cardinal_list.cardinals[1];
|
||||||
extents.top = (int)value->v.cardinal_list.cardinals[2];
|
extents.top = (int)value->v.cardinal_list.cardinals[2];
|
||||||
extents.bottom = (int)value->v.cardinal_list.cardinals[3];
|
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
|
else
|
||||||
{
|
{
|
||||||
meta_window_set_custom_frame_extents (window, NULL);
|
meta_window_set_custom_frame_extents (window, NULL, initial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user