mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Fix for #25384
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27733 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
95fc114f62
commit
a6ac3414d3
2 changed files with 25 additions and 15 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2009-01-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSApplication.m: Try to get behavior to match MacOS-X
|
||||
by moving call to -updateWindows to be done before getting the
|
||||
next event. Updating is done only if it was flagged as needing
|
||||
to be done since the last update, but if we are in NSDefaultRunLoopMode
|
||||
or NSModalRunLoopMode we automatically set the flag before handling
|
||||
each event ... so unless the application explicitly turns it off,
|
||||
it's always done in these modes.
|
||||
Should fix #25384
|
||||
|
||||
2009-01-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSParagraphStyle.m: Fix all copying code to handle
|
||||
|
|
|
@ -579,9 +579,9 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
while (!done)
|
||||
{
|
||||
theEvent = [NSApp nextEventMatchingMask: eventMask
|
||||
untilDate: theDistantFuture
|
||||
inMode: NSEventTrackingRunLoopMode
|
||||
dequeue: YES];
|
||||
untilDate: theDistantFuture
|
||||
inMode: NSEventTrackingRunLoopMode
|
||||
dequeue: YES];
|
||||
|
||||
switch ([theEvent type])
|
||||
{
|
||||
|
@ -1427,12 +1427,6 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
}
|
||||
}
|
||||
|
||||
// send an update message to all visible windows
|
||||
if (_windows_need_update)
|
||||
{
|
||||
[self updateWindows];
|
||||
}
|
||||
|
||||
DESTROY (_runLoopPool);
|
||||
}
|
||||
|
||||
|
@ -1721,10 +1715,6 @@ See Also: -runModalForWindow:
|
|||
{
|
||||
[self stopModal];
|
||||
}
|
||||
if (_windows_need_update)
|
||||
{
|
||||
[self updateWindows];
|
||||
}
|
||||
}
|
||||
RELEASE (pool);
|
||||
}
|
||||
|
@ -1963,6 +1953,10 @@ See -runModalForWindow:
|
|||
{
|
||||
NSEvent *event;
|
||||
|
||||
if (_windows_need_update)
|
||||
{
|
||||
[self updateWindows];
|
||||
}
|
||||
if (!expiration)
|
||||
expiration = [NSDate distantFuture];
|
||||
|
||||
|
@ -1980,6 +1974,7 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
|||
*/
|
||||
if (mode != NSEventTrackingRunLoopMode && event != null_event)
|
||||
{
|
||||
_windows_need_update = YES;
|
||||
if ([NSCursor isHiddenUntilMouseMoves])
|
||||
{
|
||||
NSEventType type = [event type];
|
||||
|
@ -2434,6 +2429,9 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
* Set whether the main run loop will request all visible windows update
|
||||
* themselves after the current or next event is processed. (Update occurs
|
||||
* after event dispatch in the loop.)
|
||||
* This is needed when in NSEventTrackingRunLoopMode. When the application
|
||||
* is using NSDefaultRunLoopMode or NSModalRunLoopMode windows are updated
|
||||
* after each loop iteration irrespective of this setting.
|
||||
*/
|
||||
- (void) setWindowsNeedUpdate: (BOOL)flag
|
||||
{
|
||||
|
@ -2442,8 +2440,9 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
|
||||
/**
|
||||
* Sends each of the app's visible windows an [NSWindow-update] message.
|
||||
* This method is called once per iteration of the main run loop managed
|
||||
* by -run .
|
||||
* This method is called automatically for every iteration of the run loop
|
||||
* in NSDefaultRunLoopMode or NSModalRunLoopMode, but is only called during
|
||||
* NSEventTrackingRunLoopMode if -setWindowsNeedUpdate: is set to YES.
|
||||
*/
|
||||
- (void) updateWindows
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue