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:
Carlos Garnacho
2014-11-07 17:16:59 +01:00
parent 52a90758f9
commit 964abf7423

View File

@ -1437,8 +1437,13 @@ gdk_window_wayland_input_shape_combine_region (GdkWindow *window,
return;
g_clear_pointer (&impl->input_region, cairo_region_destroy);
impl->input_region = cairo_region_copy (shape_region);
cairo_region_translate (impl->input_region, offset_x, offset_y);
if (shape_region)
{
impl->input_region = cairo_region_copy (shape_region);
cairo_region_translate (impl->input_region, offset_x, offset_y);
}
gdk_wayland_window_sync_input_region (window);
}