Implement hiding of mouse cursor on linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5007 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
090d7ec534
commit
6e2104b050
|
@ -400,6 +400,18 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||||
"GPU", None, NULL, 0, NULL);
|
"GPU", None, NULL, 0, NULL);
|
||||||
XMapRaised(GLWin.dpy, GLWin.win);
|
XMapRaised(GLWin.dpy, GLWin.win);
|
||||||
}
|
}
|
||||||
|
if (g_Config.bHideCursor)
|
||||||
|
{
|
||||||
|
// make a blank cursor
|
||||||
|
Pixmap Blank;
|
||||||
|
XColor DummyColor;
|
||||||
|
char ZeroData[1] = {0};
|
||||||
|
Cursor MouseCursor;
|
||||||
|
Blank = XCreateBitmapFromData (GLWin.dpy, GLWin.win, ZeroData, 1, 1);
|
||||||
|
MouseCursor = XCreatePixmapCursor(GLWin.dpy, Blank, Blank, &DummyColor, &DummyColor, 0, 0);
|
||||||
|
XFreePixmap (GLWin.dpy, Blank);
|
||||||
|
XDefineCursor (GLWin.dpy, GLWin.win, MouseCursor);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -585,6 +597,7 @@ void OpenGL_Shutdown()
|
||||||
hDC = NULL; // Set DC To NULL
|
hDC = NULL; // Set DC To NULL
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_X11) && HAVE_X11
|
#elif defined(HAVE_X11) && HAVE_X11
|
||||||
|
if (g_Config.bHideCursor) XUndefineCursor(GLWin.dpy, GLWin.win);
|
||||||
if (GLWin.ctx)
|
if (GLWin.ctx)
|
||||||
{
|
{
|
||||||
if (!glXMakeCurrent(GLWin.dpy, None, NULL))
|
if (!glXMakeCurrent(GLWin.dpy, None, NULL))
|
||||||
|
|
Loading…
Reference in New Issue