summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-05 22:33:14 +0100
committerJohns <johns98@gmx.net>2012-01-05 22:33:14 +0100
commit8dda2a0b8a5bd3bc1169baffec450d241a2bc3f2 (patch)
tree205e354e60a2486d7d083b6bd2e9a97f22d47c9e /video.c
parent761c06eac13c3b3504cee30e36af28347c8f1740 (diff)
downloadvdr-plugin-softhddevice-8dda2a0b8a5bd3bc1169baffec450d241a2bc3f2.tar.gz
vdr-plugin-softhddevice-8dda2a0b8a5bd3bc1169baffec450d241a2bc3f2.tar.bz2
Show transparent cursor to hide cursor.
Diffstat (limited to 'video.c')
-rw-r--r--video.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/video.c b/video.c
index 0c63dcf..fa4da98 100644
--- a/video.c
+++ b/video.c
@@ -6291,12 +6291,18 @@ int64_t VideoGetClock(void)
/**
** Create main window.
+**
+** @param parent parent of new window
+** @param visual visual of parent
+** @param depth depth of parent
*/
static void VideoCreateWindow(xcb_window_t parent, xcb_visualid_t visual,
uint8_t depth)
{
uint32_t values[4];
xcb_intern_atom_reply_t *reply;
+ xcb_pixmap_t pixmap;
+ xcb_cursor_t cursor;
Debug(3, "video: visual %#0x depth %d\n", visual, depth);
@@ -6361,11 +6367,21 @@ static void VideoCreateWindow(xcb_window_t parent, xcb_visualid_t visual,
}
}
- values[0] = XCB_NONE;
+ xcb_map_window(Connection, VideoWindow);
+
+ //
+ // hide cursor
+ //
+ pixmap = xcb_generate_id(Connection);
+ xcb_create_pixmap(Connection, 1, pixmap, parent, 1, 1);
+ cursor = xcb_generate_id(Connection);
+ xcb_create_cursor(Connection, cursor, pixmap, pixmap, 0, 0, 0, 0, 0, 0, 1,
+ 1);
+
+ values[0] = cursor;
xcb_change_window_attributes(Connection, VideoWindow, XCB_CW_CURSOR,
values);
-
- xcb_map_window(Connection, VideoWindow);
+ // FIXME: free cursor/pixmap needed?
}
/**