mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1013852 - Clicking doesn't focus the window sometimes. r=mstange
This commit is contained in:
parent
c28a196416
commit
6b447e78bc
@ -484,10 +484,17 @@ nsAppShell::ProcessNextNativeEvent(bool aMayWait)
|
||||
continue;
|
||||
}
|
||||
EventAttributes attrs = GetEventAttributes(currentEvent);
|
||||
UInt32 eventKind = GetEventKind(currentEvent);
|
||||
bool osCocoaEvent =
|
||||
((GetEventClass(currentEvent) == 'cgs ') &&
|
||||
((eventKind == NSAppKitDefined) || (eventKind == NSSystemDefined)));
|
||||
// If attrs is kEventAttributeUserEvent or kEventAttributeMonitored
|
||||
// (i.e. a user input event), we shouldn't process it here while
|
||||
// aMayWait is false.
|
||||
if (attrs != kEventAttributeNone) {
|
||||
// aMayWait is false. Likewise if currentEvent will eventually be
|
||||
// turned into an OS-defined Cocoa event. Doing otherwise risks
|
||||
// doing too much work here, and preventing the event from being
|
||||
// properly processed as a Cocoa event.
|
||||
if ((attrs != kEventAttributeNone) || osCocoaEvent) {
|
||||
// Since we can't process the next event here (while aMayWait is false),
|
||||
// we want moreEvents to be false on return.
|
||||
eventProcessed = false;
|
||||
|
Loading…
Reference in New Issue
Block a user