Bug 1100 - WM_SIZE not handled correctly, user_resize and

window_style correction.

	* clutter/win32/clutter-stage-win32.c (get_window_style): Remove
	the WS_MAXIMIZEBOX style if the stage isn't resizable.
	(clutter_stage_win32_set_user_resize): Queue a redraw of the
	window frame when the user_resize property is changed.

	* clutter/win32/clutter-event-win32.c (message_translate): Don't
	update the size of the stage when handling WM_SIZE messages that
	result from the stage being minimized. Thanks to Roman Yazmin.
This commit is contained in:
Neil Roberts 2008-09-16 16:00:31 +00:00
parent 8be7e29a6b
commit 3fb00f9cdd
3 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,17 @@
2008-09-16 Neil Roberts <neil@linux.intel.com>
Bug 1100 - WM_SIZE not handled correctly, user_resize and
window_style correction.
* clutter/win32/clutter-stage-win32.c (get_window_style): Remove
the WS_MAXIMIZEBOX style if the stage isn't resizable.
(clutter_stage_win32_set_user_resize): Queue a redraw of the
window frame when the user_resize property is changed.
* clutter/win32/clutter-event-win32.c (message_translate): Don't
update the size of the stage when handling WM_SIZE messages that
result from the stage being minimized. Thanks to Roman Yazmin.
2008-09-16 Tomas Frydrych <tf@linux.intel.com>
* clutter/glx/clutter-glx-texture-pixmap.c:

View File

@ -351,7 +351,11 @@ message_translate (ClutterBackend *backend,
switch (msg->message)
{
case WM_SIZE:
if (!stage_win32->is_foreign_win)
if (!stage_win32->is_foreign_win
/* Ignore size changes resulting from the stage being
minimized - otherwise the window size will be set to
0,0 */
&& msg->wParam != SIZE_MINIMIZED)
{
WORD new_width = LOWORD (msg->lParam);
WORD new_height = HIWORD (msg->lParam);

View File

@ -258,7 +258,7 @@ get_window_style (ClutterStageWin32 *stage_win32)
else if (clutter_stage_get_user_resizable (wrapper))
return WS_OVERLAPPEDWINDOW;
else
return WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME;
return WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX;
}
static void
@ -272,6 +272,8 @@ clutter_stage_win32_set_user_resize (ClutterStageWindow *stage_window,
SetWindowLongW (hwnd, GWL_STYLE,
get_window_style (CLUTTER_STAGE_WIN32 (stage_window))
| (old_style & WS_VISIBLE));
/* Queue a redraw of the frame */
RedrawWindow (hwnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE);
}
static ClutterActor *