From 701cc9265c3958473e2dc20e62da6c82890b2cd0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 22 Feb 2013 17:58:02 +0000 Subject: Add compile time option to disable explicit Gtk to X11 key forwarding (#887). git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5062 a436a847-0d15-0410-975c-d299462d15a1 --- src/x11_in_gtk2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index fd3547a..2e3cdf9 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -130,6 +130,7 @@ wrapper_free(SuilWrapper* wrapper) } } +#ifdef SUIL_FORWARD_KEYS static GdkFilterReturn event_filter(GdkXEvent* xevent, GdkEvent* event, gpointer data) { @@ -144,6 +145,7 @@ event_filter(GdkXEvent* xevent, GdkEvent* event, gpointer data) } return GDK_FILTER_CONTINUE; } +#endif SUIL_LIB_EXPORT SuilWrapper* @@ -166,8 +168,10 @@ suil_wrapper_new(SuilHost* host, wrapper->resize.handle = wrap; wrapper->resize.ui_resize = wrapper_resize; +#ifdef SUIL_FORWARD_KEYS GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(wrap)); gdk_window_add_filter(window, event_filter, wrap); +#endif suil_add_feature(features, &n_features, LV2_UI__parent, (void*)(intptr_t)gtk_plug_get_id(wrap->plug)); -- cgit v1.2.1