Skip to content

wayland/window: Correct detection whether to send `configure`

Aleksandr Mezin requested to merge amezin/mutter:fix-wayland-resize into master

When deciding if configure event should be sent, meta_window_wayland_move_resize_internal compares requested window size with window->rect size. However, window->rect is only updated when commit is received. So the following sequence produces incorrect result:

  1. a window initially has size size1
  2. move_resize_internal is called with size2. configure is sent
  3. move_resize_internal is called with size1 to restore original size, but commit for size2 haven't arrived yet. So window->rect still has size size1, and thus new configure is not sent
  4. commit for size2 arrives, window changes size to size2

Expected window size in the end: size1 Actual: size2

To fix the issue, take pending configure events into account.

Fixes #1627

Edited by Aleksandr Mezin

Merge request reports