Commit 125793df authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 2472e81c
......@@ -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;
}
......
......@@ -1516,13 +1516,10 @@ void X11DRV_SetFocus( HWND hwnd )
{
Display *display = thread_display();
struct x11drv_win_data *data;
XWindowAttributes win_attr;
/* 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;
XWindowChanges changes;
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment