[Xfce4-commits] <midori:master> Add Win32 work-around to History List for modifiers
Christian Dywan
noreply at xfce.org
Wed Mar 27 00:14:02 CET 2013
Updating branch refs/heads/master
to 78cc6cc295143821ae1229ddd1b691ae00c4f78b (commit)
from fc06bd5a819712fb4fd5ba30fe0b8e10f7685519 (commit)
commit 78cc6cc295143821ae1229ddd1b691ae00c4f78b
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Wed Mar 27 00:11:40 2013 +0100
Add Win32 work-around to History List for modifiers
extensions/history-list.vala | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index 1d7b63a..6ad4ad6 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -339,15 +339,27 @@ namespace HistoryList {
this.closing_behavior = this.get_integer ("TabClosingBehavior");
}
+ public bool is_key_a_modifier (Gdk.EventKey event_key) {
+#if HAVE_WIN32
+ /* On win is_modifier check does not seem to work */
+ if (event_key.keyval == Gdk.keyval_from_name("Control_L"))
+ return true;
+#else
+ if (event_key.is_modifier > 0)
+ return true;
+#endif
+ return false;
+ }
+
public bool key_press (Gdk.EventKey event_key) {
- if (event_key.is_modifier > 0) {
+ if (is_key_a_modifier (event_key)) {
this.modifier_count++;
}
return false;
}
public bool key_release (Gdk.EventKey event_key, Browser browser) {
- if (event_key.is_modifier > 0) {
+ if (is_key_a_modifier (event_key)) {
this.modifier_count--;
}
if (this.modifier_count == 0 || event_key.keyval == this.escKeyval) {
More information about the Xfce4-commits
mailing list