[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFA: [NSWindow -update] should not cause display

From: Alexander Malmberg
Subject: Re: RFA: [NSWindow -update] should not cause display
Date: Sun, 23 Feb 2003 13:30:39 +0100

Benhur Stein wrote:
> Citando Adam Fedor <address@hidden>:
> > Alexander Malmberg wrote:
> > > I would like to remove the display code from [NSWindow -update] to fix
> > > this. [NSApplication -updateWindows] would also be changed to send
> > > -update to all windows, not just the visible windows. Since this is a
> > > somewhat tricky issue, I thought I'd bring it up for discussion first.
> > > Comments are welcome. :)
> >
> > What'a the status of this?  It seems like a good idea to me.

I've committed it. It's a small change, so I've attached the patch for

> The GNUstep I'm using has no drawing in -update and has the patches I've
> sent for flushing, and I only noticed some glitches in display
> (for example, when keeping arrow-down (or up) pressed in the browser of
> GWorkspace in a directory with lots of files, some screen updates are
> missed, but at the end, the screen is ok).

If events arrive faster than they can be handled and stuff redrawn
because of them, the runloop will never get around to calling
performers. Redraw only happens after an event has arrived, been
handled, and there are no more events.

I'm not really sure whether this is a good thing or not. The missed
updates are bit annoying. On the other hand, forcing display after every
event would cause the handling and display of events to lag behind the
actual events, so after you release the key, events will continue to
arrive for another couple of seconds. In the end, I think skipping a few
displays but making sure that displays keep up with the event stream is

> Benhur

- Alexander Malmberg
Index: NSWindow.m
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSWindow.m,v
retrieving revision 1.266
diff -u -r1.266 NSWindow.m
--- NSWindow.m  23 Feb 2003 04:38:49 -0000      1.266
+++ NSWindow.m  23 Feb 2003 12:13:22 -0000
@@ -96,7 +96,10 @@
 @implementation        NSWindow (GNUstepPrivate)
 - (void) _handleWindowNeedsDisplay: (id)bogus
-  [self displayIfNeeded];
+  if (_f.is_autodisplay && _rFlags.needs_display)
+    {
+      [self displayIfNeeded];
+    }
 /* We get here if we were ordered out or miniaturized. In this case if
@@ -1821,13 +1824,6 @@
 - (void) update
-  /*
-   *   if autodisplay is enabled and window display
-   */
-  if (_f.is_autodisplay && _rFlags.needs_display)
-    {
-      [self displayIfNeeded];
-    }
   [nc postNotificationName: NSWindowDidUpdateNotification object: self];

reply via email to

[Prev in Thread] Current Thread [Next in Thread]