this);
if(!priv->window)
throw system_error("CreateWindowEx");
+
+ priv->cursor_in_client_area = false;
+ priv->cursor_visible = true;
}
void Window::platform_cleanup()
void Window::show_cursor(bool s)
{
- ShowCursor(s);
+ priv->cursor_visible = s;
+ if(priv->cursor_in_client_area && !s)
+ SetCursor(NULL);
}
void Window::warp_pointer(int, int)
case WM_KILLFOCUS:
signal_lost_focus.emit();
break;
+ case WM_SETCURSOR:
+ priv->cursor_in_client_area = (LOWORD(evnt.lparam)==HTCLIENT);
+ if(priv->cursor_in_client_area && !priv->cursor_visible)
+ SetCursor(NULL);
+ else
+ return false;
+ break;
default:
return false;
}