mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
* Source/win32/WIN32Server.m: Update -windowlist implementation.
* Source/x11/XGServerWindow.m (-orderwin:::): Replace desiredOrderedWindow with ignore_take_focus. (windowlist): Implement. (setinputfocus:): Replace desiredOrderedWindow with ignore_take_focus. * Headers/x11/XGGeneric.h (XGGeneric): Remove desiredOrderedWindow. * Headers/x11/XGServerWindow.h (gswindow_device_t): Add ignore_take_focus. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23937 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d4ec929e5e
commit
b684db215f
6 changed files with 55 additions and 11 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-10-21 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/win32/WIN32Server.m: Update -windowlist implementation.
|
||||
* Source/x11/XGServerWindow.m (-orderwin:::): Replace
|
||||
desiredOrderedWindow with ignore_take_focus.
|
||||
(windowlist): Implement.
|
||||
(setinputfocus:): Replace desiredOrderedWindow with ignore_take_focus.
|
||||
* Headers/x11/XGGeneric.h (XGGeneric): Remove desiredOrderedWindow.
|
||||
* Headers/x11/XGServerWindow.h (gswindow_device_t):
|
||||
Add ignore_take_focus.
|
||||
|
||||
2006-10-15 22:48-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/gsc/GSStreamContext.m: GSRectClipList() copied
|
||||
|
|
|
@ -89,7 +89,6 @@ struct XGGeneric {
|
|||
long currentFocusWindow;
|
||||
long desiredFocusWindow;
|
||||
unsigned long focusRequestNumber;
|
||||
unsigned long desiredOrderedWindow;
|
||||
unsigned char lMouse;
|
||||
unsigned char mMouse;
|
||||
unsigned char rMouse;
|
||||
|
|
|
@ -111,6 +111,7 @@ typedef struct _gswindow_device_t {
|
|||
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)
|
||||
|
|
|
@ -1872,7 +1872,8 @@ printf("\n\n##############################################################\n");
|
|||
|
||||
- (NSArray *) windowlist
|
||||
{
|
||||
return nil;
|
||||
// FIXME
|
||||
return [super windowlist];
|
||||
}
|
||||
|
||||
- (int) windowdepth: (int) winNum
|
||||
|
|
|
@ -1540,6 +1540,11 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
|
|||
window to take focus after each one gets hidden. */
|
||||
NSDebugLLog(@"Focus", @"WM take focus while hiding");
|
||||
}
|
||||
else if (cWin->ignore_take_focus == YES)
|
||||
{
|
||||
NSDebugLLog(@"Focus", @"Ignoring window focus request");
|
||||
cWin->ignore_take_focus = NO;
|
||||
}
|
||||
else if (cWin->number == key_num)
|
||||
{
|
||||
NSDebugLLog(@"Focus", @"Reasserting key window");
|
||||
|
@ -1555,12 +1560,6 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
|
|||
NSDebugLLog(@"Focus", @"Key window is already %d", key_num);
|
||||
[GSServerForWindow(key_win) setinputfocus: key_num];
|
||||
}
|
||||
else if (generic.desiredOrderedWindow == cWin->number)
|
||||
{
|
||||
/* We just want to order the window, not give it focus */
|
||||
NSDebugLLog(@"Focus", @"Ignoring focus request");
|
||||
generic.desiredOrderedWindow = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSPoint eventLocation;
|
||||
|
|
|
@ -2619,7 +2619,7 @@ static BOOL didCreatePixmaps;
|
|||
window->siz_hints.y);
|
||||
setNormalHints(dpy, window);
|
||||
/* Set this to ignore any take focus events for this window */
|
||||
generic.desiredOrderedWindow = winNum;
|
||||
window->ignore_take_focus = YES;
|
||||
}
|
||||
|
||||
switch (op)
|
||||
|
@ -3035,7 +3035,41 @@ static BOOL didCreatePixmaps;
|
|||
|
||||
- (NSArray *) windowlist
|
||||
{
|
||||
return nil;
|
||||
gswindow_device_t *rootWindow;
|
||||
Window *windowOrder;
|
||||
gswindow_device_t *tmp;
|
||||
NSMutableArray *ret;
|
||||
int c;
|
||||
static Atom client_stack_atom = None;
|
||||
|
||||
if (!client_stack_atom)
|
||||
client_stack_atom = XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", False);
|
||||
|
||||
rootWindow = [self _rootWindowForScreen:0];
|
||||
|
||||
windowOrder = (Window *)PropGetCheckProperty(dpy, rootWindow->ident,
|
||||
client_stack_atom,
|
||||
XA_WINDOW, 32, -1, &c);
|
||||
if (windowOrder == NULL || !c)
|
||||
{
|
||||
return [super windowlist];
|
||||
}
|
||||
|
||||
ret = [NSMutableArray array];
|
||||
|
||||
while (c-- > 0)
|
||||
{
|
||||
tmp = [[self class] _windowForXWindow:windowOrder[c]];
|
||||
/* CLIENT_LIST_STACKING returns all windows on the server, we're only
|
||||
* interested in the ones which are ours. */
|
||||
if (tmp)
|
||||
{
|
||||
[ret addObject:[NSNumber numberWithInt:tmp->number]];
|
||||
}
|
||||
}
|
||||
|
||||
XFree(windowOrder);
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (int) windowdepth: (int)win
|
||||
|
@ -3328,7 +3362,6 @@ static BOOL didCreatePixmaps;
|
|||
NSDebugLLog(@"Focus", @"Setting focus to %d", window->number);
|
||||
generic.desiredFocusWindow = win;
|
||||
generic.focusRequestNumber = XNextRequest(dpy);
|
||||
generic.desiredOrderedWindow = 0;
|
||||
XSetInputFocus(dpy, window->ident, RevertToParent, generic.lastTime);
|
||||
[inputServer ximFocusICWindow: window];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue