wayland: Don't translate a NULL region into an empty one
cairo_region_copy(NULL) will effectively return an empty region, as this function is always meant to return valid memory. This however inverts the meaning of the NULL region and results in entirely non-clickable windows.
This commit is contained in:
@ -1437,8 +1437,13 @@ gdk_window_wayland_input_shape_combine_region (GdkWindow *window,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
g_clear_pointer (&impl->input_region, cairo_region_destroy);
|
g_clear_pointer (&impl->input_region, cairo_region_destroy);
|
||||||
|
|
||||||
|
if (shape_region)
|
||||||
|
{
|
||||||
impl->input_region = cairo_region_copy (shape_region);
|
impl->input_region = cairo_region_copy (shape_region);
|
||||||
cairo_region_translate (impl->input_region, offset_x, offset_y);
|
cairo_region_translate (impl->input_region, offset_x, offset_y);
|
||||||
|
}
|
||||||
|
|
||||||
gdk_wayland_window_sync_input_region (window);
|
gdk_wayland_window_sync_input_region (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user