Skip to content

Make X11Window::moveResize() stop calling updateShape()

There are two shapes that the WM needs to be concerned about: the input shape and normal shape.

If the client window has custom input shape, the window manager should synchronize it with all parent windows or ensure that its frame window has an input shape as big as the client's input shape. The input shape needs to be updated either when the client changes it or when the X11Window is resized or its borders have changed. updateInputShape() accomplishes that.

The normal shape is slightly different. If the window is decorated, the window manager could ignore the shape set by the client. If the window is not decorated, it's a good idea for the WM to synchronize client's shape with the frame window's shape (if there's any). The frame window shape doesn't need to be updated when it's resized, but if the client window moves inside the frame window, it needs to be updated.

This change removes too generic updateShape() in the X11Window::moveResize() code path and replaces it with a more targeted code to update the shape. Note that on wayland, it's unnecessary to synchronize the shapes because the client window never moves in the frame window but it is done anyway to minimize the differences between X and Wayland sessions for easier maintenance.

Merge request reports