summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/InitInput.c15
-rw-r--r--hw/xwin/InitOutput.c48
-rw-r--r--hw/xwin/Makefile.am4
-rw-r--r--hw/xwin/XWin.man.pre8
-rw-r--r--[-rwxr-xr-x]hw/xwin/XWinrc.man.pre0
-rw-r--r--[-rwxr-xr-x]hw/xwin/glx/glwrap.c0
-rw-r--r--[-rwxr-xr-x]hw/xwin/glx/indirect.c5
-rw-r--r--hw/xwin/win.h14
-rw-r--r--hw/xwin/winblock.c10
-rw-r--r--hw/xwin/winclipboardthread.c2
-rw-r--r--[-rwxr-xr-x]hw/xwin/winclipboardwrappers.c0
-rw-r--r--hw/xwin/winclipboardxevents.c6
-rw-r--r--hw/xwin/wincmap.c7
-rw-r--r--hw/xwin/winconfig.c12
-rw-r--r--hw/xwin/wincursor.c4
-rw-r--r--[-rwxr-xr-x]hw/xwin/windialogs.c26
-rw-r--r--hw/xwin/winengine.c24
-rw-r--r--hw/xwin/winerror.c18
-rw-r--r--hw/xwin/winglobals.c8
-rw-r--r--hw/xwin/winglobals.h88
-rw-r--r--hw/xwin/winkeybd.c2
-rw-r--r--[-rwxr-xr-x]hw/xwin/winkeyhook.c8
-rw-r--r--hw/xwin/winlayouts.h266
-rw-r--r--hw/xwin/winmouse.c13
-rw-r--r--[-rwxr-xr-x]hw/xwin/winmultiwindowclass.c0
-rw-r--r--[-rwxr-xr-x]hw/xwin/winmultiwindowclass.h0
-rw-r--r--hw/xwin/winmultiwindowicons.c7
-rw-r--r--hw/xwin/winmultiwindowwindow.c10
-rw-r--r--hw/xwin/winmultiwindowwm.c4
-rw-r--r--hw/xwin/winmultiwindowwndproc.c9
-rw-r--r--hw/xwin/winnativegdi.c7
-rw-r--r--hw/xwin/winpfbdd.c8
-rw-r--r--hw/xwin/winpixmap.c7
-rw-r--r--hw/xwin/winprefs.c11
-rw-r--r--hw/xwin/winprefs.h3
-rw-r--r--[-rwxr-xr-x]hw/xwin/winprocarg.c26
-rw-r--r--[-rwxr-xr-x]hw/xwin/winrandr.c0
-rw-r--r--hw/xwin/winscrinit.c8
-rw-r--r--hw/xwin/winshaddd.c57
-rw-r--r--hw/xwin/winshadddnl.c55
-rw-r--r--hw/xwin/winshadgdi.c57
-rw-r--r--[-rwxr-xr-x]hw/xwin/wintrayicon.c0
-rw-r--r--[-rwxr-xr-x]hw/xwin/winvalargs.c7
-rw-r--r--[-rwxr-xr-x]hw/xwin/winvideo.c0
-rw-r--r--hw/xwin/winwakeup.c10
-rw-r--r--[-rwxr-xr-x]hw/xwin/winwin32rootless.c1
-rw-r--r--[-rwxr-xr-x]hw/xwin/winwin32rootlesswindow.c0
-rw-r--r--[-rwxr-xr-x]hw/xwin/winwin32rootlesswndproc.c8
-rw-r--r--[-rwxr-xr-x]hw/xwin/winwindowswm.c30
-rw-r--r--hw/xwin/winwndproc.c18
50 files changed, 226 insertions, 705 deletions
diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
index cec4df79f..70578b16c 100644
--- a/hw/xwin/InitInput.c
+++ b/hw/xwin/InitInput.c
@@ -52,21 +52,6 @@ int winProcSetSelectionOwner(ClientPtr /* client */);
DeviceIntPtr g_pwinPointer;
DeviceIntPtr g_pwinKeyboard;
-
-/*
- * References to external symbols
- */
-
-#ifdef HAS_DEVWINDOWS
-extern int g_fdMessageQueue;
-#endif
-extern Bool g_fXdmcpEnabled;
-#ifdef XWIN_CLIPBOARD
-extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern winDispatchProcPtr winProcQueryTreeOrig;
-#endif
-
-
/* Called from dix/devices.c */
/*
* All of our keys generate up and down transition notifications,
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 73cc263bd..38a658d77 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -58,29 +58,9 @@ typedef HRESULT (*SHGETFOLDERPATHPROC)(
);
#endif
-
/*
* References to external symbols
*/
-
-extern int g_iNumScreens;
-extern winScreenInfo * g_ScreenInfo;
-extern char * g_pszCommandLine;
-extern Bool g_fSilentFatalError;
-
-extern const char * g_pszLogFile;
-extern Bool g_fLogFileChanged;
-extern int g_iLogVerbose;
-Bool g_fLogInited;
-
-extern Bool g_fXdmcpEnabled;
-extern Bool g_fAuthEnabled;
-#ifdef HAS_DEVWINDOWS
-extern int g_fdMessageQueue;
-#endif
-extern const char * g_pszQueryHost;
-extern HINSTANCE g_hInstance;
-
#ifdef XWIN_CLIPBOARD
extern Bool g_fUnicodeClipboard;
extern Bool g_fClipboardLaunched;
@@ -90,15 +70,11 @@ extern HWND g_hwndClipboard;
extern Bool g_fClipboard;
#endif
-extern HMODULE g_hmodDirectDraw;
-extern FARPROC g_fpDirectDrawCreate;
-extern FARPROC g_fpDirectDrawCreateClipper;
-
-extern HMODULE g_hmodCommonControls;
-extern FARPROC g_fpTrackMouseEvent;
-extern Bool g_fNoHelpMessageBox;
-extern Bool g_fSilentDupError;
-extern Bool g_fNativeGl;
+
+/*
+ module handle for dynamically loaded comctl32 library
+*/
+static HMODULE g_hmodCommonControls = NULL;
/*
* Function prototypes
@@ -258,15 +234,9 @@ ddxGiveUp (void)
* At this point we aren't creating any new screens, so
* we are guaranteed to not need the DirectDraw functions.
*/
- if (g_hmodDirectDraw != NULL)
- {
- FreeLibrary (g_hmodDirectDraw);
- g_hmodDirectDraw = NULL;
- g_fpDirectDrawCreate = NULL;
- g_fpDirectDrawCreateClipper = NULL;
- }
+ winReleaseDDProcAddresses();
- /* Unload our TrackMouseEvent funtion pointer */
+ /* Unload our TrackMouseEvent function pointer */
if (g_hmodCommonControls != NULL)
{
FreeLibrary (g_hmodCommonControls);
@@ -437,7 +407,7 @@ winFixupPaths (void)
int needs_sep = TRUE;
int comment_block = FALSE;
- /* get defautl fontpath */
+ /* get default fontpath */
char *fontpath = strdup(defaultFontPath);
size_t size = strlen(fontpath);
@@ -873,7 +843,7 @@ winUseMsg (void)
ErrorF ("-silent-dup-error\n"
"\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
- "\texit silently and don’t display any error message.\n");
+ "\texit silently and don't display any error message.\n");
ErrorF ("-swcursor\n"
"\tDisable the usage of the Windows cursor and use the X11 software\n"
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 03cb80824..232d65e86 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -162,8 +162,8 @@ AM_YFLAGS = -d
AM_LFLAGS = -i
AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
$(XWINMODULES_CFLAGS) \
- -DXFree86Server \
- -I$(top_srcdir)
+ -I$(top_srcdir) \
+ -Wno-bad-function-cast
MAN_SRCS = XWin.man.pre XWinrc.man.pre
diff --git a/hw/xwin/XWin.man.pre b/hw/xwin/XWin.man.pre
index 6b28b51d4..51268f69a 100644
--- a/hw/xwin/XWin.man.pre
+++ b/hw/xwin/XWin.man.pre
@@ -251,7 +251,7 @@ exit silently and don't display any error message.
.B "\-xkbrules \fIrule\fP"
.TP 8
.B "\-xkbvariant \fIvariant\fp"
-These options implement the xkeyboard extension for loading
+These options configure the xkeyboard extension to load
a particular keyboard map as the X server starts. The behavior is similar
to the \fIsetxkbmap\fP program. The layout data is located at \fI
__datadir__/X11/xkb/\fP. Additional information is found in the
@@ -264,9 +264,9 @@ the options:
Alternatively one may use the \fIsetxkbmap\fP program after \fIXWin\fP is
running.
-The default is to select a layout matching your current layout as
-reported by \fIWindows\fP if known, or the default X server layout
-if no matching keyboard layout was found.
+The default is to select a configuration matching your current layout as
+reported by \fIWindows\fP, if known, or the default X server configuration
+if no matching keyboard configuration was found.
.SH UNDOCUMENTED OPTIONS
These options are undocumented. Do not use them.
diff --git a/hw/xwin/XWinrc.man.pre b/hw/xwin/XWinrc.man.pre
index 5c1fb979b..5c1fb979b 100755..100644
--- a/hw/xwin/XWinrc.man.pre
+++ b/hw/xwin/XWinrc.man.pre
diff --git a/hw/xwin/glx/glwrap.c b/hw/xwin/glx/glwrap.c
index 5190d36f7..5190d36f7 100755..100644
--- a/hw/xwin/glx/glwrap.c
+++ b/hw/xwin/glx/glwrap.c
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 38918859a..5d7391d4c 100755..100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -682,10 +682,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
unsigned int buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0)
{
- if (screen->base.GLXextensions != NULL)
- {
- free(screen->base.GLXextensions);
- }
+ free(screen->base.GLXextensions);
screen->base.GLXextensions = xnfalloc(buffer_size);
__glXGetExtensionString(screen->glx_enable_bits, screen->base.GLXextensions);
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 1b1358cda..f22a2d576 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -314,9 +314,6 @@ typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
-/* Typedef for DIX wrapper functions */
-typedef int (*winDispatchProcPtr) (ClientPtr);
-
/*
* GC (graphics context) privates
@@ -622,6 +619,8 @@ typedef struct {
* Extern declares for general global variables
*/
+#include "winglobals.h"
+
extern winScreenInfo * g_ScreenInfo;
extern miPointerScreenFuncRec g_winPointerCursorFuncs;
extern DWORD g_dwEvents;
@@ -648,16 +647,12 @@ extern const char * g_pszQueryHost;
extern DeviceIntPtr g_pwinPointer;
extern DeviceIntPtr g_pwinKeyboard;
-
/*
- * Extern declares for dynamically loaded libraries and function pointers
+ * Extern declares for dynamically loaded library function pointers
*/
-extern HMODULE g_hmodDirectDraw;
extern FARPROC g_fpDirectDrawCreate;
extern FARPROC g_fpDirectDrawCreateClipper;
-
-extern HMODULE g_hmodCommonControls;
extern FARPROC g_fpTrackMouseEvent;
@@ -859,6 +854,9 @@ winSetEngine (ScreenPtr pScreen);
Bool
winGetDDProcAddresses (void);
+void
+winReleaseDDProcAddresses(void);
+
/*
* winerror.c
diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c
index abea60e0f..e165d5488 100644
--- a/hw/xwin/winblock.c
+++ b/hw/xwin/winblock.c
@@ -34,16 +34,6 @@
#include "win.h"
#include "winmsg.h"
-
-/*
- * References to external symbols
- */
-
-extern HWND g_hDlgDepthChange;
-extern HWND g_hDlgExit;
-extern HWND g_hDlgAbout;
-
-
/* See Porting Layer Definition - p. 6 */
void
winBlockHandler (int nScreen,
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index 5d2b9487e..e7df4527e 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -437,7 +437,7 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr)
pszErrorMsg,
sizeof (pszErrorMsg));
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
- "\tSerial: %d, Request Code: %d, Minor Code: %d\n",
+ "\tSerial: %lu, Request Code: %d, Minor Code: %d\n",
pszErrorMsg,
pErr->serial,
pErr->request_code,
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
index bdacefba5..bdacefba5 100755..100644
--- a/hw/xwin/winclipboardwrappers.c
+++ b/hw/xwin/winclipboardwrappers.c
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index edb6ac4bd..2f042fd0b 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -76,7 +76,7 @@ winClipboardFlushXEvents (HWND hwnd,
XEvent event;
XSelectionEvent eventSelection;
unsigned long ulReturnBytesLeft;
- unsigned char *pszReturnData = NULL;
+ char *pszReturnData = NULL;
char *pszGlobalData = NULL;
int iReturn;
HGLOBAL hGlobal = NULL;
@@ -221,7 +221,7 @@ winClipboardFlushXEvents (HWND hwnd,
if (!OpenClipboard (hwnd))
{
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
- "OpenClipboard () failed: %08x\n",
+ "OpenClipboard () failed: %08lx\n",
GetLastError ());
/* Abort */
@@ -262,7 +262,7 @@ winClipboardFlushXEvents (HWND hwnd,
if (!hGlobal)
{
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
- "GetClipboardData () failed: %08x\n",
+ "GetClipboardData () failed: %08lx\n",
GetLastError ());
/* Abort */
diff --git a/hw/xwin/wincmap.c b/hw/xwin/wincmap.c
index 9da03888d..d526a9201 100644
--- a/hw/xwin/wincmap.c
+++ b/hw/xwin/wincmap.c
@@ -516,11 +516,8 @@ winGetPaletteDD (ScreenPtr pScreen, ColormapPtr pcmap)
pScreen->blackPixel = 0;
/* Free colormap */
- if (ppeColors != NULL)
- {
- free (ppeColors);
- ppeColors = NULL;
- }
+ free(ppeColors);
+ ppeColors = NULL;
/* Free the DC */
if (hdc != NULL)
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index a88b6f1cf..758c54d89 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -712,8 +712,8 @@ winNameCompare (const char *s1, const char *s2)
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
s2++;
- c1 = (isupper (*s1) ? tolower (*s1) : *s1);
- c2 = (isupper (*s2) ? tolower (*s2) : *s2);
+ c1 = (isupper ((int)*s1) ? tolower ((int)*s1) : *s1);
+ c2 = (isupper ((int)*s2) ? tolower ((int)*s2) : *s2);
while (c1 == c2)
{
@@ -727,8 +727,8 @@ winNameCompare (const char *s1, const char *s2)
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
s2++;
- c1 = (isupper (*s1) ? tolower (*s1) : *s1);
- c2 = (isupper (*s2) ? tolower (*s2) : *s2);
+ c1 = (isupper ((int)*s1) ? tolower ((int)*s1) : *s1);
+ c2 = (isupper ((int)*s2) ? tolower ((int)*s2) : *s2);
}
return c1 - c2;
}
@@ -1089,8 +1089,8 @@ winNormalizeName (const char *s)
case '\t':
continue;
default:
- if (isupper (*p))
- *q++ = tolower (*p);
+ if (isupper ((int)*p))
+ *q++ = tolower ((int)*p);
else
*q++ = *p;
}
diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c
index 7f1935a5d..0ed1d1349 100644
--- a/hw/xwin/wincursor.c
+++ b/hw/xwin/wincursor.c
@@ -41,8 +41,6 @@
#include <servermd.h>
#include "misc.h"
-extern Bool g_fSoftwareCursor;
-
#define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114)
#if 0
@@ -557,7 +555,7 @@ static void
winDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr)
{
winScreenPriv(pScr);
- return pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr);
+ pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr);
}
static miPointerSpriteFuncRec winSpriteFuncsRec = {
diff --git a/hw/xwin/windialogs.c b/hw/xwin/windialogs.c
index 3ec9b78ff..22d8cd7f7 100755..100644
--- a/hw/xwin/windialogs.c
+++ b/hw/xwin/windialogs.c
@@ -44,21 +44,9 @@
* References to external globals
*/
-extern Bool g_fCursor;
-extern HWND g_hDlgDepthChange;
-extern HWND g_hDlgExit;
-extern HWND g_hDlgAbout;
-extern WINPREFS pref;
#ifdef XWIN_CLIPBOARD
extern Bool g_fClipboardStarted;
#endif
-extern Bool g_fSoftwareCursor;
-
-#if defined(XWIN_MULTIWINDOW)
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
-#endif
-
/*
* Local function prototypes
*/
@@ -324,7 +312,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the Cancel button */
PostMessage (g_hDlgExit, WM_NEXTDLGCTL,
- GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
+ (WPARAM)GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
}
#define CONNECTED_CLIENTS_FORMAT "There %s currently %d client%s connected."
@@ -594,7 +582,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the OK button */
PostMessage (g_hDlgAbout, WM_NEXTDLGCTL,
- GetDlgItem (g_hDlgAbout, IDOK), TRUE);
+ (WPARAM)GetDlgItem (g_hDlgAbout, IDOK), TRUE);
}
@@ -675,7 +663,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
case ID_ABOUT_CHANGELOG:
{
- HINSTANCE iReturn;
+ int iReturn;
#ifdef __CYGWIN__
const char * pszCygPath = "/usr/X11R6/share/doc/"
"xorg-x11-xwin/changelog.html";
@@ -688,7 +676,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
"devel/server/changelog.html";
#endif
- iReturn = ShellExecute (NULL,
+ iReturn = (int)ShellExecute (NULL,
"open",
pszWinPath,
NULL,
@@ -708,7 +696,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = __VENDORDWEBSUPPORT__;
int iReturn;
- iReturn = ShellExecute (NULL,
+ iReturn = (int)ShellExecute (NULL,
"open",
pszPath,
NULL,
@@ -728,7 +716,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/ug/";
int iReturn;
- iReturn = ShellExecute (NULL,
+ iReturn = (int)ShellExecute (NULL,
"open",
pszPath,
NULL,
@@ -748,7 +736,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/faq/";
int iReturn;
- iReturn = ShellExecute (NULL,
+ iReturn = (int)ShellExecute (NULL,
"open",
pszPath,
NULL,
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index fb9aed8a0..e866e1ea1 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -34,13 +34,17 @@
#include "win.h"
#include "winmsg.h"
-
/*
- * External global variables
+ * Global variables for function pointers into
+ * dynamically loaded libraries
*/
+FARPROC g_fpDirectDrawCreate = NULL;
+FARPROC g_fpDirectDrawCreateClipper = NULL;
-extern const GUID _IID_IDirectDraw4;
-
+/*
+ module handle for dynamically loaded directdraw library
+*/
+static HMODULE g_hmodDirectDraw = NULL;
/*
* Detect engines supported by current Windows version
@@ -334,3 +338,15 @@ winGetDDProcAddresses (void)
return fReturn;
}
+
+void
+winReleaseDDProcAddresses(void)
+{
+ if (g_hmodDirectDraw != NULL)
+ {
+ FreeLibrary (g_hmodDirectDraw);
+ g_hmodDirectDraw = NULL;
+ g_fpDirectDrawCreate = NULL;
+ g_fpDirectDrawCreateClipper = NULL;
+ }
+}
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c
index cb69c57c2..aadfd2858 100644
--- a/hw/xwin/winerror.c
+++ b/hw/xwin/winerror.c
@@ -31,21 +31,10 @@
#ifdef HAVE_XWIN_CONFIG_H
#include <xwin-config.h>
#endif
-#ifdef XVENDORNAME
-#define VENDOR_STRING XVENDORNAME
-#define VENDOR_CONTACT BUILDERADDR
-#endif
#include <../xfree86/common/xorgVersion.h>
#include "win.h"
-/* References to external symbols */
-extern char * g_pszCommandLine;
-extern const char * g_pszLogFile;
-extern Bool g_fSilentFatalError;
-extern Bool g_fLogInited;
-
-
#ifdef DDXOSVERRORF
/* Prototype */
void
@@ -129,11 +118,12 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
"%s\n"
pszMsgBox = Xprintf (MESSAGEBOXF,
- pszErrorF, VENDOR_STRING,
+ pszErrorF, XVENDORNAME,
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
- VENDOR_CONTACT,
+ BUILDERADDR,
BUILDERSTRING,
- g_pszCommandLine);
+ g_pszCommandLine);
+
if (!pszMsgBox)
goto winMessageBoxF_Cleanup;
diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c
index f3f01d7da..2909f371b 100644
--- a/hw/xwin/winglobals.c
+++ b/hw/xwin/winglobals.c
@@ -73,8 +73,6 @@ char * g_pszCommandLine = NULL;
Bool g_fSilentFatalError = FALSE;
DWORD g_dwCurrentThreadID = 0;
Bool g_fKeyboardHookLL = FALSE;
-HHOOK g_hhookKeyboardLL = NULL;
-HWND g_hwndKeyboardFocus = NULL;
Bool g_fNoHelpMessageBox = FALSE;
Bool g_fSoftwareCursor = FALSE;
Bool g_fSilentDupError = FALSE;
@@ -85,11 +83,6 @@ Bool g_fNativeGl = FALSE;
* their function pointers
*/
-HMODULE g_hmodDirectDraw = NULL;
-FARPROC g_fpDirectDrawCreate = NULL;
-FARPROC g_fpDirectDrawCreateClipper = NULL;
-
-HMODULE g_hmodCommonControls = NULL;
FARPROC g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
@@ -127,7 +120,6 @@ void
winInitializeGlobals (void)
{
g_dwCurrentThreadID = GetCurrentThreadId ();
- g_hwndKeyboardFocus = NULL;
#ifdef XWIN_CLIPBOARD
g_fClipboardLaunched = FALSE;
g_fClipboardStarted = FALSE;
diff --git a/hw/xwin/winglobals.h b/hw/xwin/winglobals.h
new file mode 100644
index 000000000..89926796c
--- /dev/null
+++ b/hw/xwin/winglobals.h
@@ -0,0 +1,88 @@
+/*
+ File: winglobals.h
+ Purpose: declarations for global variables
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef WINGLOBALS_H
+#define WINGLOBALS_H
+
+/*
+ * References to external symbols
+ */
+
+extern int g_iNumScreens;
+extern int g_iLastScreen;
+extern char * g_pszCommandLine;
+extern Bool g_fSilentFatalError;
+extern const char * g_pszLogFile;
+#ifdef RELOCATE_PROJECTROOT
+extern Bool g_fLogFileChanged;
+#endif
+extern int g_iLogVerbose;
+extern Bool g_fLogInited;
+
+extern Bool g_fAuthEnabled;
+extern Bool g_fXdmcpEnabled;
+
+extern Bool g_fNoHelpMessageBox;
+extern Bool g_fSilentDupError;
+extern Bool g_fNativeGl;
+
+extern HWND g_hDlgDepthChange;
+extern HWND g_hDlgExit;
+extern HWND g_hDlgAbout;
+
+extern Bool g_fSoftwareCursor;
+extern Bool g_fCursor;
+
+#ifdef XWIN_CLIPBOARD
+
+/* Typedef for DIX wrapper functions */
+typedef int (*winDispatchProcPtr) (ClientPtr);
+
+/*
+ * Wrapped DIX functions
+ */
+extern winDispatchProcPtr winProcEstablishConnectionOrig;
+extern winDispatchProcPtr winProcQueryTreeOrig;
+extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
+#endif
+
+/* The global X default icons */
+#if defined(XWIN_MULTIWINDOW)
+extern HICON g_hIconX;
+extern HICON g_hSmallIconX;
+#endif
+
+#ifdef XWIN_MULTIWINDOW
+extern DWORD g_dwCurrentThreadID;
+#endif
+
+extern Bool g_fKeyboardHookLL;
+extern Bool g_fButton[3];
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+extern Bool g_fNoConfigureWindow;
+#endif
+
+#endif /* WINGLOBALS_H */
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 6d91ce0d6..83fea21cd 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -486,7 +486,7 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE);
for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinKeyboard, events[i].event);
+ mieqEnqueue(g_pwinKeyboard, (InternalEvent*)events[i].event);
#if CYGDEBUG
ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
diff --git a/hw/xwin/winkeyhook.c b/hw/xwin/winkeyhook.c
index 2d6ed18b7..fe1156dcf 100755..100644
--- a/hw/xwin/winkeyhook.c
+++ b/hw/xwin/winkeyhook.c
@@ -34,13 +34,7 @@
#include "win.h"
-/*
- * References to external symbols
- */
-
-extern HHOOK g_hhookKeyboardLL;
-extern DWORD g_dwCurrentThreadID;
-extern HWND g_hwndKeyboardFocus;
+static HHOOK g_hhookKeyboardLL = NULL;
/*
diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index d1d21a12d..9500689bc 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -42,232 +42,52 @@ typedef struct
This table is sorted by low byte of winlayout, then by next byte, etc.
*/
-WinKBLayoutRec winKBLayouts[] =
+WinKBLayoutRec winKBLayouts[] =
{
- { 0x404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"},
- { 0x405, -1, "pc105", "cz", NULL, NULL, "Czech"},
- {0x10405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"},
- { 0x406, -1, "pc105", "dk", NULL, NULL, "Danish"},
- { 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
- {0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
- { 0x807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"},
- { 0x409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
- {0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
- {0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
- { 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
- { 0x1809, -1, "pc105", "ie", NULL, NULL, "Irish"},
- { 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
- { 0x80a, -1, "pc105", "latam", NULL, NULL, "Latin American"},
- { 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
- { 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
- { 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
- { 0xc0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"},
- { 0x100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
- { 0x40d, -1, "pc105", "il", NULL, NULL, "Hebrew"},
- { 0x40e, -1, "pc105", "hu", NULL, NULL, "Hungarian"},
- { 0x40f, -1, "pc105", "is", NULL, NULL, "Icelandic"},
- { 0x410, -1, "pc105", "it", NULL, NULL, "Italian"},
- {0x10410, -1, "pc105", "it", NULL, NULL, "Italian (142)"},
- {0xa0000410,-1, "macbook79","it", "mac",NULL, "Italiano (Apple)"},
- { 0x411, 7, "jp106", "jp", NULL, NULL, "Japanese"},
- { 0x413, -1, "pc105", "nl", NULL, NULL, "Dutch"},
- { 0x813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"},
- { 0x414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
- { 0x415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"},
- { 0x416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil, ABNT)"},
- {0x10416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil, ABNT2)"},
- { 0x816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
- { 0x41a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
- { 0x41d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
- { 0x424, -1, "pc105", "si", NULL, NULL, "Slovenian"},
- { 0x425, -1, "pc105", "ee", NULL, NULL, "Estonian"},
- { 0x452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"},
- { -1, -1, NULL, NULL, NULL, NULL, NULL}
+ { 0x00000404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"},
+ { 0x00000405, -1, "pc105", "cz", NULL, NULL, "Czech"},
+ { 0x00010405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"},
+ { 0x00000406, -1, "pc105", "dk", NULL, NULL, "Danish"},
+ { 0x00000407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
+ { 0x00010407, -1, "pc105", "de", NULL, NULL, "German (Germany,IBM)"},
+ { 0x00000807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"},
+ { 0x00000409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
+ { 0x00010409, -1, "pc105", "dvorak", NULL, NULL, "English (USA,Dvorak)"},
+ { 0x00020409, -1, "pc105", "us_intl", NULL, NULL, "English (USA,International)"},
+ { 0x00000809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
+ { 0x00001809, -1, "pc105", "ie", NULL, NULL, "Irish"},
+ { 0x0000040a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain,Traditional Sort)"},
+ { 0x0000080a, -1, "pc105", "latam", NULL, NULL, "Latin American"},
+ { 0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
+ { 0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
+ { 0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
+ { 0x00000c0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"},
+ { 0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
+ { 0x0000040d, -1, "pc105", "il", NULL, NULL, "Hebrew"},
+ { 0x0000040e, -1, "pc105", "hu", NULL, NULL, "Hungarian"},
+ { 0x0000040f, -1, "pc105", "is", NULL, NULL, "Icelandic"},
+ { 0x00000410, -1, "pc105", "it", NULL, NULL, "Italian"},
+ { 0x00010410, -1, "pc105", "it", NULL, NULL, "Italian (142)"},
+ { 0xa0000410, -1, "macbook79", "it", "mac", NULL, "Italiano (Apple)"},
+ { 0x00000411, 7, "jp106", "jp", NULL, NULL, "Japanese"},
+ { 0x00000413, -1, "pc105", "nl", NULL, NULL, "Dutch"},
+ { 0x00000813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"},
+ { 0x00000414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
+ { 0x00000415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"},
+ { 0x00000416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil,ABNT)"},
+ { 0x00010416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil,ABNT2)"},
+ { 0x00000816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
+ { 0x0000041a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
+ { 0x0000041d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
+ { 0x00000424, -1, "pc105", "si", NULL, NULL, "Slovenian"},
+ { 0x00000425, -1, "pc105", "ee", NULL, NULL, "Estonian"},
+ { 0x00000452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"},
+ { -1, -1, NULL, NULL, NULL, NULL, NULL}
};
-/* Listing of language codes from MSDN */
/*
-Support ID XKB Language
-====================================================================
- ? 0x0000 Language Neutral
- ? 0x0400 Process or User Default Language
- ? 0x0800 System Default Language
- 0x0401 Arabic (Saudi Arabia)
- 0x0801 Arabic (Iraq)
- 0x0c01 Arabic (Egypt)
- 0x1001 Arabic (Libya)
- 0x1401 Arabic (Algeria)
- 0x1801 Arabic (Morocco)
- 0x1c01 Arabic (Tunisia)
- 0x2001 Arabic (Oman)
- 0x2401 Arabic (Yemen)
- 0x2801 Arabic (Syria)
- 0x2c01 Arabic (Jordan)
- 0x3001 Arabic (Lebanon)
- 0x3401 Arabic (Kuwait)
- 0x3801 Arabic (U.A.E.)
- 0x3c01 Arabic (Bahrain)
- 0x4001 Arabic (Qatar)
- Arabic (102) AZERTY
- 0x0402 Bulgarian
- 0x0403 Catalan
- 0x0404 Chinese (Taiwan)
- 0x0804 Chinese (PRC)
- 0x0c04 Chinese (Hong Kong SAR, PRC)
- 0x1004 Chinese (Singapore)
- 0x1404 Chinese (Macao SAR) (98/ME,2K/XP)
- X 0x0405 cz Czech
- X cz_qwerty Czech (QWERTY)
- Czech (Programmers)
- X 0x0406 dk Danish
- X 0x0407 de German (Standard)
- X 0x0807 de_CH German (Switzerland)
- 0x0c07 German (Austria)
- 0x1007 German (Luxembourg)
- 0x1407 German (Liechtenstein)
- 0x0408 Greek
- X 0x0409 us English (United States)
- X 0x0809 gb English (United Kingdom)
- 0x0c09 English (Australian)
- 0x1009 English (Canadian)
- 0x1409 English (New Zealand)
- X 0x1809 ie English (Ireland)
- 0x1c09 English (South Africa)
- 0x2009 English (Jamaica)
- 0x2409 English (Caribbean)
- 0x2809 English (Belize)
- 0x2c09 English (Trinidad)
- 0x3009 English (Zimbabwe) (98/ME,2K/XP)
- 0x3409 English (Philippines) (98/ME,2K/XP)
- X 0x040a es Spanish (Spain, Traditional Sort)
- 0x080a Spanish (Mexican)
- 0x0c0a Spanish (Spain, Modern Sort)
- 0x100a Spanish (Guatemala)
- 0x140a Spanish (Costa Rica)
- 0x180a Spanish (Panama)
- 0x1c0a Spanish (Dominican Republic)
- 0x200a Spanish (Venezuela)
- 0x240a Spanish (Colombia)
- 0x280a Spanish (Peru)
- 0x2c0a Spanish (Argentina)
- 0x300a Spanish (Ecuador)
- 0x340a Spanish (Chile)
- 0x380a Spanish (Uruguay)
- 0x3c0a Spanish (Paraguay)
- 0x400a Spanish (Bolivia)
- 0x440a Spanish (El Salvador)
- 0x480a Spanish (Honduras)
- 0x4c0a Spanish (Nicaragua)
- 0x500a Spanish (Puerto Rico)
- X 0x040b fi Finnish
- Finnish (with Sami)
- X 0x040c fr French (Standard)
- X 0x080c be French (Belgian)
- . 0x0c0c French (Canadian)
- French (Canadian, Legacy)
- Canadian (Multilingual)
- X 0x100c fr_CH French (Switzerland)
- 0x140c French (Luxembourg)
- 0x180c French (Monaco) (98/ME,2K/XP)
- 0x040d Hebrew
- X 0x040e hu Hungarian
- . 0x040f Icelandic
- X 0x0410 it Italian (Standard)
- 0x0810 Italian (Switzerland)
- X 0x0411 jp Japanese
- 0x0412 Korean
- 0x0812 Korean (Johab) (95,NT)
- . 0x0413 Dutch (Netherlands)
- X 0x0813 be Dutch (Belgium)
- X 0x0414 no Norwegian (Bokmal)
- 0x0814 Norwegian (Nynorsk)
- . 0x0415 Polish
- X 0x0416 br Portuguese (Brazil)
- X 0x0816 pt Portuguese (Portugal)
- . 0x0418 Romanian
- 0x0419 Russian
- . 0x041a Croatian
- . 0x081a Serbian (Latin)
- . 0x0c1a Serbian (Cyrillic)
- 0x101a Croatian (Bosnia and Herzegovina)
- 0x141a Bosnian (Bosnia and Herzegovina)
- 0x181a Serbian (Latin, Bosnia, and Herzegovina)
- 0x1c1a Serbian (Cyrillic, Bosnia, and Herzegovina)
- . 0x041b Slovak
- . 0x041c Albanian
- X 0x041d se Swedish
- 0x081d Swedish (Finland)
- 0x041e Thai
- 0x041f Turkish
- 0x0420 Urdu (Pakistan) (98/ME,2K/XP)
- 0x0820 Urdu (India)
- 0x0421 Indonesian
- 0x0422 Ukrainian
- 0x0423 Belarusian
- . 0x0424 Slovenian
- 0x0425 Estonian
- 0x0426 Latvian
- 0x0427 Lithuanian
- 0x0827 Lithuanian (Classic) (98)
- 0x0429 Farsi
- 0x042a Vietnamese (98/ME,NT,2K/XP)
- 0x042b Armenian. This is Unicode only. (2K/XP)
- Armenian Eastern
- Armenian Western
- 0x042c Azeri (Latin)
- 0x082c Azeri (Cyrillic)
- 0x042d Basque
- 0x042f Macedonian (FYROM)
- 0x0430 Sutu
- 0x0432 Setswana/Tswana (South Africa)
- 0x0434 isiXhosa/Xhosa (South Africa)
- 0x0435 isiZulu/Zulu (South Africa)
- 0x0436 Afrikaans
- 0x0437 Georgian. This is Unicode only. (2K/XP)
- . 0x0438 Faeroese
- 0x0439 Hindi. This is Unicode only. (2K/XP)
- 0x043a Maltese (Malta)
- 0x043b Sami, Northern (Norway)
- 0x083b Sami, Northern (Sweden)
- 0x0c3b Sami, Northern (Finland)
- 0x103b Sami, Lule (Norway)
- 0x143b Sami, Lule (Sweden)
- 0x183b Sami, Southern (Norway)
- 0x1c3b Sami, Southern (Sweden)
- 0x203b Sami, Skolt (Finland)
- 0x243b Sami, Inari (Finland)
- 0x043e Malay (Malaysian)
- 0x083e Malay (Brunei Darussalam)
- 0x0440 Kyrgyz. (XP)
- 0x0441 Swahili (Kenya)
- 0x0443 Uzbek (Latin)
- 0x0843 Uzbek (Cyrillic)
- 0x0444 Tatar (Tatarstan)
- 0x0445 Bengali (India)
- Bengali (Inscript)
- 0x0446 Punjabi. This is Unicode only. (XP)
- 0x0447 Gujarati. This is Unicode only. (XP)
- 0x0449 Tamil. This is Unicode only. (2K/XP)
- 0x044a Telugu. This is Unicode only. (XP)
- 0x044b Kannada. This is Unicode only. (XP)
- 0x044c Malayalam (India)
- 0x044e Marathi. This is Unicode only. (2K/XP)
- 0x044f Sanskrit. This is Unicode only. (2K/XP)
- 0x0450 Mongolian (XP)
- 0x0452 Welsh (United Kingdom)
- 0x0455 Burmese
- 0x0456 Galician (XP)
- 0x0457 Konkani. This is Unicode only. (2K/XP)
- 0x045a Syriac. This is Unicode only. (XP)
- 0x0465 Divehi. This is Unicode only. (XP)
- Divehi (Phonetic)
- Divehi (Typewriter)
- 0x046b Quechua (Bolivia)
- 0x086b Quechua (Ecuador)
- 0x0c6b Quechua (Peru)
- 0x046c Sesotho sa Leboa/Northern Sotho (South Africa)
- 0x007f LOCALE_INVARIANT. See MAKELCID.
- 0x0481 Maori (New Zealand)
-*/
+ See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx
+ for a listing of input locale (keyboard layout) codes
+*/
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c
index e645d7ebc..da1d5a9e7 100644
--- a/hw/xwin/winmouse.c
+++ b/hw/xwin/winmouse.c
@@ -36,14 +36,12 @@
#endif
#include "win.h"
-#if defined(XFree86Server)
#include "inputstr.h"
#include "exevents.h" /* for button/axes labels */
#include "xserver-properties.h"
/* Peek the internal button mapping */
static CARD8 const *g_winMouseButtonMap = NULL;
-#endif
/*
@@ -123,9 +121,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
free(map);
free(btn_labels);
-#if defined(XFree86Server)
g_winMouseButtonMap = pDeviceInt->button->map;
-#endif
break;
case DEVICE_ON:
@@ -133,9 +129,8 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
break;
case DEVICE_CLOSE:
-#if defined(XFree86Server)
g_winMouseButtonMap = NULL;
-#endif
+
case DEVICE_OFF:
pDevice->on = FALSE;
break;
@@ -242,10 +237,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
int i, nevents;
ValuatorMask mask;
-#if defined(XFree86Server)
if (g_winMouseButtonMap)
iButton = g_winMouseButtonMap[iButton];
-#endif
valuator_mask_zero(&mask);
GetEventList(&events);
@@ -253,7 +246,7 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
POINTER_RELATIVE, &mask);
for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, events[i].event);
+ mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
#if CYGDEBUG
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
@@ -388,5 +381,5 @@ void winEnqueueMotion(int x, int y)
POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, events[i].event);
+ mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
}
diff --git a/hw/xwin/winmultiwindowclass.c b/hw/xwin/winmultiwindowclass.c
index a5cf2120a..a5cf2120a 100755..100644
--- a/hw/xwin/winmultiwindowclass.c
+++ b/hw/xwin/winmultiwindowclass.c
diff --git a/hw/xwin/winmultiwindowclass.h b/hw/xwin/winmultiwindowclass.h
index c635ab20b..c635ab20b 100755..100644
--- a/hw/xwin/winmultiwindowclass.h
+++ b/hw/xwin/winmultiwindowclass.h
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index cb27d2fe3..1ca3f9141 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -41,13 +41,6 @@
#include "propertyst.h"
#include "windowstr.h"
-/*
- * External global variables
- */
-
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
-
/*
* Prototypes for local functions
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 95d9d71fc..7efc360a4 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -38,16 +38,6 @@
#include "win.h"
#include "dixevents.h"
#include "winmultiwindowclass.h"
-#include "winprefs.h"
-
-/*
- * External global variables
- */
-
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
-extern HWND g_hDlgDepthChange;
-extern Bool g_fNativeGl;
/*
* Prototypes for local functions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 2fcad3249..c9b1584f8 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -634,7 +634,7 @@ winMultiWindowWMProc (void *pArg)
ErrorF ("winMultiWindowWMProc ()\n");
#endif
- /* Loop until we explicity break out */
+ /* Loop until we explicitly break out */
for (;;)
{
WMMsgNodePtr pNode;
@@ -1553,6 +1553,7 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
int format;
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
+ MwmHints *mwm_hint = NULL;
if (!hWnd) return;
if (!IsWindow (hWnd)) return;
@@ -1584,7 +1585,6 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
}
nitems = left = 0;
- MwmHints *mwm_hint = NULL;
if (XGetWindowProperty(pDisplay, iWindow, motif_wm_hints, 0L,
PropMwmHintsElements, False, motif_wm_hints, &type, &format,
&nitems, &left, (unsigned char **)&mwm_hint) == Success)
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index d14ceee9c..b559cd8cf 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -42,15 +42,6 @@
#include "winmsg.h"
#include "inputstr.h"
-/*
- * External global variables
- */
-
-extern Bool g_fCursor;
-extern Bool g_fKeyboardHookLL;
-extern Bool g_fSoftwareCursor;
-extern Bool g_fButton[3];
-
extern void winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle);
diff --git a/hw/xwin/winnativegdi.c b/hw/xwin/winnativegdi.c
index 48a467a2c..b8d2d351b 100644
--- a/hw/xwin/winnativegdi.c
+++ b/hw/xwin/winnativegdi.c
@@ -35,13 +35,6 @@
/*
- * External symbols
- */
-
-extern HWND g_hDlgExit;
-
-
-/*
* Local function prototypes
*/
diff --git a/hw/xwin/winpfbdd.c b/hw/xwin/winpfbdd.c
index 13fc1058d..7859c6b19 100644
--- a/hw/xwin/winpfbdd.c
+++ b/hw/xwin/winpfbdd.c
@@ -38,14 +38,6 @@
/*
- * External symbols
- */
-
-extern const GUID _IID_IDirectDraw2;
-extern HWND g_hDlgExit;
-
-
-/*
* Local function prototypes
*/
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 050c71a7f..8bd8e3478 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -163,11 +163,8 @@ winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
if (pPixmapPriv->hBitmap) DeleteObject (pPixmapPriv->hBitmap);
/* Free the bitmap info header memory */
- if (pPixmapPriv->pbmih != NULL)
- {
- free (pPixmapPriv->pbmih);
- pPixmapPriv->pbmih = NULL;
- }
+ free(pPixmapPriv->pbmih);
+ pPixmapPriv->pbmih = NULL;
/* Free the pixmap memory */
free (pPixmap);
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 1996ef0ef..4ccb4ffc2 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -49,22 +49,11 @@
/* Where will the custom menu commands start counting from? */
#define STARTMENUID WM_USER
-/* External global variables */
-#ifdef XWIN_MULTIWINDOW
-extern DWORD g_dwCurrentThreadID;
-#endif
-
extern const char *winGetBaseDir(void);
/* From winmultiwindowflex.l, the real parser */
extern void parse_file (FILE *fp);
-/* From winprefyacc.y, the pref structure loaded by the parser */
-extern WINPREFS pref;
-
-/* The global X default icon */
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
/* Currently in use command ID, incremented each new menu item created */
static int g_cmdid = STARTMENUID;
diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h
index 4daf47401..33b496df8 100644
--- a/hw/xwin/winprefs.h
+++ b/hw/xwin/winprefs.h
@@ -151,7 +151,8 @@ typedef struct WINPREFS
} WINPREFS;
-
+/* The global pref settings structure loaded by the winprefyacc.y parser */
+extern WINPREFS pref;
/* Functions */
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index 66a0503f2..1ce5c2dca 100755..100644
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -30,40 +30,20 @@ from The Open Group.
#ifdef HAVE_XWIN_CONFIG_H
#include <xwin-config.h>
#endif
-#ifdef XVENDORNAME
-#define VENDOR_STRING XVENDORNAME
-#define VENDOR_CONTACT BUILDERADDR
-#endif
+
#include <../xfree86/common/xorgVersion.h>
#include "win.h"
#include "winconfig.h"
-#include "winprefs.h"
#include "winmsg.h"
/*
* References to external symbols
*/
-extern int g_iNumScreens;
-extern winScreenInfo * g_ScreenInfo;
#ifdef XWIN_CLIPBOARD
extern Bool g_fUnicodeClipboard;
extern Bool g_fClipboard;
#endif
-extern int g_iLogVerbose;
-extern const char * g_pszLogFile;
-#ifdef RELOCATE_PROJECTROOT
-extern Bool g_fLogFileChanged;
-#endif
-extern Bool g_fXdmcpEnabled;
-extern Bool g_fAuthEnabled;
-extern char * g_pszCommandLine;
-extern Bool g_fKeyboardHookLL;
-extern Bool g_fNoHelpMessageBox;
-extern Bool g_fSoftwareCursor;
-extern Bool g_fSilentDupError;
-extern Bool g_fNativeGl;
-
/* globals required by callback function for monitor information */
struct GetMonitorInfoData {
int requestedMonitor;
@@ -1248,10 +1228,10 @@ winLogVersionInfo (void)
s_fBeenHere = TRUE;
ErrorF ("Welcome to the XWin X Server\n");
- ErrorF ("Vendor: %s\n", VENDOR_STRING);
+ ErrorF ("Vendor: %s\n", XVENDORNAME);
ErrorF ("Release: %d.%d.%d.%d (%d)\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT);
ErrorF ("%s\n\n", BUILDERSTRING);
- ErrorF ("Contact: %s\n", VENDOR_CONTACT);
+ ErrorF ("Contact: %s\n", BUILDERADDR);
}
/*
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 7b5b1359c..7b5b1359c 100755..100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index cf65881fe..57a08846b 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -65,14 +65,6 @@ winMWExtWMProcs = {
};
#endif
-
-/*
- * References to external symbols
- */
-
-extern Bool g_fSoftwareCursor;
-
-
/*
* Prototypes
*/
diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c
index 8dd1084e6..4e284b9c1 100644
--- a/hw/xwin/winshaddd.c
+++ b/hw/xwin/winshaddd.c
@@ -38,13 +38,6 @@
/*
- * External symbols
- */
-
-extern HWND g_hDlgExit;
-extern const char *g_pszLogFile;
-
-/*
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
* so we have to redefine it here.
*/
@@ -55,7 +48,7 @@ extern const char *g_pszLogFile;
/*
- * FIXME: Headers are broken, IID_IDirectDraw4 has to be defined
+ * FIXME: Headers are broken, IID_IDirectDraw2 has to be defined
* here manually. Should be handled by ddraw.h
*/
#ifndef IID_IDirectDraw2
@@ -828,7 +821,6 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
case 24:
case 16:
case 15:
-#if defined(XFree86Server)
/* Create the real visual */
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
TrueColorMask,
@@ -861,42 +853,9 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
return FALSE;
}
#endif
-#else /* XFree86Server */
- /* Create the real visual */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- TrueColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
- "failed for TrueColor\n");
- return FALSE;
- }
-
-#ifdef XWIN_EMULATEPSEUDO
- if (!pScreenInfo->fEmulatePseudo)
- break;
-
- /* Setup a pseudocolor visual */
- if (!fbSetVisualTypesAndMasks (8,
- PseudoColorMask,
- 8,
- 0,
- 0,
- 0))
- {
- ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
- "failed for PseudoColor\n");
- return FALSE;
- }
-#endif
-#endif /* XFree86Server */
break;
case 8:
-#if defined(XFree86Server)
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
pScreenInfo->fFullScreen
? PseudoColorMask : StaticColorMask,
@@ -911,20 +870,6 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
"failed\n");
return FALSE;
}
-#else /* XFree86Server */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- pScreenInfo->fFullScreen
- ? PseudoColorMask : StaticColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
- "failed\n");
- return FALSE;
- }
-#endif /* XFree86Server */
break;
default:
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 5ca3e4f62..82fe4be36 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -38,13 +38,6 @@
/*
- * External symbols
- */
-
-extern HWND g_hDlgExit;
-
-
-/*
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
* so we have to redefine it here.
*/
@@ -883,7 +876,6 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
case 24:
case 16:
case 15:
-#if defined(XFree86Server)
/* Setup the real visual */
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
TrueColorMask,
@@ -916,42 +908,9 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
return FALSE;
}
#endif
-#else /* XFree86Server */
- /* Setup the real visual */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- TrueColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
- "failed for TrueColor\n");
- return FALSE;
- }
-
-#ifdef XWIN_EMULATEPSEUDO
- if (!pScreenInfo->fEmulatePseudo)
- break;
-
- /* Setup a pseudocolor visual */
- if (!fbSetVisualTypesAndMasks (8,
- PseudoColorMask,
- 8,
- 0,
- 0,
- 0))
- {
- ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
- "failed for PseudoColor\n");
- return FALSE;
- }
-#endif
-#endif /* XFree86Server */
break;
case 8:
-#if defined(XFree86Server)
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
pScreenInfo->fFullScreen
? PseudoColorMask : StaticColorMask,
@@ -966,20 +925,6 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
"failed\n");
return FALSE;
}
-#else /* XFree86Server */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- pScreenInfo->fFullScreen
- ? PseudoColorMask : StaticColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
- "failed\n");
- return FALSE;
- }
-#endif /* XFree86Server */
break;
default:
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 96d149c2b..4971851e5 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -35,16 +35,6 @@
/*
- * External symbols
- */
-
-#ifdef XWIN_MULTIWINDOW
-extern DWORD g_dwCurrentThreadID;
-#endif
-extern HWND g_hDlgExit;
-
-
-/*
* Local function prototypes
*/
@@ -715,7 +705,6 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
case 24:
case 16:
case 15:
-#if defined(XFree86Server)
/* Setup the real visual */
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
TrueColorMask,
@@ -748,42 +737,9 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
return FALSE;
}
#endif
-#else /* XFree86Server */
- /* Setup the real visual */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- TrueColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
- "failed for TrueColor\n");
- return FALSE;
- }
-
-#ifdef XWIN_EMULATEPSEUDO
- if (!pScreenInfo->fEmulatePseudo)
- break;
-
- /* Setup a pseudocolor visual */
- if (!fbSetVisualTypesAndMasks (8,
- PseudoColorMask,
- 8,
- 0,
- 0,
- 0))
- {
- ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
- "failed for PseudoColor\n");
- return FALSE;
- }
-#endif
-#endif /* XFree86Server */
break;
case 8:
-#if defined(XFree86Server)
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
PseudoColorMask,
pScreenPriv->dwBitsPerRGB,
@@ -796,19 +752,6 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
"failed\n");
return FALSE;
}
-#else /* XFree86Server */
- if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
- PseudoColorMask,
- pScreenPriv->dwBitsPerRGB,
- pScreenPriv->dwRedMask,
- pScreenPriv->dwGreenMask,
- pScreenPriv->dwBlueMask))
- {
- ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
- "failed\n");
- return FALSE;
- }
-#endif
break;
default:
diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c
index 895b47caf..895b47caf 100755..100644
--- a/hw/xwin/wintrayicon.c
+++ b/hw/xwin/wintrayicon.c
diff --git a/hw/xwin/winvalargs.c b/hw/xwin/winvalargs.c
index 6f8d1c994..357d3d70a 100755..100644
--- a/hw/xwin/winvalargs.c
+++ b/hw/xwin/winvalargs.c
@@ -35,13 +35,6 @@
#include "winmsg.h"
-/*
- * References to external symbols
- */
-
-extern int g_iNumScreens;
-extern winScreenInfo * g_ScreenInfo;
-extern Bool g_fXdmcpEnabled;
/*
diff --git a/hw/xwin/winvideo.c b/hw/xwin/winvideo.c
index 0438e5f54..0438e5f54 100755..100644
--- a/hw/xwin/winvideo.c
+++ b/hw/xwin/winvideo.c
diff --git a/hw/xwin/winwakeup.c b/hw/xwin/winwakeup.c
index e1eece34a..b512b29e8 100644
--- a/hw/xwin/winwakeup.c
+++ b/hw/xwin/winwakeup.c
@@ -36,16 +36,6 @@
#endif
#include "win.h"
-
-/*
- * References to external symbols
- */
-
-extern HWND g_hDlgDepthChange;
-extern HWND g_hDlgExit;
-extern HWND g_hDlgAbout;
-
-
/* See Porting Layer Definition - p. 7 */
void
winWakeupHandler (int nScreen,
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index fbe419132..75142f15b 100755..100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -41,7 +41,6 @@
#include <X11/extensions/windowswmstr.h>
#include "dixevents.h"
#include "winmultiwindowclass.h"
-#include "winprefs.h"
#include <X11/Xatom.h>
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 214e8954b..214e8954b 100755..100644
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c
index 4d7afee42..21506df15 100755..100644
--- a/hw/xwin/winwin32rootlesswndproc.c
+++ b/hw/xwin/winwin32rootlesswndproc.c
@@ -53,14 +53,6 @@
/*
- * Global variables
- */
-
-extern Bool g_fNoConfigureWindow;
-extern Bool g_fSoftwareCursor;
-
-
-/*
* Local globals
*/
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 4027539c2..71384097f 100755..100644
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -77,10 +77,10 @@ make_box (int x, int y, int w, int h)
}
static int
-ProcWindowsWMQueryVersion(register ClientPtr client)
+ProcWindowsWMQueryVersion(ClientPtr client)
{
xWindowsWMQueryVersionReply rep;
- register int n;
+ int n;
REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq);
rep.type = X_Reply;
@@ -158,7 +158,7 @@ WMFreeEvents (pointer data, XID id)
}
static int
-ProcWindowsWMSelectInput (register ClientPtr client)
+ProcWindowsWMSelectInput (ClientPtr client)
{
REQUEST(xWindowsWMSelectInputReq);
WMEventPtr pEvent, pNewEvent, *pHead;
@@ -298,7 +298,7 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
/* general utility functions */
static int
-ProcWindowsWMDisableUpdate (register ClientPtr client)
+ProcWindowsWMDisableUpdate (ClientPtr client)
{
REQUEST_SIZE_MATCH(xWindowsWMDisableUpdateReq);
@@ -308,7 +308,7 @@ ProcWindowsWMDisableUpdate (register ClientPtr client)
}
static int
-ProcWindowsWMReenableUpdate (register ClientPtr client)
+ProcWindowsWMReenableUpdate (ClientPtr client)
{
REQUEST_SIZE_MATCH(xWindowsWMReenableUpdateReq);
@@ -321,7 +321,7 @@ ProcWindowsWMReenableUpdate (register ClientPtr client)
/* window functions */
static int
-ProcWindowsWMSetFrontProcess (register ClientPtr client)
+ProcWindowsWMSetFrontProcess (ClientPtr client)
{
REQUEST_SIZE_MATCH(xWindowsWMSetFrontProcessReq);
@@ -334,7 +334,7 @@ ProcWindowsWMSetFrontProcess (register ClientPtr client)
/* frame functions */
static int
-ProcWindowsWMFrameGetRect (register ClientPtr client)
+ProcWindowsWMFrameGetRect (ClientPtr client)
{
xWindowsWMFrameGetRectReply rep;
BoxRec ir;
@@ -388,7 +388,7 @@ ProcWindowsWMFrameGetRect (register ClientPtr client)
static int
-ProcWindowsWMFrameDraw (register ClientPtr client)
+ProcWindowsWMFrameDraw (ClientPtr client)
{
REQUEST(xWindowsWMFrameDrawReq);
WindowPtr pWin;
@@ -478,12 +478,10 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
}
static int
-ProcWindowsWMFrameSetTitle(
- register ClientPtr client
- )
+ProcWindowsWMFrameSetTitle(ClientPtr client)
{
unsigned int title_length, title_max;
- unsigned char *title_bytes;
+ char *title_bytes;
REQUEST(xWindowsWMFrameSetTitleReq);
WindowPtr pWin;
win32RootlessWindowPtr pRLWinPriv;
@@ -540,7 +538,7 @@ ProcWindowsWMFrameSetTitle(
/* dispatch */
static int
-ProcWindowsWMDispatch (register ClientPtr client)
+ProcWindowsWMDispatch (ClientPtr client)
{
REQUEST(xReq);
@@ -586,16 +584,16 @@ SNotifyEvent (xWindowsWMNotifyEvent *from, xWindowsWMNotifyEvent *to)
}
static int
-SProcWindowsWMQueryVersion (register ClientPtr client)
+SProcWindowsWMQueryVersion (ClientPtr client)
{
- register int n;
+ int n;
REQUEST(xWindowsWMQueryVersionReq);
swaps(&stuff->length, n);
return ProcWindowsWMQueryVersion(client);
}
static int
-SProcWindowsWMDispatch (register ClientPtr client)
+SProcWindowsWMDispatch (ClientPtr client)
{
REQUEST(xReq);
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 5e8451082..6d2270a20 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -51,18 +51,6 @@ Bool g_fButton[3] = { FALSE, FALSE, FALSE };
/*
- * References to external symbols
- */
-
-extern Bool g_fClipboard;
-extern HWND g_hDlgDepthChange;
-extern Bool g_fKeyboardHookLL;
-extern HWND g_hwndKeyboardFocus;
-extern Bool g_fSoftwareCursor;
-extern DWORD g_dwCurrentThreadID;
-
-
-/*
* Called by winWakeupHandler
* Processes current Windows message
*/
@@ -964,9 +952,6 @@ winWindowProc (HWND hwnd, UINT message,
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break;
- /* Save handle of our main window that last received focus */
- g_hwndKeyboardFocus = hwnd;
-
/* Restore the state of all mode keys */
winRestoreModeKeyStates ();
@@ -979,9 +964,6 @@ winWindowProc (HWND hwnd, UINT message,
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
break;
- /* Clear handle of our main window that last received focus */
- g_hwndKeyboardFocus = NULL;
-
/* Release any pressed keys */
winKeybdReleaseKeys ();