Browse Source

Don't leak blank_cursor on warp (X11)

Also, for completeness, unref cur_cursor which we ref'd before hiding
it.
newinvert
Johannes Maibaum 2 years ago
committed by Seth Hillbrand
parent
commit
15e963bb32
  1. 8
      libs/kiplatform/gtk/ui.cpp

8
libs/kiplatform/gtk/ui.cpp

@ -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
Loading…
Cancel
Save