* use requested value of fullscreen state in clutter_stage_win32_set_fullscreen instead of old value

https://bugzilla.gnome.org/show_bug.cgi?id=690836
This commit is contained in:
Wouter Paesen 2012-12-28 21:55:51 +01:00 committed by Emmanuele Bassi
parent 8b357ec077
commit aa85a8e94d

View File

@ -267,12 +267,13 @@ clutter_stage_win32_set_cursor_visible (ClutterStageWindow *stage_window,
}
static LONG
get_window_style (ClutterStageWin32 *stage_win32)
get_requested_window_style (ClutterStageWin32 *stage_win32,
gboolean want_fullscreen)
{
ClutterStage *wrapper = stage_win32->wrapper;
/* Fullscreen mode shouldn't have any borders */
if (_clutter_stage_is_fullscreen (wrapper))
if (want_fullscreen)
return WS_POPUP;
/* Otherwise it's an overlapped window but if it isn't resizable
then it shouldn't have a thick frame */
@ -282,6 +283,15 @@ get_window_style (ClutterStageWin32 *stage_win32)
return WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX;
}
static LONG
get_window_style (ClutterStageWin32 *stage_win32)
{
ClutterStage *wrapper = stage_win32->wrapper;
return get_requested_window_style (stage_win32,
_clutter_stage_is_fullscreen (wrapper));
}
static void
clutter_stage_win32_set_user_resize (ClutterStageWindow *stage_window,
gboolean value)
@ -327,7 +337,7 @@ clutter_stage_win32_set_fullscreen (ClutterStageWindow *stage_window,
{
/* Update the window style but preserve the visibility */
SetWindowLongW (hwnd, GWL_STYLE,
get_window_style (stage_win32)
get_requested_window_style (stage_win32, value)
| (old_style & WS_VISIBLE));
/* Update the window size */
if (value)