@@ -50,6 +50,9 @@ public:
/// Returns the native window handle.
virtual void* handle() = 0;
+ /// Sets whether to @a show the cursor.
+ virtual void show_cursor(bool show) = 0;
+
virtual void bgfx_setup() = 0;
static Window* create(Allocator& a);
@@ -249,6 +249,10 @@ public:
{
}
+ void show_cursor(bool /*show*/)
+ {
+ }
void* handle()
return NULL;
@@ -612,6 +612,14 @@ public:
return (void*)(uintptr_t)_x11_window;
+ void show_cursor(bool show)
+ XDefineCursor(_x11_display
+ , _x11_window
+ , show ? None : _x11_hidden_cursor
+ );
};
Window* Window::create(Allocator& a)
@@ -558,6 +558,11 @@ public:
SetWindowText(_hwnd, title);
+ ShowCursor(show);
return (void*)(uintptr_t)_hwnd;