summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Techet <techet@gmail.com>2019-10-24 21:48:30 +0200
committerJiří Techet <techet@gmail.com>2019-10-24 21:48:30 +0200
commit817e99640df4b8739ec33e4ee72548a843718f7d (patch)
tree04f72a4203ded188507a26595b79dbe556ca2a1c
parentafb6603d0978f822a7f84f18822dfd5a8997832d (diff)
downloadgtk+-817e99640df4b8739ec33e4ee72548a843718f7d.tar.gz
gdk: quartz: Avoid page up/down getting filtered by gtk_im_context_filter_keypress()
For page up/down events (Fn+up_arrow and Fn+down_arrow on macOS) gtk_im_context_filter_keypress() currently returns TRUE when im-quartz is used. This means these events get removed when this function is used (happens e.g. with the Scintilla text editing library). Adding scrollPageDown: and scrollPageUp: into GdkQuartzView seems to resolve the issue as these seem to get called instead of the already present pageUp: and pageDown:.
-rw-r--r--gdk/quartz/GdkQuartzView.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index 193fcc1d31..b2ed5e2418 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -532,6 +532,20 @@
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
+-(void)scrollPageDown: (id)sender
+{
+ GDK_NOTE (EVENTS, g_message ("scrollPageDown"));
+ g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
+ GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
+}
+
+-(void)scrollPageUp: (id)sender
+{
+ GDK_NOTE (EVENTS, g_message ("scrollPageUp"));
+ g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
+ GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
+}
+
-(void)selectAll: (id)sender
{
GDK_NOTE (EVENTS, g_message ("selectAll"));