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
This commit is contained in:
Glenn Rice 2011-01-24 17:27:04 +00:00
parent f33cd7cbbd
commit d2544158df
2 changed files with 6 additions and 1 deletions

View File

@ -295,7 +295,8 @@ THREAD_RETURN XEventThread(void *pArg)
case ClientMessage: case ClientMessage:
if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False)) if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False))
g_VideoInitialize.pCoreMessage(WM_USER_STOP); 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], 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]); event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]);
break; break;

View File

@ -1607,6 +1607,10 @@ void Renderer::SetWindowSize(int width, int height)
// Scale the window size by the EFB scale. // Scale the window size by the EFB scale.
CalculateTargetScale(width, height, width, height); 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); g_VideoInitialize.pRequestWindowSize(width, height);
} }