discuss-gnustep
[Top][All Lists]
Advanced

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

Re: View hierarchy problem


From: Andreas Höschler
Subject: Re: View hierarchy problem
Date: Wed, 22 Aug 2007 23:59:34 +0200

Hi Fred,

I have tried the following:

             v = nil;// [_wv hitTest:[theEvent locationInWindow]];
if (_f.is_key == NO && _windowLevel != NSDesktopWindowLevel)
        {
          /* NSPanel modification: check becomesKeyOnlyIfNeeded. */
          if (![self becomesKeyOnlyIfNeeded]
              || [v needsPanelToBecomeKey])
            [self makeKeyAndOrderFront: self];
        }
              v = [_wv hitTest:[theEvent locationInWindow]];
          /* Activate the app *after* making the receiver key, as app
         activation tries to make the previous key window key. */
          if ([NSApp isActive] == NO && self != [NSApp iconWindow])
        {
          [NSApp activateIgnoringOtherApps: YES];
        }
          if (_firstResponder != v)
        {
                 [self makeFirstResponder: v];
        }

This solves the issue. The app no longer dies. However, what do we do
with [v needsPanelToBecomeKey]?


True, this really is a problem and to call htiText: twice each time, in most cases with the same result sounds wrong to me. We could retain the
view and add a test if the found view is still a descendent of the
content view. But even in that case the view could have been moved
around by the activation code. I am really not sure if we should support rearranging views in the activation, but if Apple does, we may have to.


I found a way that seems OK to me. Please give it a try.

I gave it a try and it seems to fix the problem. Thanks a lot!

While doubleclicking back and forth on my Finder application I realized that the menu of the launched application sometimes is not drawn. I just see a white square where the menu items should appear. As soon as I move the mouse pointer over the white square the menu is drawn!

I first thaught that was somehow related to your fix but it is not. After removing your fix I got the same behaviour. Not always but sometimes the menu is not correctly drawn and needs the mouse over it to trigger (re)display.

Regards,

  Andreas






reply via email to

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