[gtk/wip/albfan/offscreen-window] Prevent crashes on gdk wayland implementation using offscreen windows
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/albfan/offscreen-window] Prevent crashes on gdk wayland implementation using offscreen windows
- Date: Thu, 23 Apr 2020 09:45:02 +0000 (UTC)
commit 83a878185ecc278bc2cf078ad1c19f0162338447
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Thu Apr 23 11:43:24 2020 +0200
Prevent crashes on gdk wayland implementation using offscreen windows
gdk/wayland/gdkwindow-wayland.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 7a89ece98d..068ac47622 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -2535,6 +2535,8 @@ calculate_moved_to_rect_result (GdkWindow *window,
gboolean *flipped_x,
gboolean *flipped_y)
{
+ g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
+ g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindow *parent;
gint window_x, window_y;
@@ -5328,6 +5330,8 @@ void
gdk_wayland_window_restore_shortcuts (GdkWindow *window,
GdkSeat *gdk_seat)
{
+ g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
+ g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (window->impl));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
struct wl_seat *seat = gdk_wayland_seat_get_wl_seat (gdk_seat);
struct zwp_keyboard_shortcuts_inhibitor_v1 *inhibitor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]