]> Pileus Git - ~andy/gtk/commitdiff
Ignore all events if the app is not active
authorRichard Hult <richard@imendio.com>
Mon, 2 Feb 2009 14:51:11 +0000 (15:51 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:31 +0000 (10:15 +0200)
gdk/quartz/gdkevents-quartz.c

index 60391528eec47d3b349744f20ebedb5a015485f2..a5ffa581205badb8f0a7c312c98feedf0811596c 100644 (file)
@@ -1237,6 +1237,12 @@ gdk_event_translate (GdkEvent *event,
   int x_root, y_root;
   gboolean return_val;
 
+  /* Ignore events altogether when we're not active, otherwise we get
+   * tooltips etc for inactive apps.
+   */
+  if (![NSApp isActive])
+    return FALSE;
+
   /* There is no support for real desktop wide grabs, so we break
    * grabs when the application loses focus (gets deactivated).
    */