wayland: Fix the placement of popup windows
The fix in d61dde1 regressed the position of popup windows, since the size was 0x0 when we wanted to do a sole move. Only fizzle out in the path where we actually *do* resize. https://bugzilla.gnome.org/show_bug.cgi?id=736812
This commit is contained in:
parent
1fb7ca398d
commit
4a41d415f8
@ -187,22 +187,21 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
can_move_now = TRUE;
|
can_move_now = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (constrained_rect.width != window->rect.width ||
|
||||||
|
constrained_rect.height != window->rect.height)
|
||||||
{
|
{
|
||||||
/* If we get a 0x0 size, this means that we're trying to resize
|
/* If we get a 0x0 size, this means that we're trying to resize
|
||||||
* a surface that doesn't have any buffer attached. This can happen
|
* a surface that doesn't have any buffer attached. This can happen
|
||||||
* when a client requests an xdg surface before bringing it up.
|
* when a client requests an xdg surface before bringing it up.
|
||||||
* The constrained_rect will be 1x1 because of how our constraints
|
* The constrained_rect will be 1x1 because of how our constraints
|
||||||
* code works, and sending that to the window would cause it to
|
* code works, and sending that to the window would cause it to
|
||||||
* redraw itself, so just don't send anything. Pretend like this
|
* redraw itself, so just don't send anything.
|
||||||
* move_resize never happened.
|
|
||||||
*/
|
*/
|
||||||
if (unconstrained_rect.width == 0 &&
|
if (unconstrained_rect.width == 0 &&
|
||||||
unconstrained_rect.height == 0)
|
unconstrained_rect.height == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (constrained_rect.width != window->rect.width ||
|
|
||||||
constrained_rect.height != window->rect.height)
|
|
||||||
{
|
|
||||||
meta_wayland_surface_configure_notify (window->surface,
|
meta_wayland_surface_configure_notify (window->surface,
|
||||||
constrained_rect.width,
|
constrained_rect.width,
|
||||||
constrained_rect.height,
|
constrained_rect.height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user