summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorNohemi Fernandez <nf68@cornell.edu>2011-08-04 13:05:58 -0500
committerEitan Isaacson <eitan@monotonous.org>2011-08-12 09:19:40 +0200
commitad3bcc39c5c17b5e186a0659975e3705af201943 (patch)
treed7e6c9bae18fd809152ff6eb76b648ce4dd90ea3 /modules
parenta43139c91d416d7eb5684a6c74867d0894d52dfb (diff)
downloadcaribou-ad3bcc39c5c17b5e186a0659975e3705af201943.tar.gz
Add GLib Timeout to know when new windows are created
Right now there is no way to know whether a new window has been created without checking it repeatedly, as is done in this patch. https://bugzilla.gnome.org/show_bug.cgi?id=655828
Diffstat (limited to 'modules')
-rw-r--r--modules/gtk3/caribou-gtk-module.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gtk3/caribou-gtk-module.vala b/modules/gtk3/caribou-gtk-module.vala
index 8be149c..6a7f553 100644
--- a/modules/gtk3/caribou-gtk-module.vala
+++ b/modules/gtk3/caribou-gtk-module.vala
@@ -21,8 +21,11 @@ namespace Caribou {
"/org/gnome/Caribou/Keyboard");
add_tracker ();
- GLib.Timeout.add (60, () => { add_tracker ();
- return true; });
+ // Need to use a timeout because there is currently no other
+ // way to know whether a new window has been created
+ // https://bugzilla.gnome.org/show_bug.cgi?id=655828
+ GLib.Timeout.add_seconds (10, () => { add_tracker ();
+ return true; });
} catch (Error e) {
stderr.printf ("%s\n", e.message);
}