Module: wine Branch: master Commit: 63fe00eae7b3388d10a98ed0e99718fcbcb2905c URL: http://source.winehq.org/git/wine.git/?a=commit;h=63fe00eae7b3388d10a98ed0e9...
Author: Ken Thomases ken@codeweavers.com Date: Fri Oct 4 00:17:17 2013 -0500
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).
---
dlls/winemac.drv/window.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 98d8695..2c71a1e 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -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; }