From d2544158df0fe190ab72f6e2b266c3ebe6d0f0c4 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 24 Jan 2011 17:27:04 +0000 Subject: [PATCH] Fix the "Adjust window size" option on linux. Previously this option caused flickering when using render to main, and an application hang when stopping emulation via the GUI Stop button. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6907 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 3 ++- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index f0a134dc5d..b52db29b20 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -295,7 +295,8 @@ THREAD_RETURN XEventThread(void *pArg) case ClientMessage: if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False)) g_VideoInitialize.pCoreMessage(WM_USER_STOP); - if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.evdpy, "RESIZE", False)) + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.evdpy, "RESIZE", False) && + !g_ActiveConfig.bAdjustWindowSize) XMoveResizeWindow(GLWin.evdpy, GLWin.win, event.xclient.data.l[1], event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]); break; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 2448e9a925..ff2a718c26 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1607,6 +1607,10 @@ void Renderer::SetWindowSize(int width, int height) // Scale the window size by the EFB scale. CalculateTargetScale(width, height, width, height); +#if defined HAVE_X11 && HAVE_X11 + if (s_backbuffer_width != width || s_backbuffer_height != height) + XMoveResizeWindow(GLWin.evdpy, GLWin.win, GLWin.x, GLWin.y, width, height); +#endif g_VideoInitialize.pRequestWindowSize(width, height); }