window: Stop caching frame_bounds
That was only there to force updating MetaFrame's bounds but that is something that is already updated in MetaWindowX11.move_resize_internal. So just drop all of that Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3254>
This commit is contained in:
parent
d1b04ffb55
commit
0f19c6f5b6
@ -1088,22 +1088,18 @@ update_opaque_region (MetaWindowActorX11 *actor_x11)
|
||||
static void
|
||||
update_frame_bounds (MetaWindowActorX11 *actor_x11)
|
||||
{
|
||||
MtkRegion *frame_bounds = NULL;
|
||||
MetaWindow *window =
|
||||
meta_window_actor_get_meta_window (META_WINDOW_ACTOR (actor_x11));
|
||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||
MetaWindowX11Private *priv = meta_window_x11_get_private (window_x11);
|
||||
MetaFrame *frame = meta_window_x11_get_frame (window);
|
||||
|
||||
g_clear_pointer (&actor_x11->frame_bounds, mtk_region_unref);
|
||||
|
||||
if (!priv->frame_bounds)
|
||||
{
|
||||
MetaFrame *frame = meta_window_x11_get_frame (window);
|
||||
if (frame)
|
||||
priv->frame_bounds = meta_frame_get_frame_bounds (frame);
|
||||
}
|
||||
if (frame)
|
||||
frame_bounds = meta_frame_get_frame_bounds (frame);
|
||||
|
||||
if (priv->frame_bounds)
|
||||
actor_x11->frame_bounds = mtk_region_copy (priv->frame_bounds);
|
||||
if (frame_bounds)
|
||||
actor_x11->frame_bounds = mtk_region_copy (frame_bounds);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -76,7 +76,6 @@ typedef enum
|
||||
{
|
||||
META_MOVE_RESIZE_RESULT_MOVED = 1 << 0,
|
||||
META_MOVE_RESIZE_RESULT_RESIZED = 1 << 1,
|
||||
META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED = 1 << 2,
|
||||
META_MOVE_RESIZE_RESULT_STATE_CHANGED = 1 << 3,
|
||||
} MetaMoveResizeResultFlags;
|
||||
|
||||
|
@ -3994,17 +3994,6 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
meta_window_update_monitor (window, update_monitor_flags);
|
||||
}
|
||||
|
||||
#ifdef HAVE_X11_CLIENT
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||
{
|
||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||
MetaWindowX11Private *priv = meta_window_x11_get_private (window_x11);
|
||||
|
||||
if ((result & META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED) && priv->frame_bounds)
|
||||
g_clear_pointer (&priv->frame_bounds, mtk_region_unref);
|
||||
}
|
||||
#endif
|
||||
|
||||
meta_window_foreach_transient (window, maybe_move_attached_window, NULL);
|
||||
|
||||
meta_stack_update_window_tile_matches (window->display->stack,
|
||||
|
@ -242,7 +242,6 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
meta_x11_display_unregister_x_window (x11_display, frame->xwindow);
|
||||
|
||||
priv->frame = NULL;
|
||||
g_clear_pointer (&priv->frame_bounds, mtk_region_unref);
|
||||
g_clear_pointer (&frame->opaque_region, mtk_region_unref);
|
||||
|
||||
/* Move keybindings to window instead of frame */
|
||||
|
@ -102,9 +102,6 @@ struct _MetaWindowX11Private
|
||||
/* may be NULL! not all windows get decorated */
|
||||
MetaFrame *frame;
|
||||
|
||||
/* if non-NULL, the bounds of the window frame */
|
||||
MtkRegion *frame_bounds;
|
||||
|
||||
gboolean has_custom_frame_extents;
|
||||
MetaSyncCounter sync_counter;
|
||||
|
||||
|
@ -1318,7 +1318,6 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
|
||||
gboolean need_move_frame = FALSE;
|
||||
gboolean need_resize_client = FALSE;
|
||||
gboolean need_resize_frame = FALSE;
|
||||
gboolean frame_shape_changed = FALSE;
|
||||
gboolean configure_frame_first;
|
||||
gboolean is_configure_request;
|
||||
MetaWindowDrag *window_drag;
|
||||
@ -1515,7 +1514,7 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
|
||||
}
|
||||
|
||||
if (configure_frame_first && priv->frame)
|
||||
frame_shape_changed = meta_frame_sync_to_window (priv->frame, need_resize_frame);
|
||||
meta_frame_sync_to_window (priv->frame, need_resize_frame);
|
||||
|
||||
if (mask != 0)
|
||||
{
|
||||
@ -1526,7 +1525,7 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
|
||||
}
|
||||
|
||||
if (!configure_frame_first && priv->frame)
|
||||
frame_shape_changed = meta_frame_sync_to_window (priv->frame, need_resize_frame);
|
||||
meta_frame_sync_to_window (priv->frame, need_resize_frame);
|
||||
|
||||
mtk_x11_error_trap_pop (window->display->x11_display->xdisplay);
|
||||
|
||||
@ -1541,8 +1540,6 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
|
||||
if (priv->showing_resize_popup)
|
||||
meta_window_refresh_resize_popup (window);
|
||||
|
||||
if (frame_shape_changed)
|
||||
*result |= META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED;
|
||||
if (need_move_client || need_move_frame)
|
||||
*result |= META_MOVE_RESIZE_RESULT_MOVED;
|
||||
if (need_resize_client || need_resize_frame)
|
||||
|
Loading…
x
Reference in New Issue
Block a user