mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
winex11: Don't give focus to zero-size windows.
This commit is contained in:
parent
a1580bba70
commit
002f85a275
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue