7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 23:23:47 +00:00

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 2024-02-29 10:44:48 +01:00 committed by Seth Hillbrand
parent 049c555e7e
commit 9ff380a137

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