Alexandre Julliard : winex11: Child windows don'
t get activated even when requested, so don't make them managed either.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 27 06:07:48 CDT 2007
Module: wine
Branch: master
Commit: effdfa7da44f829a1a08929760081e02541897d7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=effdfa7da44f829a1a08929760081e02541897d7
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Aug 27 12:37:14 2007 +0200
winex11: Child windows don't get activated even when requested, so don't make them managed either.
---
dlls/winex11.drv/window.c | 5 ++++-
dlls/winex11.drv/winpos.c | 4 +---
dlls/winex11.drv/x11drv.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index f7a0909..24f89f8 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -66,7 +66,7 @@ static const char visual_id_prop[] = "__wine_x11_visual_id";
*
* Check if a given window should be managed
*/
-BOOL is_window_managed( HWND hwnd, const RECT *window_rect )
+BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect )
{
DWORD style, ex_style;
@@ -76,6 +76,9 @@ BOOL is_window_managed( HWND hwnd, const RECT *window_rect )
/* child windows are not managed */
style = GetWindowLongW( hwnd, GWL_STYLE );
if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE;
+ /* activated windows are managed */
+ if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) return TRUE;
+ if (hwnd == GetActiveWindow()) return TRUE;
/* windows with caption are managed */
if ((style & WS_CAPTION) == WS_CAPTION) return TRUE;
/* tool windows are not managed */
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 5499ef0..085396c 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -252,9 +252,7 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
root_window == DefaultRootWindow( display ) &&
data->whole_window != root_window)
{
- if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) ||
- is_window_managed( hwnd, rectWindow ) ||
- hwnd == GetActiveWindow())
+ if (is_window_managed( hwnd, swp_flags, rectWindow ))
{
TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window );
make_managed = TRUE;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8594e20..1583411 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -684,7 +684,7 @@ typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void
extern void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg );
extern int X11DRV_check_error(void);
-extern BOOL is_window_managed( HWND hwnd, const RECT *window_rect );
+extern BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect );
extern void X11DRV_set_iconic_state( HWND hwnd );
extern void X11DRV_window_to_X_rect( struct x11drv_win_data *data, RECT *rect );
extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect );
More information about the wine-cvs
mailing list