discuss-gnustep
[Top][All Lists]
Advanced

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

RE: sendEvent: disable/enableflushWindow & _handleWindowNeedsDisplay:


From: David Ayers
Subject: RE: sendEvent: disable/enableflushWindow & _handleWindowNeedsDisplay:
Date: Sat, 29 Jun 2002 13:11:24 +0200

Sorry,

OK, it was late and I failed to do the necessary testing (was just too
convinced it should work. (And it did in my test case)
But the "patch" is disasterous for scrolling. :-(

Maybe I'll come up with something else...

Later,
DAve


> -----Original Message-----
> From: discuss-gnustep-admin@gnu.org
> [mailto:discuss-gnustep-admin@gnu.org]On Behalf Of David Ayers
> Sent: Saturday, June 29, 2002 2:38 AM
> To: GNUStep
> Cc: nicola@brainstorm.co.uk
> Subject: sendEvent: disable/enableflushWindow &
> _handleWindowNeedsDisplay:
>
>
> Allright,
>
> My tests on NSBackingStoreNonretained windows on OPENSTEP 4.2 Enterprise
> were not very fruitfull. Just trying to click into NSTextFields does not
> produce expected responses. (It seems like it's hanging.) The logging
> reveals similar methods being invoked, but the selection isn't seen on
> screen. I believe this is badly brocken. Could someone confirm this
> behavior?
>
> Anyway, I'm also feeling rather confident that this is the fix we are
> looking for and it seems to behave very well:
>
> NSWindow:
>
> -(void)sendEvent:(NSEvent *)theEvent
> {
> ...
>         if (_f.has_closed == NO)
>           {
> +           [self disableFlushWindow];
> +           NS_DURING
>               if (_f.is_key == NO)
>                 {
>                   [self makeKeyAndOrderFront: self];
>                 }
>               v = [_contentView hitTest: [theEvent locationInWindow]];
>               if (_firstResponder != v)
>                 {
>                   [self makeFirstResponder: v];
>                 }
>               if (wasKey == YES || [v acceptsFirstMouse: theEvent] == YES)
>                 {
>                   if ([NSHelpManager isContextHelpModeActive])
>                     {
>                       [v helpRequested: theEvent];
>                     }
>                   else
>                     {
>                       [v mouseDown: theEvent];
>                     }
>                 }
>               else
>                 {
>                   [self mouseDown: theEvent];
>                 }
> +           NS_HANDLER
> +             [self enableFlushWindow];
> +             [localException raise];
> +           NS_ENDHANDLER
> +             [self enableFlushWindow];
>           }
> ...
> }
>
> - (void) _handleWindowNeedsDisplay: (id)bogus
> {
> + if (_disableFlushWindow)
> +   {
> +     [[NSRunLoop currentRunLoop]
> +        performSelector: @selector(_handleWindowNeedsDisplay:)
> +                 target: self
> +               argument: nil
> +                  order: 600000
> +                  modes: [NSArray arrayWithObjects:
> +                          NSDefaultRunLoopMode,
> +                          NSModalPanelRunLoopMode,
> +                          NSEventTrackingRunLoopMode, nil]];
> +   }
> + else
> +   {
>       [self displayIfNeeded];
> +   }
> }
>
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://mail.gnu.org/mailman/listinfo/discuss-gnustep
>




reply via email to

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