diff options
author | Peter Hofmann <scm@uninformativ.de> | 2018-02-21 07:42:37 +0100 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2018-02-21 07:42:37 +0100 |
commit | 64fa4dae2ba8a3f935d645ca01c3da55d0caf9c2 (patch) | |
tree | 4f4cadf40342f0bb7958b881ced7045ab6f7101a | |
parent | 9f62826769046b65845ffa1279da9d2101373f76 (diff) | |
download | lariza-64fa4dae2ba8a3f935d645ca01c3da55d0caf9c2.tar.gz |
Connect to button release events instead of button press
By default, WebKit only responds to release events. The old code
listened for press events. That's probably not the right way to do
things. We should properly "override" the release events.
Closes #56.
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | browser.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,11 @@ Release history for lariza +next + [Fixed] + - Accidentally opening a context menu and then issuing a middle click + to open a new tab no longer changes the location of the original tab + (fixes #56). (This only happened under certain circumstances.) + v18.01 2018-01-27 [Fixed] - Compilation warnings regarding deprecated API calls (GtkAction) have @@ -179,7 +179,7 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show) G_CALLBACK(decide_policy), NULL); g_signal_connect(G_OBJECT(c->web_view), "key-press-event", G_CALLBACK(key_web_view), c); - g_signal_connect(G_OBJECT(c->web_view), "button-press-event", + g_signal_connect(G_OBJECT(c->web_view), "button-release-event", G_CALLBACK(key_web_view), c); g_signal_connect(G_OBJECT(c->web_view), "scroll-event", G_CALLBACK(key_web_view), c); @@ -814,7 +814,7 @@ key_web_view(GtkWidget *widget, GdkEvent *event, gpointer data) gtk_entry_set_progress_fraction(GTK_ENTRY(c->location), 0); } } - else if (event->type == GDK_BUTTON_PRESS) + else if (event->type == GDK_BUTTON_RELEASE) { switch (((GdkEventButton *)event)->button) { |