Commit 63fe00ea authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Allow zero-sized windows to be selected from the Mac Window menu.

They show up in the taskbar on Windows 7. Selecting them from there is meaningful and useful, as is selecting them from the Window menu. In addition to just switching among windows from that menu, this is also important to recovering a minimized window if the user has configured their system preferences to minimize windows into the process's dock icon (rather than as separate dock icons).
parent 13e3219c
......@@ -89,13 +89,11 @@ static void get_cocoa_window_features(struct macdrv_win_data *data,
static inline BOOL can_activate_window(HWND hwnd)
{
LONG style = GetWindowLongW(hwnd, GWL_STYLE);
RECT rect;
if (!(style & WS_VISIBLE)) return FALSE;
if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE;
if (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_NOACTIVATE) return FALSE;
if (hwnd == GetDesktopWindow()) return FALSE;
if (GetWindowRect(hwnd, &rect) && IsRectEmpty(&rect)) return FALSE;
return !(style & WS_DISABLED);
}
......@@ -112,9 +110,10 @@ static void get_cocoa_window_state(struct macdrv_win_data *data,
state->no_activate = !can_activate_window(data->hwnd);
state->floating = (ex_style & WS_EX_TOPMOST) != 0;
state->excluded_by_expose = state->excluded_by_cycle =
IsRectEmpty(&data->window_rect) ||
(!(ex_style & WS_EX_APPWINDOW) &&
(GetWindow(data->hwnd, GW_OWNER) || (ex_style & (WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE))));
if (IsRectEmpty(&data->window_rect))
state->excluded_by_expose = TRUE;
state->minimized = (style & WS_MINIMIZE) != 0;
}
......
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