mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:50:48 +00:00
Only set the current event when dequeuing and never return the
null_event. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28938 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83e26ad83f
commit
c353a6b67b
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-11-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSApplication.m (-nextEventMatchingMask:...): Only set
|
||||||
|
the current event when dequeuing and never return the null_event.
|
||||||
|
|
||||||
2009-11-02 Fred Kiefer <FredKiefer@gmx.de>
|
2009-11-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/GSTheme.m: Remove some compiler warnings.
|
* Source/GSTheme.m: Remove some compiler warnings.
|
||||||
|
|
|
@ -1514,7 +1514,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
inMode: NSDefaultRunLoopMode
|
inMode: NSDefaultRunLoopMode
|
||||||
dequeue: YES];
|
dequeue: YES];
|
||||||
|
|
||||||
if (e != nil && e != null_event)
|
if (e != nil)
|
||||||
{
|
{
|
||||||
NSEventType type = [e type];
|
NSEventType type = [e type];
|
||||||
|
|
||||||
|
@ -2105,6 +2105,12 @@ See -runModalForWindow:
|
||||||
else
|
else
|
||||||
event = DPSPeekEvent(GSCurrentServer(), mask, expiration, mode);
|
event = DPSPeekEvent(GSCurrentServer(), mask, expiration, mode);
|
||||||
|
|
||||||
|
if (event == null_event)
|
||||||
|
{
|
||||||
|
// Never return the null_event
|
||||||
|
event = nil;
|
||||||
|
}
|
||||||
|
|
||||||
if (event)
|
if (event)
|
||||||
{
|
{
|
||||||
IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
|
@ -2112,7 +2118,7 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
* If we are not in a tracking loop, we may want to unhide a hidden
|
* If we are not in a tracking loop, we may want to unhide a hidden
|
||||||
* because the mouse has been moved.
|
* because the mouse has been moved.
|
||||||
*/
|
*/
|
||||||
if (mode != NSEventTrackingRunLoopMode && event != null_event)
|
if (mode != NSEventTrackingRunLoopMode)
|
||||||
{
|
{
|
||||||
_windows_need_update = YES;
|
_windows_need_update = YES;
|
||||||
if ([NSCursor isHiddenUntilMouseMoves])
|
if ([NSCursor isHiddenUntilMouseMoves])
|
||||||
|
@ -2129,7 +2135,8 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIGN(_current_event, event);
|
if (flag)
|
||||||
|
ASSIGN(_current_event, event);
|
||||||
}
|
}
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue