[Xquartz-dev] Mouse focus issue...
Jeremy Huddleston
jeremyhu at apple.com
Thu Sep 29 10:07:24 PDT 2011
On Sep 29, 2011, at 07:19, doh123 wrote:
> I'm trying to figure out how this works, because I got my problem fixed, but I'm trying to understand the code here…
>
> an excerpt from X11Application.m
> .
> .
> .
> case NSAppKitDefined:
> switch ([e subtype]) {
> static BOOL x_was_active = NO;
> case NSApplicationActivatedEventType:
> for_x = NO;
> if ([e window] == nil && x_was_active) {
> BOOL order_all_windows = YES, workspaces, ok;
> for_appkit = NO;
> .
> .
> .
>
> is that "if" statement ever getting used? If I take out the "&& x_was_active" part my problem goes away and the focus works fine without quartz-wm… but I'm trying to figure out why x_was_active is set to NO, then automatically checked if its YES …? I'm probably missing something I'm sure.
x_was_active is static. It is set to yes at the bottom of that patch in:
@@ -381,7 +385,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
case NSApplicationDeactivatedEventType:
for_x = NO;
- [self activateX:NO];
+
+ x_was_active = _x_active;
+ if(_x_active)
+ [self activateX:NO];
break;
}
break;
More information about the Xquartz-dev
mailing list