Disables changing cursor when it hovers a chatroom link with GTK+ version < 2.22

This feature cannot be implemented because gdk_cursor_get_cursor_type() is unavailable
This commit is contained in:
François Grisez 2015-07-20 14:25:59 +02:00
parent 10713a7291
commit a228a2715e

View file

@ -437,6 +437,7 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
}
static void chatroom_enable_hand_cursor(GdkWindow *window, gboolean hand_cursor_enabled) {
#if GTK_CHECK_VERSION(2,22,0)
GdkCursor *cursor = gdk_window_get_cursor(window);
GdkCursor *new_cursor = NULL;
if(!hand_cursor_enabled && gdk_cursor_get_cursor_type(cursor) != GDK_XTERM) {
@ -448,6 +449,7 @@ static void chatroom_enable_hand_cursor(GdkWindow *window, gboolean hand_cursor_
gdk_window_set_cursor(window, new_cursor);
gdk_cursor_unref(new_cursor);
}
#endif
}
static gboolean chatroom_event(GtkWidget *widget, GdkEvent *event, gpointer user_data) {