diff options
-rw-r--r-- | libmate-desktop/mate-aboutdialog.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libmate-desktop/mate-aboutdialog.c b/libmate-desktop/mate-aboutdialog.c index 6e862b0..29d5737 100644 --- a/libmate-desktop/mate-aboutdialog.c +++ b/libmate-desktop/mate-aboutdialog.c @@ -460,11 +460,13 @@ mate_about_dialog_init (MateAboutDialog *about) { GtkDialog *dialog = GTK_DIALOG (about); MateAboutDialogPrivate *priv; + GdkDisplay *display; GtkWidget *vbox, *hbox, *button, *close_button, *image; _mate_desktop_init_i18n (); /* Data */ + display = gtk_widget_get_display (GTK_WIDGET (about)); priv = MATE_ABOUT_DIALOG_GET_PRIVATE (about); about->private_data = priv; @@ -480,8 +482,8 @@ mate_about_dialog_init (MateAboutDialog *about) priv->documenters = NULL; priv->artists = NULL; - priv->hand_cursor = gdk_cursor_new (GDK_HAND2); - priv->regular_cursor = gdk_cursor_new (GDK_XTERM); + priv->hand_cursor = gdk_cursor_new_for_display (display, GDK_HAND2); + priv->regular_cursor = gdk_cursor_new_for_display (display, GDK_XTERM); priv->hovering_over_link = FALSE; priv->wrap_license = FALSE; @@ -1889,9 +1891,20 @@ text_view_visibility_notify_event (GtkWidget *text_view, GdkEventVisibility *event, MateAboutDialog *about) { +#if GTK_CHECK_VERSION (3, 0, 0) + GdkDeviceManager *device_manager; + GdkDevice *device; +#endif gint wx, wy, bx, by; +#if GTK_CHECK_VERSION (3, 0, 0) + device_manager = gdk_display_get_device_manager (gtk_widget_get_display(text_view)); + device = gdk_device_manager_get_client_pointer (device_manager); + + gdk_window_get_device_position (gtk_widget_get_window (text_view), device, &wx, &wy, NULL); +#else gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL); +#endif gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view), GTK_TEXT_WINDOW_WIDGET, |