Commit 225482f5 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Make show_window() and hide_window() tolerate being called when there's no Cocoa window.

Minor no-op refactoring that makes subsequent commits cleaner. Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent eef99122
......@@ -731,6 +731,8 @@ static struct macdrv_win_data *macdrv_create_win_data(HWND hwnd, const RECT *win
*/
static void show_window(struct macdrv_win_data *data)
{
if (data->cocoa_window)
{
HWND prev = NULL;
HWND next = NULL;
macdrv_window prev_window = NULL;
......@@ -765,6 +767,7 @@ static void show_window(struct macdrv_win_data *data)
macdrv_SetFocus(hwndFocus);
if (activate)
activate_on_focus_time = 0;
}
}
......@@ -775,6 +778,7 @@ static void hide_window(struct macdrv_win_data *data)
{
TRACE("win %p/%p\n", data->hwnd, data->cocoa_window);
if (data->cocoa_window)
macdrv_hide_cocoa_window(data->cocoa_window);
data->on_screen = FALSE;
}
......
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