summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhw/xfree86/sdksyms.sh25
-rw-r--r--hw/xwin/glx/indirect.c4
-rw-r--r--hw/xwin/glx/winpriv.c2
-rw-r--r--hw/xwin/win.h4
-rw-r--r--hw/xwin/winengine.c2
-rw-r--r--hw/xwin/winkeybd.c2
-rw-r--r--hw/xwin/winmultiwindowwindow.c60
-rw-r--r--hw/xwin/winmultiwindowwm.c8
-rw-r--r--hw/xwin/winmultiwindowwndproc.c10
-rw-r--r--hw/xwin/winprefs.c29
-rw-r--r--hw/xwin/winprefs.h9
-rw-r--r--hw/xwin/winshadgdi.c4
-rw-r--r--hw/xwin/winwin32rootless.c10
-rw-r--r--hw/xwin/winwin32rootlesswindow.c16
-rw-r--r--hw/xwin/winwindow.h1
-rw-r--r--hw/xwin/winwndproc.c6
-rw-r--r--hw/xwin/wmutil/cursor_convert.c6
-rw-r--r--os/osinit.c2
18 files changed, 118 insertions, 82 deletions
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 5391b72dd..3ec5086d1 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -297,7 +297,7 @@ cat > sdksyms.c << EOF
EOF
-topdir=$1
+topdir=$(readlink -f $1)
shift
LC_ALL=C
export LC_ALL
@@ -315,11 +315,24 @@ BEGIN {
printf("sdksyms.c:") > "sdksyms.dep";
}
/^# [0-9]+ "/ {
- # Process text after a include in a relative path or when the
- # processed file has a basename matching $top_srcdir.
- # Note that indexing starts at 1; 0 means no match, and there
- # is a starting ".
- sdk = $3 !~ /^"\// || index($3, topdir) == 2;
+ # Match preprocessor linemarkers which have the form:
+ # # linenum "filename" flags
+ #
+ # Only process text for sdk exports where the linemarker filename has a
+ # relative path, or an absolute path matching $top_srcdir.
+ #
+
+ # canonicalize filename
+ if ($3 in canonicalized) {
+ c = canonicalized[$3]
+ } else {
+ cmd = "readlink -f " $3
+ cmd | getline c
+ close(cmd)
+ canonicalized[$3] = c
+ }
+ # note that index() starts at 1; 0 means no match.
+ sdk = $3 !~ /^"\// || index(c, topdir) == 1;
if (sdk && $3 ~ /\.h"$/) {
# remove quotes
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index b9881426c..c86fcf191 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -1146,13 +1146,13 @@ glxWinDeferredCreateDrawable(__GLXWinDrawable *draw, __GLXconfig *config)
#define RASTERWIDTHBYTES(bmi) (((((bmi)->biWidth*(bmi)->biBitCount)+31)&~31)>>3)
size = bmpHeader.biHeight * RASTERWIDTHBYTES(&bmpHeader);
- ErrorF("shared memory region size %zu + %u\n", sizeof(BITMAPINFOHEADER), size);
+ ErrorF("shared memory region size %zu + %u\n", sizeof(BITMAPINFOHEADER), (unsigned int)size);
// Create unique name for mapping based on XID
//
// XXX: not quite unique as potentially this name could be used in
// another server instance. Not sure how to deal with that.
- snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08x", draw->base.pDraw->id);
+ snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08x", (unsigned int)draw->base.pDraw->id);
ErrorF("shared memory region name %s\n", name);
// Create a file mapping backed by the pagefile
diff --git a/hw/xwin/glx/winpriv.c b/hw/xwin/glx/winpriv.c
index 4bb2b3104..b34ed249e 100644
--- a/hw/xwin/glx/winpriv.c
+++ b/hw/xwin/glx/winpriv.c
@@ -20,7 +20,7 @@ winCreateWindowsWindowHierarchy(WindowPtr pWin)
winWindowPriv(pWin);
winDebug("winCreateWindowsWindowHierarchy - pWin:%p XID:0x%x \n", pWin,
- pWin->drawable.id);
+ (unsigned int)pWin->drawable.id);
if (!pWin)
return;
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index eac91bd7c..7c29037ce 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -187,6 +187,7 @@
#define WM_TRAYICON (WM_USER + 1000)
#define WM_INIT_SYS_MENU (WM_USER + 1001)
#define WM_GIVEUP (WM_USER + 1002)
+#define WM_ASYNCMOVE (WM_USER + 1003)
/* Local includes */
#include "winwindow.h"
@@ -967,6 +968,9 @@ XID
int
winAdjustXWindow(WindowPtr pWin, HWND hwnd);
+
+void
+ winAdjustWindowsWindow(WindowPtr pWin, HWND hwnd);
#endif
#ifdef XWIN_MULTIWINDOW
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index d816851e2..104eba3c1 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -54,6 +54,8 @@ static HMODULE g_hmodDirectDraw = NULL;
void
winDetectSupportedEngines(void)
{
+ ErrorF("winDetectSupportedEngines - RemoteSession: %s\n", GetSystemMetrics(SM_REMOTESESSION) ? "yes" : "no");
+
/* Initialize the engine support flags */
g_dwEnginesSupported = WIN_SERVER_SHADOW_GDI;
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index ec03f0c84..3748dc027 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -191,7 +191,7 @@ winRestoreModeKeyStates(void)
unsigned short internalKeyStates;
/* X server is being initialized */
- if (!inputInfo.keyboard)
+ if (!inputInfo.keyboard || !inputInfo.keyboard->key)
return;
/* Only process events if the rootwindow is mapped. The keyboard events
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index e81fe2fcc..7ef792917 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -202,32 +202,16 @@ winDestroyWindowMultiWindow(WindowPtr pWin)
/*
* PositionWindow - See Porting Layer Definition - p. 37
- *
- * This function adjusts the position and size of Windows window
- * with respect to the underlying X window. This is the inverse
- * of winAdjustXWindow, which adjusts X window to Windows window.
*/
Bool
winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
{
Bool fResult = TRUE;
- int iX, iY, iWidth, iHeight;
ScreenPtr pScreen = pWin->drawable.pScreen;
-
winWindowPriv(pWin);
winScreenPriv(pScreen);
-
HWND hWnd = pWinPriv->hWnd;
- RECT rcNew;
- RECT rcOld;
-
-#if CYGMULTIWINDOW_DEBUG
- RECT rcClient;
- RECT *lpRc;
-#endif
- DWORD dwExStyle;
- DWORD dwStyle;
#if CYGMULTIWINDOW_DEBUG
winTrace("winPositionWindowMultiWindow - pWin: %p\n", pWin);
@@ -249,6 +233,36 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
return fResult;
}
+ /*
+ We can't call MoveWindow() here, because that sends messages and pumps the
+ message queue, which could re-entrantly call ConfigureWindow(), which
+ would be bad..., so instead just send a message to cause MoveWindow() to
+ be called.
+ */
+ PostMessage(hWnd, WM_ASYNCMOVE, 0, 0);
+
+ return fResult;
+}
+
+/*
+ * This function adjusts the position and size of Windows window
+ * with respect to the underlying X window. This is the inverse
+ * of winAdjustXWindow, which adjusts X window to Windows window.
+ */
+void
+winAdjustWindowsWindow(WindowPtr pWin, HWND hWnd)
+{
+ int iX, iY, iWidth, iHeight;
+ RECT rcNew;
+ RECT rcOld;
+
+#if CYGMULTIWINDOW_DEBUG
+ RECT rcClient;
+ RECT *lpRc;
+#endif
+ DWORD dwExStyle;
+ DWORD dwStyle;
+
if (!isToplevelWindow(pWin)) {
POINT parentOrigin;
@@ -268,8 +282,6 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
MoveWindow(hWnd,
iX - parentOrigin.x, iY - parentOrigin.y, iWidth, iHeight,
TRUE);
-
- return fResult;
}
/* Get the Windows window style and extended style */
@@ -336,11 +348,9 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
}
else {
#if CYGMULTIWINDOW_DEBUG
- ErrorF("winPositionWindowMultiWindow - Not need to move\n");
+ ErrorF("winPositionWindowMultiWindow - No need to move\n");
#endif
}
-
- return fResult;
}
/*
@@ -713,7 +723,7 @@ winCreateWindowsChildWindow(WindowPtr pWin)
winPrivWinPtr pParentPriv, pWinPriv;
winDebug("winCreateWindowsChildWindow - pWin:%p XID:0x%x\n", pWin,
- pWin->drawable.id);
+ (unsigned int)pWin->drawable.id);
winInitMultiWindowClass();
@@ -729,7 +739,7 @@ winCreateWindowsChildWindow(WindowPtr pWin)
winDebug
("winCreateWindowsChildWindow - parent pWin:%p XID:0x%08x hWnd:0x%p\n",
- pParent, pParent->drawable.id, pParentPriv->hWnd);
+ pParent, (unsigned int)pParent->drawable.id, pParentPriv->hWnd);
winDebug("winCreateWindowsChildWindow - %dx%d @ %dx%d\n", iWidth, iHeight,
iX, iY);
@@ -764,7 +774,7 @@ void
winCreateWindowsWindow(WindowPtr pWin)
{
winDebug("winCreateWindowsWindow - pWin:%p XID:0x%x \n", pWin,
- pWin->drawable.id);
+ (unsigned int)pWin->drawable.id);
if (isToplevelWindow(pWin)) {
winCreateWindowsTopLevelWindow(pWin);
@@ -780,7 +790,7 @@ winDestroyChildWindowsWindow(WindowPtr pWin, void *data)
winWindowPriv(pWin);
winDebug("winDestroyChildWindowsWindow - pWin:%p XID:0x%x \n", pWin,
- pWin->drawable.id);
+ (unsigned int)pWin->drawable.id);
/* Null our handle to the Window so referencing it will cause an error */
pWinPriv->hWnd = NULL;
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 215b81324..ea7fc649e 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -244,9 +244,6 @@ MessageName(winWMMessagePtr msg)
case WM_WM_CHANGE_STATE:
return "WM_WM_CHANGE_STATE";
break;
- case WM_WM_MAP:
- return "WM_WM_MAP";
- break;
case WM_WM_MAP_UNMANAGED:
return "WM_WM_MAP_UNMANAGED";
break;
@@ -1057,11 +1054,6 @@ winMultiWindowWMProc(void *pArg)
}
break;
- case WM_WM_MAP:
- UpdateName(pWMInfo, pNode->msg.iWindow);
- UpdateIcon(pWMInfo, pNode->msg.iWindow);
- break;
-
case WM_WM_MAP_UNMANAGED:
break;
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 2c123acb1..66b37aefd 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -464,7 +464,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/*
* Any window menu items go through here
*/
- if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam))) {
+ if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam), s_pScreenPriv)) {
/* Don't pass customized menus to DefWindowProc */
return 0;
}
@@ -1148,6 +1148,10 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
break;
+ case WM_ASYNCMOVE:
+ winAdjustWindowsWindow(pWin, hwnd);
+ break;
+
default:
break;
}
@@ -1225,7 +1229,7 @@ winUpdateWindowPosition(HWND hWnd, HWND * zstyle)
SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight);
winDebug("winUpdateWindowPosition - drawable extent (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom);
AdjustWindowRectEx(&rcNew, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE,
GetWindowLongPtr(hWnd, GWL_EXSTYLE));
@@ -1244,7 +1248,7 @@ winUpdateWindowPosition(HWND hWnd, HWND * zstyle)
}
winDebug("winUpdateWindowPosition - Window extent (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom);
/* Position the Windows window */
SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top,
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 4d53f8a79..c97c88dca 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -208,18 +208,21 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam)
* Set custom icons and menus again.
*/
static void
-ReloadPrefs(void)
+ReloadPrefs(winPrivScreenPtr pScreenPriv)
{
int i;
#ifdef XWIN_MULTIWINDOW
+ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+
/* First, iterate over all windows, deleting their icons and custom menus.
* This is really only needed because winDestroyIcon() will try to
* destroy the old global icons, which will have changed.
* It is probably better to set a windows USER_DATA to flag locally defined
* icons, and use that to accurately know when to destroy old icons.
*/
- EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, FALSE);
+ if (pScreenInfo->fMultiWindow)
+ EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, FALSE);
#endif
/* Now, free/clear all info from our prefs structure */
@@ -264,12 +267,12 @@ ReloadPrefs(void)
g_hSmallIconX = NULL;
#ifdef XWIN_MULTIWINDOW
- winInitGlobalIcons();
-#endif
+ if (pScreenInfo->fMultiWindow) {
+ winInitGlobalIcons();
-#ifdef XWIN_MULTIWINDOW
- /* Rebuild the icons and menus */
- EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, TRUE);
+ /* Rebuild the icons and menus */
+ EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, TRUE);
+ }
#endif
/* Whew, done */
@@ -409,7 +412,7 @@ ExecAndLogThread(void *cmd)
* Return TRUE if command is proccessed, FALSE otherwise.
*/
Bool
-HandleCustomWM_COMMAND(HWND hwnd, int command)
+HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv)
{
int i, j;
MENUPARSED *m;
@@ -482,13 +485,17 @@ HandleCustomWM_COMMAND(HWND hwnd, int command)
HWND_TOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
#if XWIN_MULTIWINDOW
- /* Reflect the changed Z order */
- winReorderWindowsMultiWindow();
+ {
+ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+ if (pScreenInfo->fMultiWindow)
+ /* Reflect the changed Z order */
+ winReorderWindowsMultiWindow();
+ }
#endif
return TRUE;
case CMD_RELOAD:
- ReloadPrefs();
+ ReloadPrefs(pScreenPriv);
return TRUE;
default:
diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h
index c41710419..36f3f4152 100644
--- a/hw/xwin/winprefs.h
+++ b/hw/xwin/winprefs.h
@@ -1,5 +1,3 @@
-#if !defined(WINPREFS_H)
-#define WINPREFS_H
/*
* Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
* Copyright (C) Colin Harrison 2005-2008
@@ -32,6 +30,9 @@
* Colin Harrison
*/
+#if !defined(WINPREFS_H)
+#define WINPREFS_H
+
/* Need Bool */
#include <X11/Xdefs.h>
/* Need to know how long paths can be... */
@@ -39,6 +40,8 @@
/* Xwindows redefines PATH_MAX to at least 1024 */
#include <X11/Xwindows.h>
+#include "winwindow.h"
+
#ifndef NAME_MAX
#define NAME_MAX PATH_MAX
#endif
@@ -157,7 +160,7 @@ void
HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu);
Bool
- HandleCustomWM_COMMAND(HWND hwnd, int command);
+ HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv);
int
winIconIsOverride(HICON hicon);
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 797152f13..88a093e5b 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -858,7 +858,7 @@ winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin)
*/
BITMAPV4HEADER bmih;
- memset(&bmih, sizeof(bmih), 0);
+ memset(&bmih, 0, sizeof(bmih));
bmih.bV4Size = sizeof(BITMAPV4HEADER);
bmih.bV4Width = pPixmap->drawable.width;
bmih.bV4Height = -pPixmap->drawable.height; /* top-down bitmap */
@@ -893,7 +893,7 @@ winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin)
ps.rcPaint.top + pWin->borderWidth,
SRCCOPY))
ErrorF("winBltExposedWindowRegionShadowGDI - BitBlt failed: 0x%08x\n",
- GetLastError());
+ (unsigned int)GetLastError());
/* Release */
DeleteDC(hdcPixmap);
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 52806887f..c4be96ef3 100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -436,8 +436,8 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX,
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow {%d, %d, %d, %d}, {%d, %d}\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom,
+ (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif
/*
* Calculate the required size of the Windows window rectangle,
@@ -447,8 +447,8 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX,
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom,
+ (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif
g_fNoConfigureWindow = TRUE;
SetWindowPos(pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0,
@@ -650,7 +650,7 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
pRLWinPriv->pbmihShadow->biWidth =
stridesize / (pScreenInfo->dwBPP >> 3);
winDebug("\tresizing to %d (was %d)\n",
- pRLWinPriv->pbmihShadow->biWidth,
+ (int)pRLWinPriv->pbmihShadow->biWidth,
pRLWinPriv->pFrame->width);
}
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 817cd093e..1acb95f69 100644
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -234,8 +234,8 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom,
+ (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif
/* */
AdjustWindowRectEx(&rcNew,
@@ -244,8 +244,8 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom,
+ (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif
/* Calculate position deltas */
iDx = pRLWinPriv->pFrame->x - rcNew.left;
@@ -266,14 +266,14 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tWindowStyle: %08x %08x\n",
- WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
- WS_EX_APPWINDOW);
+ (int)(WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW),
+ (int)(WS_EX_APPWINDOW));
#endif
/* Position the Windows window */
#ifdef CYGMULTIWINDOW_DEBUG
winDebug("\tMoved {%d, %d, %d, %d}, {%d, %d}\n",
- rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
+ (int)rcNew.left, (int)rcNew.top, (int)rcNew.right, (int)rcNew.bottom,
+ (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top));
#endif
SetWindowPos(pRLWinPriv->hWnd, NULL,
rcNew.left, rcNew.top,
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index 0d1bb7651..792230a14 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -104,7 +104,6 @@ typedef struct _winWMMessageRec {
#define WM_WM_SIZE (WM_USER + 2)
#define WM_WM_RAISE (WM_USER + 3)
#define WM_WM_LOWER (WM_USER + 4)
-#define WM_WM_MAP (WM_USER + 5)
#define WM_WM_UNMAP (WM_USER + 6)
#define WM_WM_KILL (WM_USER + 7)
#define WM_WM_ACTIVATE (WM_USER + 8)
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 61c185785..fc33256b4 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -164,7 +164,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
* their own mode when they become active.
*/
if (s_pScreenInfo->fFullScreen
- || (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
+ && (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
break;
}
@@ -172,6 +172,8 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
"new height: %d new bpp: %d\n",
LOWORD(lParam), HIWORD(lParam), (int)wParam);
+ ErrorF("winWindowProc - RemoteSession: %s\n", GetSystemMetrics(SM_REMOTESESSION) ? "yes" : "no");
+
/* 0 bpp has no defined meaning, ignore this message */
if (wParam == 0)
break;
@@ -1217,7 +1219,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
default:
/* It's probably one of the custom menus... */
- if (HandleCustomWM_COMMAND(0, LOWORD(wParam)))
+ if (HandleCustomWM_COMMAND(0, LOWORD(wParam), s_pScreenPriv))
return 0;
}
break;
diff --git a/hw/xwin/wmutil/cursor_convert.c b/hw/xwin/wmutil/cursor_convert.c
index b91200478..7143832b6 100644
--- a/hw/xwin/wmutil/cursor_convert.c
+++ b/hw/xwin/wmutil/cursor_convert.c
@@ -296,7 +296,7 @@ winXCursorToHCURSOR(WMUTIL_CURSOR *pCursor)
hCursor = (HCURSOR) CreateIconIndirect(&ii);
if (hCursor == NULL)
- winError("winXCursorToHCURSOR - CreateIconIndirect failed: %x", GetLastError());
+ winError("winXCursorToHCURSOR - CreateIconIndirect failed: %x", (unsigned int)GetLastError());
else {
/*
Apparently, CreateIconIndirect() sometimes creates an Icon instead of a Cursor.
@@ -316,7 +316,7 @@ winXCursorToHCURSOR(WMUTIL_CURSOR *pCursor)
hCursor = (HCURSOR) CreateIconIndirect(&ii);
if (hCursor == NULL)
- winError("winXCursorToHCURSOR - CreateIconIndirect failed: %x", GetLastError());
+ winError("winXCursorToHCURSOR - CreateIconIndirect failed: %x", (unsigned int)GetLastError());
}
/* GetIconInfo creates new bitmaps. Destroy them again */
if (ii.hbmMask)
@@ -342,7 +342,7 @@ winXCursorToHCURSOR(WMUTIL_CURSOR *pCursor)
sm_cx,
sm_cy, pAnd, pXor);
if (hCursor == NULL)
- winError("winXCursorToHCURSOR - CreateCursor failed: %x", GetLastError());
+ winError("winXCursorToHCURSOR - CreateCursor failed: %x", (unsigned int)GetLastError());
}
free(pAnd);
free(pXor);
diff --git a/os/osinit.c b/os/osinit.c
index d39b962fc..c18247049 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -131,7 +131,7 @@ OsSigHandler(int signo)
}
}
- ErrorFSigSafe("Fatal signal received in thread 0x%p [0x%x]\n", pthread_self(), GetCurrentThreadId());
+ ErrorFSigSafe("Fatal signal received in thread %p [0x%x]\n", pthread_self(), (unsigned int)GetCurrentThreadId());
#ifdef SA_SIGINFO
if (sip->si_code == SI_USER) {