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

@ -629,16 +629,11 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
wxThread::Sleep(20);
g_pCodeWindow->JumpToAddress(PC);
g_pCodeWindow->Update();
// Update toolbar with Play/Pause status
UpdateGUI();
}
else
{
if (Core::GetState() == Core::CORE_RUN)
Core::SetState(Core::CORE_PAUSE);
else
Core::SetState(Core::CORE_RUN);
}
// Update toolbar with Play/Pause status
UpdateGUI();
DoPause();
}
else
// Core is uninitialized, start the game
@ -692,9 +687,19 @@ void CFrame::OnScreenshot(wxCommandEvent& WXUNUSED (event))
void CFrame::DoPause()
{
if (Core::GetState() == Core::CORE_RUN)
{
#if defined(HAVE_X11) && HAVE_X11
X11_SendClientEvent("PAUSE");
#endif
Core::SetState(Core::CORE_PAUSE);
}
else
{
#if defined(HAVE_X11) && HAVE_X11
X11_SendClientEvent("RESUME");
#endif
Core::SetState(Core::CORE_RUN);
}
UpdateGUI();
}