Fix for w32 backends (ordering windows)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@18365 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-01-10 19:59:43 +00:00
parent 81dc2376f4
commit 47c37caf62
5 changed files with 18 additions and 3 deletions

View file

@ -1,9 +1,12 @@
2004-01-10 Adam Fedor <fedor@gnu.org>
* Source/x11/XGServerWindow.m ([XGServer -orderwindow:::]):
When orderWin == 0, make sure the window does not go in front
When otherWin == 0, make sure the window does not go in front
of the current key window.
* Source/win32/WIN32Server.m ([WIN -orderwindow:op:otherWin:winNum]):
Allow otherWin < 0.
2004-01-10 16:25 Alexander Malmberg <alexander@malmberg.org>
* Source/art/blit.m: Replace uses DI_16_B5G5R5A1 and DI_16_B5G6R5

View file

@ -76,6 +76,7 @@ struct XGGeneric {
long currentFocusWindow;
long desiredFocusWindow;
unsigned long focusRequestNumber;
unsigned long desiredOrderedWindow;
unsigned char lMouse;
unsigned char mMouse;
unsigned char rMouse;

View file

@ -447,8 +447,10 @@ DWORD windowStyleForGSStyle(unsigned int style)
SWP_NOSIZE | SWP_NOMOVE);
break;
case NSWindowAbove:
if (otherWin == 0)
if (otherWin <= 0)
{
/* FIXME: Need to find the current key window (otherWin == 0
means keep the window below the current key.) */
otherWin = winNum;
winNum = (int)HWND_TOP;
}

View file

@ -1300,6 +1300,12 @@ static inline int check_modifier (XEvent *xEvent, KeyCode key_code)
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;

View file

@ -1575,8 +1575,10 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
if (op != NSWindowOut && window->map_state != IsViewable)
{
XMoveWindow(dpy, window->ident, window->siz_hints.x,
window->siz_hints.y);
window->siz_hints.y);
setNormalHints(dpy, window);
/* Set this to ignore any take focus events for this window */
generic.desiredOrderedWindow = winNum;
}
switch (op)
@ -2351,6 +2353,7 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
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];
}