mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +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;
|
continue;
|
||||||
}
|
}
|
||||||
EventAttributes attrs = GetEventAttributes(currentEvent);
|
EventAttributes attrs = GetEventAttributes(currentEvent);
|
||||||
|
UInt32 eventKind = GetEventKind(currentEvent);
|
||||||
|
bool osCocoaEvent =
|
||||||
|
((GetEventClass(currentEvent) == 'cgs ') &&
|
||||||
|
((eventKind == NSAppKitDefined) || (eventKind == NSSystemDefined)));
|
||||||
// If attrs is kEventAttributeUserEvent or kEventAttributeMonitored
|
// If attrs is kEventAttributeUserEvent or kEventAttributeMonitored
|
||||||
// (i.e. a user input event), we shouldn't process it here while
|
// (i.e. a user input event), we shouldn't process it here while
|
||||||
// aMayWait is false.
|
// aMayWait is false. Likewise if currentEvent will eventually be
|
||||||
if (attrs != kEventAttributeNone) {
|
// 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),
|
// Since we can't process the next event here (while aMayWait is false),
|
||||||
// we want moreEvents to be false on return.
|
// we want moreEvents to be false on return.
|
||||||
eventProcessed = false;
|
eventProcessed = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user