1
0
Fork 0
Commit graph

11 commits

Author SHA1 Message Date
Neil Roberts
1fcddb3b10 [win32] Track mouse leave messages
Bug 1178 - No enter / leave events on actors when pointer leaves the
           stage window

This patch causes the Win32 backend to emit CLUTTER_LEAVE events when
a WM_MOUSELEAVE event is received in the same way that f505536 does
for the X11 backend.

Windows will only send WM_MOUSELEAVE events if they are previously
requested using TrackMouseEvent so this needs to be called whenever
the mouse enters the window. There is no WM_MOUSELEAVE event but we
can detect when the mouse enters because we get a WM_MOUSEMOVE event.
2009-02-16 12:46:37 +00:00
Neil Roberts
3fb00f9cdd 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 16:00:31 +00:00
Neil Roberts
cd7b7c9c72 Bug 1091 - WM_MOUSEWHEEL (scroll-event) not handled correctlly
* clutter/win32/clutter-event-win32.c (message_translate): The
	coordinates in a WM_MOUSEWEEL message are given relative to the
	screen so they need to be converted to client coordinates before
	use. Thanks to Roman Yazmin.
2008-08-07 20:34:37 +00:00
Neil Roberts
06d0696874 * clutter/x11/clutter-event-x11.c:
* clutter/win32/clutter-event-win32.c: Use the HAVE_CONFIG_H guard
	around #include "config.h"
2008-06-30 16:01:56 +00:00
Neil Roberts
e4304e2d0a * clutter/win32/clutter-stage-win32.c: Updated to the new layout
API. All code to do with positioning the stage has been removed so
	the window is left where Windows wants to put it and it can not be
	moved with clutter_actor_set_position.

	* clutter/win32/clutter-stage-win32.h (ClutterStageWin32): Remove
	win_xpos and win_ypos.

	* clutter/win32/clutter-event-win32.c (message_translate): Remove
	the handler for WM_MOVE because the stage no longer cares where it
	is positioned.
2008-06-12 12:12:25 +00:00
Neil Roberts
bfaacb10bf * clutter/win32/clutter-event-win32.c (message_translate): Fix
signedness of old_xpos and old_ypos to get rid of compiler
	warnings.

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_get_features): Cast the result of
	glGetString to a signed char pointer to avoid compiler warnings.
2008-05-16 09:47:37 +00:00
Neil Roberts
3d1f2a0859 Added support for foreign windows to the Win32 backend.
* clutter/win32/clutter-stage-win32.c
	(clutter_stage_win32_request_coords): Don't resize foreign
	windows.
	(clutter_stage_win32_unrealize): Don't destroy foreign windows.
	(clutter_stage_win32_init): Added initialiser for is_foreign_win.
	(clutter_win32_get_stage_from_window): Resort to looking in the
	stage list if the window isn't the right window class so that it
	can still find stages with foreign windows.
	(clutter_win32_set_stage_foreign): New public function to set a
	foreign window for a stage.

	* clutter/win32/clutter-event-win32.c
	(clutter_win32_disable_event_retrieval): New public function to
	disable event retrieval.
	(message_translate): Don't handle WM_SIZE or WM_MOVE for foreign
	windows.

	* clutter/win32/clutter-backend-win32.h (struct
	_ClutterBackendWin32): Added a flag to disable event retrieval

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_ensure_context): Update debug note to
	include whether the stage is foreign or not.
2008-04-15 16:12:37 +00:00
Neil Roberts
0b8a500fca Upgraded the Win32 backend to work with the multi-stage
subclassing code.

	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: Now inherits from
	ClutterGroup and implements ClutterStageWindow instead of
	inheriting directly from ClutterStage.

	* clutter/win32/clutter-event-win32.c (message_translate): Now
	takes an extra parameter to return whether DefWindowProc should be
	called. This is needed to prevent the default WM_CLOSE handler
	from destroying the window.

	* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_dispose): Destroy all of the stages using
	g_slist_foreach as per bug #871. Now also destroys the GL context.
	(clutter_backend_win32_get_features): Added assertions to ensure
	there is a valid GL context.
	(clutter_backend_win32_ensure_context): Accepts NULL stage. Gets
	implementation pointer from the stage.
2008-04-13 08:43:32 +00:00
Neil Roberts
1a263dca5c 2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-win32.h: 
	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: 
	* clutter/win32/clutter-event-win32.c: 
	* clutter/win32/clutter-backend-win32.h: 
	* clutter/win32/clutter-backend-win32.c:
	Upgraded for multi-stage support.

	* clutter/win32/clutter-stage-win32.c
	(clutter_stage_win32_request_coords): Fixed so that it doesn't set
	the position or size if it hasn't changed. This was causing
	problems when the window was resized using the top left corner. In
	that case the window receives resize and move messages separately
	which caused the window to flash at a different size or position
	while one message was handled before the other.
	(clutter_stage_win32_realize): Added PFD_GENERIC_ACCELERATED to
	the list of pixel format flags to force it to use hardware
	acceleration.

2008-03-30  Neil Roberts  <neil@o-hand.com>

	* clutter-sections.txt: Added clutter_win32_get_stage_from_window
2008-03-30 16:51:01 +00:00
Neil Roberts
9b52136be4 2008-03-26 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-event-win32.c (clutter_event_check):
	Removed the pointless parameter in the call to check_msg_pending.
	(check_msg_pending): Fixed to use PeekMessageW instead of
	PeekMessage.
2008-03-26 10:58:12 +00:00
Neil Roberts
051ed6b43b 2008-03-25 Neil Roberts <neil@o-hand.com>
Added a native Win32 WGL backend.

	* configure.ac: Added the 'win32' flavour.

	* clutter/cogl/gl/cogl.c (cogl_get_proc_address): Added an ifdef
	to use wglGetProcAddress with the Win32 backend.

	* clutter/Makefile.am (DIST_SUBDIRS): Added the win32 directory.

	* clutter/win32/clutter-win32.pc.in:
	* clutter/win32/clutter-win32.h: 
	* clutter/win32/clutter-stage-win32.h: 
	* clutter/win32/clutter-stage-win32.c: 
	* clutter/win32/clutter-event-win32.c: 
	* clutter/win32/clutter-backend-win32.h: 
	* clutter/win32/Makefile.am:
	* clutter/win32/clutter-backend-win32.c: New files.
2008-03-25 15:42:50 +00:00