From 64e812840998ad0cb1a90f805063a4e52dd3023e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 17 Apr 2008 16:13:12 +0200 Subject: [PATCH] winex11: Moved the MapNotify handler to event.c. --- dlls/winex11.drv/event.c | 19 +++++++++++++++++++ dlls/winex11.drv/winpos.c | 18 ------------------ dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index fc126c2cdd5..adbf585c993 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -76,6 +76,7 @@ extern BOOL ximInComposeMode; static void X11DRV_FocusIn( HWND hwnd, XEvent *event ); static void X11DRV_FocusOut( HWND hwnd, XEvent *event ); static void X11DRV_Expose( HWND hwnd, XEvent *event ); +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ); static void X11DRV_PropertyNotify( HWND hwnd, XEvent *event ); static void X11DRV_ClientMessage( HWND hwnd, XEvent *event ); @@ -711,6 +712,24 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) } +/********************************************************************** + * X11DRV_MapNotify + */ +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) +{ + struct x11drv_win_data *data; + + if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!data->mapped) return; + + if (!data->managed) + { + HWND hwndFocus = GetFocus(); + if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ + } +} + + /*********************************************************************** * get_window_wm_state */ diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 8c904ada977..43d388af925 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -478,24 +478,6 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags, } -/********************************************************************** - * X11DRV_MapNotify - */ -void X11DRV_MapNotify( HWND hwnd, XEvent *event ) -{ - struct x11drv_win_data *data; - - if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->mapped) return; - - if (!data->managed) - { - HWND hwndFocus = GetFocus(); - if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ - } -} - - struct desktop_resize_data { RECT old_screen_rect; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index b040e056384..30b339e0e0e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -642,7 +642,6 @@ extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event ); extern void X11DRV_KeyEvent( HWND hwnd, XEvent *event ); extern void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_DestroyNotify( HWND hwnd, XEvent *event ); -extern void X11DRV_MapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_ConfigureNotify( HWND hwnd, XEvent *event ); extern void X11DRV_SelectionRequest( HWND hWnd, XEvent *event ); extern void X11DRV_SelectionClear( HWND hWnd, XEvent *event );