x11/window: Use correct bounding rect to determine NULL input region
When updating the input region we check whether the input shape reported by XShape matches the bounding region of a window to determine when it was not set by the client. We would then use a NULL input region instead which always matches the full size of the window. The code however was using the client rect for this comparison, which does not include the window frame. Since d991961a the frame is considered part of the input region. This meant that for SSD windows where the input region would match the bounding region, we would not detect that and fail to set the input region to NULL, but instead set it to the reported input shape. Usually this would not be the case due to the GTK frame window having shadows and a resize region, but in the presence of an issue that causes GTK to wrongly detect _GTK_FRAME_EXTENTS as not supported, GTK would not draw shadows or set an input shape. And due to GTK not updating its input shape, there would be no further calls to meta_window_x11_update_input_region() after the initial one. The input region would therefore remain at the fixed size from the initial call. This was causing windows to become click-through outside of the region corresponding to their initial size after being resized. Fixes: d991961ae ("x11: Use input region from frame window for decorated windows") Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/6558 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3404 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3697>
This commit is contained in:
parent
2e38ec6ce1
commit
6bd920b355
1 changed files with 2 additions and 2 deletions
|
@ -2458,8 +2458,8 @@ meta_window_x11_update_input_region (MetaWindow *window)
|
|||
else if (n_rects == 1 &&
|
||||
(rects[0].x == 0 &&
|
||||
rects[0].y == 0 &&
|
||||
rects[0].width == priv->client_rect.width &&
|
||||
rects[0].height == priv->client_rect.height))
|
||||
rects[0].width == window->buffer_rect.width &&
|
||||
rects[0].height == window->buffer_rect.height))
|
||||
{
|
||||
/* This is the bounding region case. Keep the
|
||||
* region as NULL. */
|
||||
|
|
Loading…
Reference in a new issue