restore non-default cursors in native widgets when unsetting wxCursor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-02-01 18:26:21 +00:00
parent 9093f22cdf
commit 602d813a40

View File

@@ -3695,6 +3695,17 @@ void wxWindowGTK::GTKUpdateCursor(bool, bool)
gdk_window_set_cursor(window, cursor);
}
}
if (window && cursor == NULL && m_wxwindow == NULL)
{
void* data;
gdk_window_get_user_data(window, &data);
if (data)
{
// encourage native widget to restore any non-default cursors
GtkStateType state = gtk_widget_get_state(GTK_WIDGET(data));
g_signal_emit_by_name(data, "state-changed", state);
}
}
}
void wxWindowGTK::WarpPointer( int x, int y )