win32: Use an invisible cursor when cursor-visible is FALSE
The win32 backend now handles the WM_SETCURSOR message and sets a fully transparent cursor if the cursor-visible property has been cleared on the stage. The icon is stored in the library via a resource file. The instance handle for the DLL is needed to load the resource so there is now a DllMain function to grab the handle.
This commit is contained in:
@ -616,6 +616,20 @@ message_translate (ClutterBackend *backend,
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
/* If the cursor is in the window's client area and the stage's
|
||||
cursor should be invisible then we'll set a blank cursor
|
||||
instead */
|
||||
if (LOWORD (msg->lParam) == HTCLIENT && !stage_win32->is_cursor_visible)
|
||||
{
|
||||
if (call_def_window_proc)
|
||||
*call_def_window_proc = FALSE;
|
||||
_clutter_stage_win32_update_cursor (stage_win32);
|
||||
}
|
||||
|
||||
res = FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* ignore every other message */
|
||||
res = FALSE;
|
||||
|
Reference in New Issue
Block a user