From: Enrico Tröger Date: Tue, 11 Nov 2008 23:16:03 +0000 (+0100) Subject: Use custom key modifier mask X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30086f10ed231c81332bd24c291abc983ff24710;p=midori Use custom key modifier mask --- diff --git a/midori/midori-view.c b/midori/midori-view.c index be3ae68d..61d995a3 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -670,6 +670,9 @@ webkit_web_view_hovering_over_link_cb (WebKitWebView* web_view, g_object_set (G_OBJECT (view), "statusbar-text", link_uri, NULL); } +#define MIDORI_KEYS_MODIFIER_MASK (GDK_SHIFT_MASK | GDK_CONTROL_MASK \ + | GDK_MOD1_MASK | GDK_META_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK ) + static gboolean gtk_widget_button_press_event_cb (WebKitWebView* web_view, GdkEventButton* event, @@ -681,6 +684,7 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, const gchar* link_uri; gboolean background; + event->state = event->state & MIDORI_KEYS_MODIFIER_MASK; link_uri = midori_view_get_link_uri (MIDORI_VIEW (view)); switch (event->button) @@ -770,6 +774,8 @@ gtk_widget_scroll_event_cb (WebKitWebView* web_view, GdkEventScroll* event, MidoriView* view) { + event->state = event->state & MIDORI_KEYS_MODIFIER_MASK; + if (event->state & GDK_CONTROL_MASK) { if (event->direction == GDK_SCROLL_DOWN)