diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2011-09-18 17:00:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-06 20:27:42 -0300 |
commit | 2a62d05407ec0d7c2739fb8c9f56d89e962821ca (patch) | |
tree | 7cc426b6f6129deeed14e5c9216c32000247a2c6 /src | |
parent | ed192403f373a43950c97c8dc4e806f49dd7b4a4 (diff) |
Fix nocursor using uninitialized pixmap data
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xcommon.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/xcommon.c b/src/xcommon.c index 681b895..025c46b 100644 --- a/src/xcommon.c +++ b/src/xcommon.c @@ -827,7 +827,7 @@ int xcommon_open_display( const char *user_geometry, int aspect, int verbose ) XEvent xev; XSizeHints hint; XClassHint classhint; - XColor curs_col; + XColor curs_col = { 0 }; XSetWindowAttributes xswa; const char *hello = "tvtime"; unsigned long mask; @@ -1082,13 +1082,7 @@ int xcommon_open_display( const char *user_geometry, int aspect, int verbose ) XMaskEvent( display, StructureNotifyMask, &xev ); /* Create a 1 pixel cursor to use in full screen mode */ - curs_pix = XCreatePixmap( display, output_window, 1, 1, 1 ); - curs_col.pixel = 0; - curs_col.red = 0; - curs_col.green = 0; - curs_col.blue = 0; - curs_col.flags = 0; - curs_col.pad = 0; + curs_pix = XCreateBitmapFromData( display, output_window, (const char []){0}, 1, 1 ); nocursor = XCreatePixmapCursor( display, curs_pix, curs_pix, &curs_col, &curs_col, 1, 1 ); XDefineCursor( display, output_window, nocursor ); XSetIconName( display, wm_window, "tvtime" ); |