[X2Go-Commits] [vcxsrv] 13/24: Incorporate winmultiwindow.patch from Oleksandr Shneyder (phoca GmbH)
git-admin at x2go.org
git-admin at x2go.org
Mon Mar 9 05:11:29 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 1.15.2.2-xp+vc2013+x2go1
in repository vcxsrv.
commit 978ec71bbf4345f477fd4f937deb3a4b481862e2
Author: Mike DePaulo <mikedep333 at gmail.com>
Date: Tue Sep 2 09:27:17 2014 -0400
Incorporate winmultiwindow.patch from Oleksandr Shneyder (phoca GmbH)
---
xorg-server/hw/xwin/winmultiwindowwindow.c | 49 +++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
old mode 100644
new mode 100755
index 2439ddb..e7f469b
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -107,6 +107,7 @@ winCreateWindowMultiWindow(WindowPtr pWin)
winDebug ("winCreateWindowMultiWindow - pWin: %p\n", pWin);
#endif
+
WIN_UNWRAP(CreateWindow);
fResult = (*pScreen->CreateWindow) (pWin);
WIN_WRAP(CreateWindow, winCreateWindowMultiWindow);
@@ -319,6 +320,7 @@ winUnmapWindowMultiWindow(WindowPtr pWin)
winDebug ("winUnmapWindowMultiWindow - pWin: %08x\n", pWin);
#endif
+
WIN_UNWRAP(UnrealizeWindow);
fResult = (*pScreen->UnrealizeWindow) (pWin);
WIN_WRAP(UnrealizeWindow, winUnmapWindowMultiWindow);
@@ -364,6 +366,7 @@ winMapWindowMultiWindow(WindowPtr pWin)
winReshapeMultiWindow(pWin);
winUpdateRgnMultiWindow(pWin);
+
return fResult;
}
@@ -913,11 +916,17 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
LONG dX, dY, dW, dH, x, y;
DWORD dwStyle, dwExStyle;
+ int ret;
+ HMONITOR currentMonitor;
+ MONITORINFO monitorInfo;
+
#define WIDTH(rc) (rc.right - rc.left)
#define HEIGHT(rc) (rc.bottom - rc.top)
winDebug("winAdjustXWindow\n");
+
+
if (IsIconic(hwnd)) {
winDebug("\timmediately return because the window is iconized\n");
/*
@@ -941,13 +950,17 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
winDebug("\tWindowStyle: %08x %08x\n", dwStyle, dwExStyle);
+
AdjustWindowRectEx(&rcDraw, dwStyle, FALSE, dwExStyle);
/* The source of adjust */
GetWindowRect(hwnd, &rcWin);
+
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
rcWin.left, rcWin.top, rcWin.right, rcWin.bottom,
rcWin.right - rcWin.left, rcWin.bottom - rcWin.top);
+
+
winDebug("\tDraw extend {%d, %d, %d, %d}, {%d, %d}\n",
rcDraw.left, rcDraw.top, rcDraw.right, rcDraw.bottom,
rcDraw.right - rcDraw.left, rcDraw.bottom - rcDraw.top);
@@ -976,9 +989,43 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
vlist[3] = pDraw->height + dH;
winDebug("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
vlist[2], vlist[3]);
- return ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight,
+
+ ret=ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight,
vlist, wClient(pWin));
+
+ currentMonitor=MonitorFromWindow(hwnd,MONITOR_DEFAULTTONULL);
+ if(!currentMonitor)
+ {
+ return ret;
+ }
+ monitorInfo.cbSize=sizeof ( MONITORINFO );
+ if(!GetMonitorInfo(currentMonitor, &monitorInfo))
+ {
+ return ret;
+ }
+
+
+ if((rcWin.left <= monitorInfo.rcMonitor.left) && (rcWin.top <= monitorInfo.rcMonitor.top) &&
+ (rcWin.right - rcWin.left > monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left) &&
+ (rcWin.bottom - rcWin.top > monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top))
+ {
+
+ SetWindowLongPtr(hwnd, GWL_STYLE,
+ WS_VISIBLE);
+
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE,
+ 0);
+
+ SetWindowPos ( hwnd, HWND_TOPMOST, monitorInfo.rcMonitor.left,
+ monitorInfo.rcMonitor.top,
+ monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left,
+ monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top,
+ 0);
+ }
+
+ return ret;
+
#undef WIDTH
#undef HEIGHT
}
--
Alioth's /srv/git/code.x2go.org/vcxsrv.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/vcxsrv.git
More information about the x2go-commits
mailing list