diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2014-11-07 17:16:59 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-12-11 09:04:53 -0500 |
commit | 527d262804017d23540c182da0671023f9c8ff1b (patch) | |
tree | f0dd4bd42f6326d487acd6991b598ffe27bbedca | |
parent | b8a154ad69826b94f8e138cf4e262dd31e6b887f (diff) | |
download | gtk+-527d262804017d23540c182da0671023f9c8ff1b.tar.gz |
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.
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 31f31168b7..2d9b0331e1 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1402,8 +1402,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); } |