Don't leak blank_cursor on warp (X11)

Also, for completeness, unref cur_cursor which we ref'd before hiding
it.

(cherry picked from commit 15e963bb32)
This commit is contained in:
Johannes Maibaum
2025-01-02 17:25:29 -08:00
committed by Seth Hillbrand
parent 049c555e7e
commit 9ff380a137
+7 -1
View File
@@ -301,6 +301,12 @@ bool KIPLATFORM::UI::WarpPointer( wxWindow* aWindow, int aX, int aY )
aWindow->WarpPointer( aX, aY );
gdk_window_set_cursor( win, cur_cursor );
if( cur_cursor )
g_object_unref( cur_cursor );
if( blank_cursor )
g_object_unref( blank_cursor );
return true;
}
#endif
@@ -603,4 +609,4 @@ wxPoint KIPLATFORM::UI::GetMousePosition()
}
#endif
#endif