[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maintaining key window on unhide
From: |
Matt Rice |
Subject: |
Re: maintaining key window on unhide |
Date: |
Thu, 19 Oct 2006 05:03:06 -0700 (PDT) |
--- Matt Rice <ratmice@yahoo.com> wrote:
> heres some horrible patches i wouldn't even consider
> commiting
>
<snip>
this much cleaner diff seems to work...
it seems as though generic.desiredOrderedWindow only
works if theres one ordered window between event
handling
though i probably should have removed the
generic.desiredOrderedWindow stuff
and in this version i just removed the
makeKeyAndOrderFront: calls from -unhideWithoutActivation
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Index: Source/x11/XGServerWindow.m
===================================================================
--- Source/x11/XGServerWindow.m (revision 23902)
+++ Source/x11/XGServerWindow.m (working copy)
@@ -2620,6 +2620,7 @@
setNormalHints(dpy, window);
/* Set this to ignore any take focus events for this window */
generic.desiredOrderedWindow = winNum;
+ window->ignore_take_focus = YES;
}
switch (op)
Index: Source/x11/XGServerEvent.m
===================================================================
--- Source/x11/XGServerEvent.m (revision 23902)
+++ Source/x11/XGServerEvent.m (working copy)
@@ -1561,6 +1561,11 @@
NSDebugLLog(@"Focus", @"Ignoring focus request");
generic.desiredOrderedWindow = 0;
}
+ else if (cWin->ignore_take_focus == YES)
+ {
+ NSDebugLLog(@"Focus", @"Ignoring window focus request");
+ cWin->ignore_take_focus = NO;
+ }
else
{
NSPoint eventLocation;
Index: Headers/x11/XGServerWindow.h
===================================================================
--- Headers/x11/XGServerWindow.h (revision 23902)
+++ Headers/x11/XGServerWindow.h (working copy)
@@ -111,6 +111,7 @@
XIC ic;
void *gdriver; /* gdriver ident. Managed by gdriver */
int gdriverProtocol; /* Managed by gdriver */
+ BOOL ignore_take_focus;
} gswindow_device_t;
#define GET_XDRAWABLE(win) ((win)->buffer ? (win)->buffer: (win)->ident)
Index: Source/NSApplication.m
===================================================================
--- Source/NSApplication.m (revision 23902)
+++ Source/NSApplication.m (working copy)
@@ -1167,6 +1167,12 @@
[[_inactive objectAtIndex: i] orderFrontRegardless];
}
[_inactive removeAllObjects];
+
+ if (_unhide_on_activation)
+ {
+ [self unhide: nil];
+ }
+
if ([self keyWindow] == nil && _hidden_key != nil
&& [[self windows] indexOfObjectIdenticalTo: _hidden_key] != NSNotFound)
{
@@ -1174,11 +1180,6 @@
_hidden_key = nil;
}
- if (_unhide_on_activation)
- {
- [self unhide: nil];
- }
-
if ([self keyWindow] != nil)
{
[[self keyWindow] orderFront: self];
@@ -2314,12 +2315,6 @@
[[_hidden objectAtIndex: i] orderFrontRegardless];
}
[_hidden removeAllObjects];
- if (_hidden_key != nil
- && [[self windows] indexOfObjectIdenticalTo: _hidden_key] != NSNotFound)
- {
- [_hidden_key makeKeyAndOrderFront: self];
- _hidden_key = nil;
- }
[[_app_icon_window contentView] setNeedsDisplay: YES];
info = [self _notificationUserInfo];