- if (display == NULL && win->m_widget)
- {
- GdkWindow* w = gtk_widget_get_window(win->m_widget);
- if (w)
- display = gdk_drawable_get_display(w);
- }
- win->GTKUpdateCursor(true, false);
- UpdateCursors(win->GetChildren(), display);
+ win->GTKUpdateCursor();
+ if (display && *display == NULL && win->m_widget)
+ *display = gtk_widget_get_display(win->m_widget);