winex11: Move the raising of windows on SetFocus to the X11 driver where it belongs.

This commit is contained in:
Alexandre Julliard 2008-02-18 17:22:51 +01:00
parent 2472e81cea
commit 125793df0e
2 changed files with 6 additions and 14 deletions

View File

@ -113,10 +113,6 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 ))
SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0,
SMTO_ABORTIFHUNG, 2000, NULL );
if (!GetPropA( hwnd, "__wine_x11_managed" ))
SetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE );
if (!IsWindow(hwnd)) return FALSE;
}

View File

@ -1516,13 +1516,10 @@ void X11DRV_SetFocus( HWND hwnd )
{
Display *display = thread_display();
struct x11drv_win_data *data;
XWindowAttributes win_attr;
XWindowChanges changes;
/* Only mess with the X focus if there's */
/* no desktop window and if the window is not managed by the WM. */
if (root_window != DefaultRootWindow(display)) return;
if (!hwnd) /* If setting the focus to 0, uninstall the colormap */
/* If setting the focus to 0, uninstall the colormap */
if (!hwnd && root_window == DefaultRootWindow(display))
{
wine_tsx11_lock();
if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_PRIVATE)
@ -1538,11 +1535,10 @@ void X11DRV_SetFocus( HWND hwnd )
/* Set X focus and install colormap */
wine_tsx11_lock();
if (XGetWindowAttributes( display, data->whole_window, &win_attr ) &&
(win_attr.map_state == IsViewable))
changes.stack_mode = Above;
XConfigureWindow( display, data->whole_window, CWStackMode, &changes );
if (root_window == DefaultRootWindow(display))
{
/* If window is not viewable, don't change anything */
/* we must not use CurrentTime (ICCCM), so try to use last message time instead */
/* FIXME: this is not entirely correct */
XSetInputFocus( display, data->whole_window, RevertToParent,