瀏覽代碼

We need to be more careful about activating maximized mode when in

full screen, otherwise we'll mess things up.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5003 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.2.90
Pierre Ossman 11 年之前
父節點
當前提交
897067bd84
共有 1 個文件被更改,包括 12 次插入5 次删除
  1. 12
    5
      vncviewer/DesktopWindow.cxx

+ 12
- 5
vncviewer/DesktopWindow.cxx 查看文件

@@ -581,11 +581,18 @@ void DesktopWindow::handleGrab(void *data)
void DesktopWindow::maximizeWindow()
{
#if defined(WIN32)
WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(fl_xid(this), &wp);
wp.showCmd = SW_MAXIMIZE;
SetWindowPlacement(fl_xid(this), &wp);
// We cannot use ShowWindow() in full screen mode as it will
// resize things implicitly. Fortunately modifying the style
// directly results in a maximized state once we leave full screen.
#ifdef HAVE_FLTK_FULLSCREEN
if (fullscreen_active()) {
WINDOWINFO wi;
wi.cbSize = sizeof(WINDOWINFO);
GetWindowInfo(fl_xid(this), &wi);
SetWindowLongPtr(fl_xid(this), GWL_STYLE, wi.dwStyle | WS_MAXIMIZE);
} else
#endif
ShowWindow(fl_xid(this), SW_MAXIMIZE);
#elif defined(__APPLE__)
// OS X is somewhat strange and does not really have a concept of a
// maximized window, so we can simply resize the window to the workarea.

Loading…
取消
儲存