[gtk-vnc] Change cursor to use GDK_BLANK_CURSOR instead of a GdkPixmap
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Change cursor to use GDK_BLANK_CURSOR instead of a GdkPixmap
- Date: Thu, 28 Oct 2010 15:41:03 +0000 (UTC)
commit 99efb75ea62f9a306a894211b4fc2c26423801c6
Author: Daniel P. Berrange <berrange redhat com>
Date: Thu Sep 30 13:50:29 2010 -0300
Change cursor to use GDK_BLANK_CURSOR instead of a GdkPixmap
The GdkPixmap class has been removed in GTK3. Since Gtk 2.16
there is a standard GDK_BLANK_CURSOR which can replace their
usage and works across Gtk 2 and 3.
* src/vncdisplay.c: Use GDK_BLANK_CURSOR
src/vncdisplay.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index e2ef418..d754fb6 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -258,20 +258,7 @@ GtkWidget *vnc_display_new(void)
static GdkCursor *create_null_cursor(void)
{
- cairo_t *cr;
- GdkColor fg = { 0, 0, 0, 0 };
- GdkCursor *cursor;
- GdkPixmap *pixmap;
-
- pixmap = gdk_pixmap_new(NULL, 1, 1, 1);
- cr = gdk_cairo_create(pixmap);
- cairo_rectangle(cr, 0, 0, 1, 1);
- cairo_fill(cr);
- cairo_destroy(cr);
-
- cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap,
- &fg, &fg, 0, 0);
- g_object_unref(pixmap);
+ GdkCursor *cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
return cursor;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]