From 092ded9e5384e4506e1cfc527c4041e416371f23 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 22 Sep 2006 11:57:19 +0200 Subject: [PATCH] Ungrab keyboard on release. Use the new stock icons for browser (still broken) --- activities/browser/NavigationToolbar.py | 4 ++-- bindings/globalkeys/sugar-key-grabber.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/activities/browser/NavigationToolbar.py b/activities/browser/NavigationToolbar.py index 12202755..f3089b44 100644 --- a/activities/browser/NavigationToolbar.py +++ b/activities/browser/NavigationToolbar.py @@ -13,13 +13,13 @@ class NavigationToolbar(gtk.Toolbar): self._insert_spring() self.back = gtk.ToolButton(None, _('Back')) - self.back.set_icon_name('back') + self.back.set_icon_name('stock-back') self.back.connect("clicked", self.__go_back_cb) self.insert(self.back, -1) self.back.show() self.forward = gtk.ToolButton(None, _('Forward')) - self.forward.set_icon_name('forward') + self.forward.set_icon_name('stock-forward') self.forward.connect("clicked", self.__go_forward_cb) self.insert(self.forward, -1) self.forward.show() diff --git a/bindings/globalkeys/sugar-key-grabber.c b/bindings/globalkeys/sugar-key-grabber.c index 70f9b471..f31e012b 100644 --- a/bindings/globalkeys/sugar-key-grabber.c +++ b/bindings/globalkeys/sugar-key-grabber.c @@ -144,6 +144,8 @@ filter_events(GdkXEvent *xevent, GdkEvent *event, gpointer data) g_signal_emit (grabber, signals[KEY_RELEASED], 0, key); g_free(key); + XUngrabKeyboard (GDK_WINDOW_XDISPLAY (grabber->root), 0L); + return GDK_FILTER_REMOVE; } } @@ -160,7 +162,6 @@ filter_events(GdkXEvent *xevent, GdkEvent *event, gpointer data) GDK_WINDOW_XID (grabber->root), 0, GrabModeAsync, GrabModeAsync, 0L); - return GDK_FILTER_REMOVE; } }