summaryrefslogtreecommitdiff
path: root/src/gs-window-x11.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-07-09 13:27:15 +0200
committerinfirit <[email protected]>2015-07-09 13:49:39 +0200
commitc7fee045db811e12a76894cddbf5604af7d57941 (patch)
tree448eefa0204682d7ab1f29aae95c24417b0740ef /src/gs-window-x11.c
parentd69d9dd6a7fabb18ac207c348cac5e2475380c21 (diff)
downloadmate-screensaver-c7fee045db811e12a76894cddbf5604af7d57941.tar.bz2
mate-screensaver-c7fee045db811e12a76894cddbf5604af7d57941.tar.xz
Simplify cursur hiding
Use GDK_BLANK_CURSOR across Gtk versions for new cursors.
Diffstat (limited to 'src/gs-window-x11.c')
-rw-r--r--src/gs-window-x11.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 458db44..254a9b5 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -155,32 +155,11 @@ set_invisible_cursor (GdkWindow *window,
gboolean invisible)
{
GdkCursor *cursor = NULL;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GdkBitmap *empty_bitmap;
- GdkColor useless;
- char invisible_cursor_bits [] = { 0x0 };
-#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
- cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
-#else
if (invisible)
{
- 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);
-
- g_object_unref (empty_bitmap);
+ cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
}
-#endif
gdk_window_set_cursor (window, cursor);