Don't leak blank_cursor on warp (X11)

Also, for completeness, unref cur_cursor which we ref'd before hiding
it.
This commit is contained in:
Johannes Maibaum 2024-02-29 10:44:48 +01:00 committed by Seth Hillbrand
parent 48130c6982
commit 15e963bb32
1 changed files with 7 additions and 1 deletions

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
@ -591,4 +597,4 @@ wxPoint KIPLATFORM::UI::GetMousePosition()
}
#endif
#endif