gtk+ r22148 - in trunk: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22148 - in trunk: . gtk
- Date: Tue, 20 Jan 2009 02:45:20 +0000 (UTC)
Author: matthiasc
Date: Tue Jan 20 02:45:19 2009
New Revision: 22148
URL: http://svn.gnome.org/viewvc/gtk+?rev=22148&view=rev
Log:
* gtk/gtkentry.c:
* gtk/gtkfilechooserentry.c:
* gtk/gtktextview.c: Replace several implementation of
blank cursor setting by GDK_BLANK_CURSOR.
Modified:
trunk/ChangeLog
trunk/gtk/gtkentry.c
trunk/gtk/gtkfilechooserentry.c
trunk/gtk/gtktextview.c
Modified: trunk/gtk/gtkentry.c
==============================================================================
--- trunk/gtk/gtkentry.c (original)
+++ trunk/gtk/gtkentry.c Tue Jan 20 02:45:19 2009
@@ -3782,28 +3782,15 @@
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
Modified: trunk/gtk/gtkfilechooserentry.c
==============================================================================
--- trunk/gtk/gtkfilechooserentry.c (original)
+++ trunk/gtk/gtkfilechooserentry.c Tue Jan 20 02:45:19 2009
@@ -862,31 +862,15 @@
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
Modified: trunk/gtk/gtktextview.c
==============================================================================
--- trunk/gtk/gtktextview.c (original)
+++ trunk/gtk/gtktextview.c Tue Jan 20 02:45:19 2009
@@ -3988,28 +3988,15 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]