Remove pointless logging for unhandled events. Activate the application on

2007-06-16  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c: (find_window_for_ns_event),
	(gdk_event_translate): Remove pointless logging for unhandled events.
	Activate the application on non-left clicks, since that is only done
	for left clicks and we depend on it to get events routed properly for
	context menus and other popup windows.

svn path=/trunk/; revision=18175
This commit is contained in:
Richard Hult 2007-06-17 14:29:21 +00:00 committed by Richard Hult
parent 960b4fcd39
commit cd03a9e977
2 changed files with 26 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (find_window_for_ns_event),
(gdk_event_translate): Remove pointless logging for unhandled events.
Activate the application on non-left clicks, since that is only done
for left clicks and we depend on it to get events routed properly for
context menus and other popup windows.
2006-09-22 Dennis Cranston <dennis_cranston@yahoo.com>
* gtk/gtkfilechooserbutton.c: (change_icon_theme),

View File

@ -1266,13 +1266,9 @@ find_window_for_ns_event (NSEvent *nsevent,
}
break;
case NSAppKitDefined:
case NSSystemDefined:
/* We ignore these events */
break;
default:
NSLog(@"Unhandled event %@", nsevent);
/* Ignore everything else. */
break;
}
return NULL;
@ -1538,6 +1534,17 @@ gdk_event_translate (NSEvent *nsevent)
if (result == GDK_FILTER_REMOVE)
return TRUE;
/* We need the appliction to be activated on clicks so that popups
* like context menus get events routed properly. This is handled
* automatically for left mouse button presses but not other
* buttons, so we do it here.
*/
if ([nsevent type] == NSRightMouseDown || [nsevent type] == NSOtherMouseDown)
{
if (![NSApp isActive])
[NSApp activateIgnoringOtherApps:YES];
}
current_mask = get_event_mask_from_ns_event (nsevent);
switch ([nsevent type])
@ -1628,8 +1635,9 @@ gdk_event_translate (NSEvent *nsevent)
dx--;
}
break;
}
break;
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
@ -1645,8 +1653,10 @@ gdk_event_translate (NSEvent *nsevent)
return TRUE;
}
break;
default:
NSLog(@"Untranslated: %@", nsevent);
/* Ignore everything elsee. */
break;
}
return FALSE;