]> Pileus Git - ~andy/gtk/commitdiff
Use event_type we already have instead of regetting it
authorRichard Hult <richard@imendio.com>
Thu, 29 Jan 2009 13:02:00 +0000 (14:02 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:30 +0000 (10:15 +0200)
gdk/quartz/gdkevents-quartz.c

index 333cd846ac274e43df59d0f035d35af827270df6..d207082c875315329ea12694c36a72e6a6444163 100644 (file)
@@ -1403,7 +1403,7 @@ gdk_event_translate (GdkEvent *event,
   /* Keep track of button state, since we don't get that information
    * for key events. 
    */
-  switch ([nsevent type])
+  switch (event_type)
     {
     case NSLeftMouseDown:
     case NSRightMouseDown:
@@ -1480,9 +1480,9 @@ gdk_event_translate (GdkEvent *event,
   /* We only activate the application on click if it's not already active,
    * this matches most use cases of native apps (no click-through).
    */
-  if (([nsevent type] == NSRightMouseDown ||
-       [nsevent type] == NSOtherMouseDown ||
-       [nsevent type] == NSLeftMouseDown) && ![NSApp isActive])
+  if ((event_type == NSRightMouseDown ||
+       event_type == NSOtherMouseDown ||
+       event_type == NSLeftMouseDown) && ![NSApp isActive])
     {
       [NSApp activateIgnoringOtherApps:YES];
       return_val = FALSE;