[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 2 07:58:58 UTC 2019
vcl/unx/gtk3/gtk3gtkframe.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit cdcc0534a8d0f8ca0d9187c5f1184da937154275
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Apr 1 20:31:53 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Apr 2 09:58:33 2019 +0200
only use GdkSeat where available
Change-Id: I346ab7a7c88350eef289c58b8bce299bdd891fbb
Reviewed-on: https://gerrit.libreoffice.org/70085
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index a1334a1bbfeb..687f69f440f2 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4385,8 +4385,14 @@ GdkEvent* GtkSalFrame::makeFakeKeyPress(GtkWidget* pWidget)
GdkEvent *event = gdk_event_new(GDK_KEY_PRESS);
event->key.window = GDK_WINDOW(g_object_ref(gtk_widget_get_window(pWidget)));
- GdkSeat *seat = gdk_display_get_default_seat(gtk_widget_get_display(pWidget));
- gdk_event_set_device(event, gdk_seat_get_keyboard(seat));
+#if GTK_CHECK_VERSION(3, 20, 0)
+ if (gtk_check_version(3, 20, 0) == nullptr)
+ {
+ GdkSeat *seat = gdk_display_get_default_seat(gtk_widget_get_display(pWidget));
+ gdk_event_set_device(event, gdk_seat_get_keyboard(seat));
+ }
+#endif
+
event->key.send_event = 1 /* TRUE */;
event->key.time = gtk_get_current_event_time();
event->key.state = 0;
More information about the Libreoffice-commits
mailing list