mirror of https://github.com/mpv-player/mpv
We should not crash, only because we couldn't hide the cursor.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14744 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f366d01286
commit
471f9a844f
|
@ -176,7 +176,10 @@ void vo_hidecursor(Display * disp, Window win)
|
||||||
return; // do not hide, if we're playing at rootwin
|
return; // do not hide, if we're playing at rootwin
|
||||||
|
|
||||||
colormap = DefaultColormap(disp, DefaultScreen(disp));
|
colormap = DefaultColormap(disp, DefaultScreen(disp));
|
||||||
XAllocNamedColor(disp, colormap, "black", &black, &dummy);
|
if ( !XAllocNamedColor(disp, colormap, "black", &black, &dummy) )
|
||||||
|
{
|
||||||
|
return; // color alloc failed, give up
|
||||||
|
}
|
||||||
bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8, 8);
|
bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8, 8);
|
||||||
no_ptr = XCreatePixmapCursor(disp, bm_no, bm_no, &black, &black, 0, 0);
|
no_ptr = XCreatePixmapCursor(disp, bm_no, bm_no, &black, &black, 0, 0);
|
||||||
XDefineCursor(disp, win, no_ptr);
|
XDefineCursor(disp, win, no_ptr);
|
||||||
|
|
Loading…
Reference in New Issue