[gimp] app: check if display is X11 before gdk_x11_display_get_user_time().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: check if display is X11 before gdk_x11_display_get_user_time().
- Date: Mon, 15 Jun 2020 19:37:08 +0000 (UTC)
commit 66a952df9fb18a071661a8a6b98be49bdc98b9c1
Author: Jehan <jehan girinstud io>
Date: Mon Jun 15 21:34:54 2020 +0200
app: check if display is X11 before gdk_x11_display_get_user_time().
Fixes:
> GLib-GObject-WARNING **: 20:51:24.156: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'
app/gui/gui-vtable.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c
index 4545621593..b585a19c38 100644
--- a/app/gui/gui-vtable.c
+++ b/app/gui/gui-vtable.c
@@ -314,9 +314,11 @@ static guint32
gui_get_user_time (Gimp *gimp)
{
#ifdef GDK_WINDOWING_X11
- return gdk_x11_display_get_user_time (gdk_display_get_default ());
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
+ return gdk_x11_display_get_user_time (gdk_display_get_default ());
#endif
- return 0;
+
+ return gtk_get_current_event_time ();
}
static GFile *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]