Skip to content

x11/window: Compare input shape to client rect when undecorating

When a window with an input shape on its decoration window becomes undecorated and meta_window_x11_update_input_region() gets called via notify::decorated, the buffer_rect of the window has not been updated yet while the decorated property has. This would lead to us comparing the input shape of the client window to the buffer_rect which still includes the decoration window. This would fail to detect the common case when the client window has no input shape set, leading to the input region being set to the size of the client window rather than NULL. If the window is then resized later, the input shape would remain at the previous size.

This was not a problem before 6bd920b3, because then we were (wrongly) always comparing to the client_rect.

Fix this by choosing the correct rect for comparison depending on whether the window is decorated.

Fixes: 6bd920b3 ("x11/window: Use correct bounding rect to determine NULL input region") Closes: #3451 (closed)

Edited by Sebastian Keller

Merge request reports