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'
This commit is contained in:
Jehan 2020-06-15 21:34:54 +02:00
parent 1fb754d87b
commit 66a952df9f
1 changed files with 4 additions and 2 deletions

View File

@ -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 *