Rewrite of fullscreen toggling in linux. This goes back to using the EWMH specifications. I wasn't using it right before, but now it should work on all EWMH compliant window managers (like KDE, Metacity, Compiz, etc). Since this doesn't need an override redirect Alt-Tab works even in fullscreen mode. This also allows for some other nice things to be done.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5199 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-03-15 23:25:11 +00:00
parent c5d4c2c1b1
commit 2015d252f0
12 changed files with 387 additions and 300 deletions

View File

@ -397,12 +397,14 @@ bool IsFocus()
return false;
#elif defined HAVE_X11 && HAVE_X11
Window GLWin = *(Window *)g_WiimoteInitialize.pXWindow;
bool bFocus = False;
#if defined(HAVE_GTK2) && HAVE_GTK2 && defined(wxGTK)
bFocus = (wxPanel *)g_WiimoteInitialize.pPanel == wxWindow::FindFocus();
#endif
Window FocusWin;
int Revert;
XGetInputFocus(WMdisplay, &FocusWin, &Revert);
XWindowAttributes WinAttribs;
XGetWindowAttributes (WMdisplay, GLWin, &WinAttribs);
return (GLWin != 0 && (GLWin == FocusWin || WinAttribs.override_redirect));
return (GLWin == FocusWin || bFocus);
#else
return true;
#endif