avoid gdk_cursor_new(), deprecated in GTK+ 3.16
This commit is contained in:
@@ -113,7 +113,8 @@ void gtk_assert_dialog_process_backtrace (GtkAssertDialog *dlg)
|
||||
{
|
||||
/* set busy cursor */
|
||||
GdkWindow *parent = gtk_widget_get_window(GTK_WIDGET(dlg));
|
||||
GdkCursor *cur = gdk_cursor_new (GDK_WATCH);
|
||||
GdkDisplay* display = gdk_window_get_display(parent);
|
||||
GdkCursor* cur = gdk_cursor_new_for_display(display, GDK_WATCH);
|
||||
gdk_window_set_cursor (parent, cur);
|
||||
gdk_flush ();
|
||||
|
||||
|
@@ -265,7 +265,8 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
|
||||
break;
|
||||
}
|
||||
|
||||
M_CURSORDATA->m_cursor = gdk_cursor_new( gdk_cur );
|
||||
GdkDisplay* display = gdk_window_get_display(wxGetTopLevelGDK());
|
||||
M_CURSORDATA->m_cursor = gdk_cursor_new_for_display(display, gdk_cur);
|
||||
}
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
|
@@ -280,10 +280,14 @@ gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event,
|
||||
{
|
||||
if (win->GetWindowStyle() & wxRESIZE_BORDER)
|
||||
{
|
||||
GdkCursor* cursor = NULL;
|
||||
GdkWindow* window = gtk_widget_get_window(widget);
|
||||
if ((x > win->m_width-14) && (y > win->m_height-14))
|
||||
gdk_window_set_cursor(gtk_widget_get_window(widget), gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER));
|
||||
else
|
||||
gdk_window_set_cursor(gtk_widget_get_window(widget), NULL);
|
||||
{
|
||||
GdkDisplay* display = gdk_window_get_display(window);
|
||||
cursor = gdk_cursor_new_for_display(display, GDK_BOTTOM_RIGHT_CORNER);
|
||||
}
|
||||
gdk_window_set_cursor(window, cursor);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user