mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
window-wayland: Only fizzle out configures when we do pending moves
This is a terrible hack. We need to figure out a better way to do interactive resizes. This fixes weird resizing from the left bugs when using GTK+, which is really slow at acking configures.
This commit is contained in:
parent
6954d23444
commit
65a8f9100c
@ -348,6 +348,29 @@ meta_window_wayland_new (MetaDisplay *display,
|
||||
return window;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_do_pending_move (MetaWindowWayland *wl_window,
|
||||
MetaWaylandSerial *acked_configure_serial)
|
||||
{
|
||||
if (!wl_window->has_pending_move)
|
||||
return FALSE;
|
||||
|
||||
if (wl_window->pending_configure_serial.set)
|
||||
{
|
||||
/* If we're waiting for a configure and this isn't an ACK for
|
||||
* any configure, then fizzle it out. */
|
||||
if (!acked_configure_serial->set)
|
||||
return FALSE;
|
||||
|
||||
/* If we're waiting for a configure and this isn't an ACK for
|
||||
* the configure we're waiting for, then fizzle it out. */
|
||||
if (acked_configure_serial->value != wl_window->pending_configure_serial.value)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_move_resize_wayland:
|
||||
*
|
||||
@ -365,22 +388,6 @@ meta_window_wayland_move_resize (MetaWindow *window,
|
||||
MetaRectangle rect;
|
||||
MetaMoveResizeFlags flags;
|
||||
|
||||
if (wl_window->pending_configure_serial.set)
|
||||
{
|
||||
/* If we're waiting for a configure and this isn't an ACK for
|
||||
* any configure, then fizzle it out. */
|
||||
if (!acked_configure_serial->set)
|
||||
return;
|
||||
|
||||
/* If we're waiting for a configure and this isn't an ACK for
|
||||
* the configure we're waiting for, then fizzle it out. */
|
||||
if (acked_configure_serial->value != wl_window->pending_configure_serial.value)
|
||||
return;
|
||||
|
||||
/* OK, this request is going to ACK the pending configure. */
|
||||
wl_window->pending_configure_serial.set = FALSE;
|
||||
}
|
||||
|
||||
/* XXX: Find a better place to store the window geometry offsets. */
|
||||
window->custom_frame_extents.left = new_geom.x;
|
||||
window->custom_frame_extents.top = new_geom.y;
|
||||
@ -390,7 +397,7 @@ meta_window_wayland_move_resize (MetaWindow *window,
|
||||
/* x/y are ignored when we're doing interactive resizing */
|
||||
if (!meta_grab_op_is_resizing (window->display->grab_op))
|
||||
{
|
||||
if (wl_window->has_pending_move)
|
||||
if (wl_window->has_pending_move && should_do_pending_move (wl_window, acked_configure_serial))
|
||||
{
|
||||
rect.x = wl_window->pending_move_x;
|
||||
rect.y = wl_window->pending_move_y;
|
||||
@ -411,6 +418,8 @@ meta_window_wayland_move_resize (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
wl_window->pending_configure_serial.set = FALSE;
|
||||
|
||||
rect.width = new_geom.width;
|
||||
rect.height = new_geom.height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user