xserver: Branch 'master' - 6 commits
Keith Packard
keithp at kemper.freedesktop.org
Wed Oct 14 14:34:50 PDT 2009
configure.ac | 10 ++++++-
dev/null |binary
hw/xwin/InitOutput.c | 2 -
hw/xwin/XWin.rc | 11 +++-----
hw/xwin/winmouse.c | 7 ++---
hw/xwin/winmultiwindowicons.c | 53 ++++++++++++++++++++--------------------
hw/xwin/winmultiwindowwndproc.c | 18 +++++++------
hw/xwin/winresource.h | 1
hw/xwin/winwndproc.c | 4 +++
9 files changed, 58 insertions(+), 48 deletions(-)
New commits:
commit 22b38f513c93c2f2aea5909878c3c9acae7d35c1
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Sat Oct 3 12:44:50 2009 +0100
Cygwin/X: Avoid a potential null pointer dereference before input initialization
Avoid a null pointer dereference if WM_MOUSEMOVE occurred before
the input device had been initialized (a timing sensitive bug
occassionally seen during initialization)
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index d72a5f1..5e84510 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -717,6 +717,10 @@ winWindowProc (HWND hwnd, UINT message,
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break;
+ /* We can't do anything without g_pwinPointer */
+ if (g_pwinPointer == NULL)
+ break;
+
/* Has the mouse pointer crossed screens? */
if (s_pScreen != miPointerGetScreen(g_pwinPointer))
miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
commit 1b0dfd8dee639870725d3bd9b70c3bd589d09e5a
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Tue Jul 21 02:23:21 2009 +0100
Cygwin/X: Make -logverbose affect the verbosity of logging to the log file
Make -logverbose affect the verbosity of logging to the log file, not just the
verbosity of logging to the console
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 2f4b0d2..9aff336 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -706,7 +706,7 @@ OsVendorInit (void)
}
LogSetParameter (XLOG_FLUSH, 1);
LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose);
- LogSetParameter (XLOG_FILE_VERBOSITY, 1);
+ LogSetParameter (XLOG_FILE_VERBOSITY, g_iLogVerbose);
/* Log the version information */
if (serverGeneration == 1)
commit 83d120b90482d356be730f63aead0f8e44a4e846
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Thu Oct 1 14:47:22 2009 +0100
Xming: Fix various 'ISO C90 forbids mixed declarations and code' warnings
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c
index b537d32..99eb6b8 100644
--- a/hw/xwin/winmouse.c
+++ b/hw/xwin/winmouse.c
@@ -371,16 +371,15 @@ winMouseButtonsHandle (ScreenPtr pScreen,
*/
void winEnqueueMotion(int x, int y)
{
- miPointerSetPosition(g_pwinPointer, &x, &y);
-
int i, nevents;
int valuators[2];
-
EventListPtr events;
- GetEventList(&events);
+ miPointerSetPosition(g_pwinPointer, &x, &y);
valuators[0] = x;
valuators[1] = y;
+
+ GetEventList(&events);
nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
POINTER_ABSOLUTE, 0, 2, valuators);
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index e16b2a3..9f46a64 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -543,33 +543,34 @@ winUpdateIcon (Window id)
HICON hIcon, hIconSmall=NULL, hIconOld;
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
- if (!pWin) return;
- winWindowPriv(pWin);
- if (pWinPriv->hWnd) {
- hIcon = winOverrideIcon ((unsigned long)pWin);
- if (!hIcon) {
- hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
- if (!hIcon) {
- hIcon = g_hIconX;
- hIconSmall = g_hSmallIconX;
- } else {
- /* Leave undefined if not found */
- hIconSmall = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON));
+ if (pWin)
+ {
+ winWindowPriv(pWin);
+ if (pWinPriv->hWnd) {
+ hIcon = winOverrideIcon ((unsigned long)pWin);
+ if (!hIcon) {
+ hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
+ if (!hIcon) {
+ hIcon = g_hIconX;
+ hIconSmall = g_hSmallIconX;
+ } else {
+ /* Leave undefined if not found */
+ hIconSmall = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON));
+ }
+ }
+
+ /* Set the large icon */
+ hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
+ WM_SETICON, ICON_BIG, (LPARAM) hIcon);
+
+ /* Delete the icon if its not the default */
+ winDestroyIcon(hIconOld);
+
+ /* Same for the small icon */
+ hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
+ WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
+ winDestroyIcon(hIconOld);
}
- }
-
- /* Set the large icon */
- hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
- WM_SETICON, ICON_BIG, (LPARAM) hIcon);
-
- /* Delete the icon if its not the default */
- winDestroyIcon(hIconOld);
-
- /* Same for the small icon */
- hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
- WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
- winDestroyIcon(hIconOld);
-
}
}
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 543a165..d14ceee 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -282,11 +282,11 @@ static void winRaiseWindow(WindowPtr pWin)
if (!winInDestroyWindowsWindow && !winInRaiseWindow)
{
BOOL oldstate = winInRaiseWindow;
+ XID vlist[1] = { 0 };
winInRaiseWindow = TRUE;
/* Call configure window directly to make sure it gets processed
* in time
*/
- XID vlist[1] = { 0 };
ConfigureWindow(pWin, CWStackMode, vlist, serverClient);
winInRaiseWindow = oldstate;
}
@@ -416,12 +416,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
winReorderWindowsMultiWindow ();
/* Fix a 'round title bar corner background should be transparent not black' problem when first painted */
- RECT rWindow;
- HRGN hRgnWindow;
- GetWindowRect(hwnd, &rWindow);
- hRgnWindow = CreateRectRgnIndirect(&rWindow);
- SetWindowRgn (hwnd, hRgnWindow, TRUE);
- DeleteObject(hRgnWindow);
+ {
+ RECT rWindow;
+ HRGN hRgnWindow;
+ GetWindowRect(hwnd, &rWindow);
+ hRgnWindow = CreateRectRgnIndirect(&rWindow);
+ SetWindowRgn (hwnd, hRgnWindow, TRUE);
+ DeleteObject(hRgnWindow);
+ }
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)XMING_SIGNATURE);
@@ -897,10 +899,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
}
else /* It is an overridden window so make it top of Z stack */
{
+ HWND forHwnd = GetForegroundWindow();
#if CYGWINDOWING_DEBUG
ErrorF ("overridden window is shown\n");
#endif
- HWND forHwnd = GetForegroundWindow();
if (forHwnd != NULL)
{
if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE)
commit 78c87bdad1feab91c2a39e01513b4b0826665f06
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Fri Sep 25 17:49:59 2009 +0100
Xming: Remove unused X-boxed icon resource
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/X-boxed.ico b/hw/xwin/X-boxed.ico
deleted file mode 100755
index 0727042..0000000
Binary files a/hw/xwin/X-boxed.ico and /dev/null differ
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index 29c6f1c..df2664d 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -106,4 +106,3 @@ END
*/
IDI_XWIN ICON "X.ico"
-IDI_XWIN_BOXED ICON "X-boxed.ico"
diff --git a/hw/xwin/winresource.h b/hw/xwin/winresource.h
index 5aa8840..7085117 100644
--- a/hw/xwin/winresource.h
+++ b/hw/xwin/winresource.h
@@ -37,7 +37,6 @@
#define IDC_STATIC -1
#define IDI_XWIN 101
-#define IDI_XWIN_BOXED 102
#define IDM_TRAYICON_MENU 103
#define IDC_CLIENTS_CONNECTED 104
commit fdf7f7e95c852734c620f58df408a324902172cf
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Fri Sep 25 17:46:40 2009 +0100
Xming: update .rc file
Remove the obsolete DISCARDABLE flag in the .rc file
Replace the obsolete DIALOG resource with DIALOGEX in the .rc file
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index 5a254e1..29c6f1c 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -36,7 +36,7 @@
*/
/* About */
-ABOUT_BOX DIALOG DISCARDABLE 32, 32, 240, 105
+ABOUT_BOX DIALOGEX 32, 32, 240, 105
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
CAPTION "About " PROJECT_NAME
FONT 8, "MS Sans Serif"
@@ -58,7 +58,7 @@ END
/* Depth change */
-DEPTH_CHANGE_BOX DIALOG DISCARDABLE 32, 32, 180, 100
+DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
FONT 8, "MS Sans Serif"
CAPTION PROJECT_NAME
@@ -72,7 +72,7 @@ END
/* Exit */
-EXIT_DIALOG DIALOG DISCARDABLE 32, 32, 180, 78
+EXIT_DIALOG DIALOGEX 32, 32, 180, 78
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
FONT 8, "MS Sans Serif"
CAPTION "Exit " PROJECT_NAME "?"
@@ -89,7 +89,7 @@ END
* Menus
*/
-IDM_TRAYICON_MENU MENU DISCARDABLE
+IDM_TRAYICON_MENU MENU
BEGIN
POPUP "TRAYICON_MENU"
BEGIN
@@ -105,5 +105,5 @@ END
* Icons
*/
-IDI_XWIN ICON DISCARDABLE "X.ico"
-IDI_XWIN_BOXED ICON DISCARDABLE "X-boxed.ico"
+IDI_XWIN ICON "X.ico"
+IDI_XWIN_BOXED ICON "X-boxed.ico"
commit 5ddfd9d0898629627e8ab10e65ea2e082be3af37
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Sat Oct 3 13:07:23 2009 +0100
Cygwin/X: Don't build rootless extension code unless we need it
Only try to build rootless extension code if we really need it (i.e. mwextwm mode is enabled)
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/configure.ac b/configure.ac
index fa454fa..ed710f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1710,8 +1710,14 @@ if test "x$XWIN" = xyes; then
XWIN_SERVER_NAME=XWin
PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages])
- AC_DEFINE(ROOTLESS,1,[Build Rootless code])
- CFLAGS="$CFLAGS -DFD_SETSIZE=256 -DROOTLESS_WORKAROUND"
+
+ dnl if we have windowswmproto, build rootless extension for multwindowextwm mode
+ if test "x$WINDOWSWM" = xyes ; then
+ AC_DEFINE(ROOTLESS,1,[Build Rootless code])
+ CFLAGS="$CFLAGS -DROOTLESS_WORKAROUND"
+ fi
+
+ CFLAGS="$CFLAGS -DFD_SETSIZE=256"
;;
mingw*)
XWIN_SERVER_NAME=Xming
More information about the xorg-commit
mailing list