From ced9db1e38360e321007dd837fbb37d1d79d97d9 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 11 Sep 2006 09:09:14 +0000 Subject: [PATCH] Fixed the bug with overlaping the vncviewer window all other windows when it's in the fullscreen mode. Small code improvements. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@661 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- win/vncviewer/DesktopWindow.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx index 00f4c10f..517d3ab1 100644 --- a/win/vncviewer/DesktopWindow.cxx +++ b/win/vncviewer/DesktopWindow.cxx @@ -270,7 +270,7 @@ void DesktopWindow::setFullscreen(bool fs) { vlog.debug("flags=%x", flags); SetWindowLong(handle, GWL_STYLE, flags); - SetWindowPos(handle, HWND_TOPMOST, mi.rcMonitor.left, mi.rcMonitor.top, + SetWindowPos(handle, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right-mi.rcMonitor.left, mi.rcMonitor.bottom-mi.rcMonitor.top, SWP_FRAMECHANGED); @@ -424,7 +424,7 @@ DesktopWindow::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { reqd_size.br.y += GetSystemMetrics(SM_CXHSCROLL); SetRect(&r, reqd_size.tl.x, reqd_size.tl.y, reqd_size.br.x, reqd_size.br.y); - if (tb.isVisible()) + if (isToolbarEnabled()) r.bottom += tb.getHeight(); AdjustWindowRect(&r, GetWindowLong(handle, GWL_STYLE), FALSE); reqd_size = Rect(r.left, r.top, r.right, r.bottom); @@ -932,7 +932,7 @@ DesktopWindow::setSize(int w, int h) { RECT r = {0, 0, w, h}; AdjustWindowRectEx(&r, GetWindowLong(frameHandle, GWL_STYLE), FALSE, GetWindowLong(frameHandle, GWL_EXSTYLE)); - if (tb.isVisible()) + if (isToolbarEnabled()) r.bottom += tb.getHeight(); AdjustWindowRect(&r, GetWindowLong(handle, GWL_STYLE), FALSE); -- 2.39.5