Skip to content

Avoid moving the window while it's maximized

Vlad Zahorodnii requested to merge work/zzag/wayland-drag-unmaximize into master

Unlike X11, on Wayland, the window won't change its maximize mode until it renders a new buffer. This creates a problem for interactive move because if it's not careful and moves the window while it's still effectively maximized, it will look as if the window has leaked to other screens.

This change fixes the problem by making Window::handleInteractiveMoveResize() avoid move() if the window needs to be unmaximized.

As a bonus, it also allows to unmaximize the windows that are maximized along only one dimension by dragging them.

Unfortunately, tiling stuff still suffers from the same issue. In order to fix it, Window::tile() has to be part of double buffered state, like Window::maximizeMode().

BUG: 449105

Edited by Vlad Zahorodnii

Merge request reports