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:
Neil Roberts
2010-01-15 22:56:37 +00:00
parent 4db89759a0
commit 14a28620ae
10 changed files with 112 additions and 6 deletions

View File

@ -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;