restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3695,6 +3695,17 @@ void wxWindowGTK::GTKUpdateCursor()
|
|||||||
gdk_window_set_cursor(window, cursor);
|
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 )
|
void wxWindowGTK::WarpPointer( int x, int y )
|
||||||
|
Reference in New Issue
Block a user