mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix mouse emulation in fullscreen mode in linux. The window doesn't have focus then.
Also minor tweak to mouse hiding. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5063 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -411,9 +411,8 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
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);
|
||||
GLWin.blankCursor = XCreatePixmapCursor(GLWin.dpy, Blank, Blank, &DummyColor, &DummyColor, 0, 0);
|
||||
XFreePixmap (GLWin.dpy, Blank);
|
||||
XDefineCursor (GLWin.dpy, GLWin.win, MouseCursor);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
@ -474,6 +473,10 @@ bool OpenGL_MakeCurrent()
|
||||
} else {
|
||||
ERROR_LOG(VIDEO, "no Direct Rendering possible!");
|
||||
}
|
||||
|
||||
// Hide the cursor now
|
||||
if (g_Config.bHideCursor)
|
||||
XDefineCursor (GLWin.dpy, GLWin.win, GLWin.blankCursor);
|
||||
|
||||
// better for pad plugin key input (thc)
|
||||
XSelectInput(GLWin.dpy, GLWin.win, ExposureMask | KeyPressMask | KeyReleaseMask |
|
||||
@ -579,6 +582,14 @@ void OpenGL_Update()
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
break;
|
||||
case FocusIn:
|
||||
if (g_Config.bHideCursor)
|
||||
XDefineCursor(GLWin.dpy, GLWin.win, GLWin.blankCursor);
|
||||
break;
|
||||
case FocusOut:
|
||||
if (g_Config.bHideCursor)
|
||||
XUndefineCursor(GLWin.dpy, GLWin.win);
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
Window winDummy;
|
||||
unsigned int borderDummy;
|
||||
|
Reference in New Issue
Block a user