Alexandre Julliard : winex11: Don't give focus to zero-size windows.

Alexandre Julliard julliard at winehq.org
Wed Feb 1 11:23:26 CST 2012


Module: wine
Branch: master
Commit: 002f85a275c81e0797ffd244942c938643ececf6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=002f85a275c81e0797ffd244942c938643ececf6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Feb  1 15:33:51 2012 +0100

winex11: Don't give focus to zero-size windows.

---

 dlls/winex11.drv/event.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 1b3478d..99c47c8 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -520,12 +520,15 @@ DWORD EVENT_x11_time_to_win32_time(Time time)
  */
 static inline BOOL can_activate_window( HWND hwnd )
 {
+    struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
     LONG style = GetWindowLongW( hwnd, GWL_STYLE );
+
     if (!(style & WS_VISIBLE)) return FALSE;
     if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE;
     if (style & WS_MINIMIZE) return FALSE;
     if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_NOACTIVATE) return FALSE;
     if (hwnd == GetDesktopWindow()) return FALSE;
+    if (data && IsRectEmpty( &data->window_rect )) return FALSE;
     return !(style & WS_DISABLED);
 }
 




More information about the wine-cvs mailing list