Commit b6b52376 authored by Matthias Clasen's avatar Matthias Clasen

Replace several implementation of blank cursor setting by

        * gtk/gtkentry.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtktextview.c: Replace several implementation of
        blank cursor setting by GDK_BLANK_CURSOR.


svn path=/trunk/; revision=22148
parent c98305ac
2009-01-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.c:
* gtk/gtkfilechooserentry.c:
* gtk/gtktextview.c: Replace several implementation of
blank cursor setting by GDK_BLANK_CURSOR.
2009-01-19 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkcursor.c:
......
......@@ -3782,28 +3782,15 @@ gtk_entry_motion_notify (GtkWidget *widget,
static void
set_invisible_cursor (GdkWindow *window)
{
GdkBitmap *empty_bitmap;
GdkDisplay *display;
GdkCursor *cursor;
GdkColor useless;
char invisible_cursor_bits[] = { 0x0 };
useless.red = useless.green = useless.blue = 0;
useless.pixel = 0;
empty_bitmap = gdk_bitmap_create_from_data (window,
invisible_cursor_bits,
1, 1);
cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
empty_bitmap,
&useless,
&useless, 0, 0);
display = gdk_drawable_get_display (window);
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
gdk_window_set_cursor (window, cursor);
gdk_cursor_unref (cursor);
g_object_unref (empty_bitmap);
}
static void
......
......@@ -862,31 +862,15 @@ completion_feedback_window_expose_event_cb (GtkWidget *widget,
static void
set_invisible_mouse_cursor (GdkWindow *window)
{
/* Stolen from gtkentry.c:set_invisible_cursor() */
/* FIXME: implement a stupid public gdk_window_set_invisible_mouse_cursor() */
GdkBitmap *empty_bitmap;
GdkDisplay *display;
GdkCursor *cursor;
GdkColor useless;
char invisible_cursor_bits[] = { 0x0 };
useless.red = useless.green = useless.blue = 0;
useless.pixel = 0;
empty_bitmap = gdk_bitmap_create_from_data (window,
invisible_cursor_bits,
1, 1);
cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
empty_bitmap,
&useless,
&useless, 0, 0);
display = gdk_drawable_get_display (window);
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
gdk_window_set_cursor (window, cursor);
gdk_cursor_unref (cursor);
g_object_unref (empty_bitmap);
}
static void
......
......@@ -3988,28 +3988,15 @@ gtk_text_view_state_changed (GtkWidget *widget,
static void
set_invisible_cursor (GdkWindow *window)
{
GdkBitmap *empty_bitmap;
GdkDisplay *display;
GdkCursor *cursor;
GdkColor useless;
char invisible_cursor_bits[] = { 0x0 };
useless.red = useless.green = useless.blue = 0;
useless.pixel = 0;
empty_bitmap = gdk_bitmap_create_from_data (window,
invisible_cursor_bits,
1, 1);
cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
empty_bitmap,
&useless,
&useless, 0, 0);
display = gdk_drawable_get_display (window);
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
gdk_window_set_cursor (window, cursor);
gdk_cursor_unref (cursor);
g_object_unref (empty_bitmap);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment