aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/xquartz/Makefile.am4
-rw-r--r--xorg-server/hw/xquartz/pseudoramiX.c516
-rw-r--r--xorg-server/hw/xquartz/pseudoramiX.h10
-rw-r--r--xorg-server/hw/xwin/InitOutput.c6
-rw-r--r--xorg-server/hw/xwin/Makefile.am1
-rw-r--r--xorg-server/hw/xwin/makefile2
-rw-r--r--xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.def2
-rw-r--r--xorg-server/hw/xwin/winauth.c7
-rw-r--r--xorg-server/hw/xwin/winclipboard.h3
-rw-r--r--xorg-server/hw/xwin/winclipboardwndproc.c10
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c2
-rw-r--r--xorg-server/hw/xwin/wincursor.c43
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c12
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c6
-rw-r--r--xorg-server/hw/xwin/winprefs.c22
-rw-r--r--xorg-server/hw/xwin/winprefs.h8
-rw-r--r--xorg-server/hw/xwin/winsetsp.c2
-rw-r--r--xorg-server/hw/xwin/wintrayicon.c2
18 files changed, 54 insertions, 604 deletions
diff --git a/xorg-server/hw/xquartz/Makefile.am b/xorg-server/hw/xquartz/Makefile.am
index a7cc012d9..2e894d705 100644
--- a/xorg-server/hw/xquartz/Makefile.am
+++ b/xorg-server/hw/xquartz/Makefile.am
@@ -28,7 +28,6 @@ libXquartz_la_SOURCES = \
darwinEvents.c \
darwinXinput.c \
keysym2ucs.c \
- pseudoramiX.c \
quartz.c \
quartzCocoa.m \
quartzKeyboard.c \
@@ -36,6 +35,8 @@ libXquartz_la_SOURCES = \
quartzRandR.c \
console_redirect.c
+libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la
+
EXTRA_DIST = \
X11Application.h \
X11Controller.h \
@@ -44,7 +45,6 @@ EXTRA_DIST = \
darwinfb.h \
darwinEvents.h \
keysym2ucs.h \
- pseudoramiX.h \
quartz.h \
quartzCommon.h \
quartzKeyboard.h \
diff --git a/xorg-server/hw/xquartz/pseudoramiX.c b/xorg-server/hw/xquartz/pseudoramiX.c
deleted file mode 100644
index 23dbc7328..000000000
--- a/xorg-server/hw/xquartz/pseudoramiX.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Minimal implementation of PanoramiX/Xinerama
- *
- * This is used in rootless mode where the underlying window server
- * already provides an abstracted view of multiple screens as one
- * large screen area.
- *
- * This code is largely based on panoramiX.c, which contains the
- * following copyright notice:
- */
-/*****************************************************************
- Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
- 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.
-
- The above copyright notice and this permission notice 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
- DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
- BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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.
-
- Except as contained in this notice, the name of Digital Equipment Corporation
- shall not be used in advertising or otherwise to promote the sale, use or other
- dealings in this Software without prior written authorization from Digital
- Equipment Corporation.
- ******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "pseudoramiX.h"
-#include "extnsionst.h"
-#include "extinit.h"
-#include "dixstruct.h"
-#include "window.h"
-#include <X11/extensions/panoramiXproto.h>
-#include "globals.h"
-
-#define TRACE PseudoramiXTrace("TRACE " __FILE__ ":%s",__FUNCTION__)
-#define DEBUG_LOG PseudoramiXDebug
-
-Bool noPseudoramiXExtension = FALSE;
-
-extern int
-ProcPanoramiXQueryVersion(ClientPtr client);
-
-static void
-PseudoramiXResetProc(ExtensionEntry *extEntry);
-
-static int
-ProcPseudoramiXQueryVersion(ClientPtr client);
-static int
-ProcPseudoramiXGetState(ClientPtr client);
-static int
-ProcPseudoramiXGetScreenCount(ClientPtr client);
-static int
-ProcPseudoramiXGetScreenSize(ClientPtr client);
-static int
-ProcPseudoramiXIsActive(ClientPtr client);
-static int
-ProcPseudoramiXQueryScreens(ClientPtr client);
-static int
-ProcPseudoramiXDispatch(ClientPtr client);
-
-static int
-SProcPseudoramiXQueryVersion(ClientPtr client);
-static int
-SProcPseudoramiXGetState(ClientPtr client);
-static int
-SProcPseudoramiXGetScreenCount(ClientPtr client);
-static int
-SProcPseudoramiXGetScreenSize(ClientPtr client);
-static int
-SProcPseudoramiXIsActive(ClientPtr client);
-static int
-SProcPseudoramiXQueryScreens(ClientPtr client);
-static int
-SProcPseudoramiXDispatch(ClientPtr client);
-
-typedef struct {
- int x;
- int y;
- int w;
- int h;
-} PseudoramiXScreenRec;
-
-static PseudoramiXScreenRec *pseudoramiXScreens = NULL;
-static int pseudoramiXScreensAllocated = 0;
-static int pseudoramiXNumScreens = 0;
-static unsigned long pseudoramiXGeneration = 0;
-
-static void
-PseudoramiXTrace(const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVMessageVerb(X_NONE, 10, format, ap);
- va_end(ap);
-}
-
-static void
-PseudoramiXDebug(const char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- LogVMessageVerb(X_NONE, 3, format, ap);
- va_end(ap);
-}
-
-// Add a PseudoramiX screen.
-// The rest of the X server will know nothing about this screen.
-// Can be called before or after extension init.
-// Screens must be re-added once per generation.
-void
-PseudoramiXAddScreen(int x, int y, int w, int h)
-{
- PseudoramiXScreenRec *s;
-
- if (noPseudoramiXExtension) return;
-
- if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) {
- pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1;
- pseudoramiXScreens = realloc(pseudoramiXScreens,
- pseudoramiXScreensAllocated *
- sizeof(PseudoramiXScreenRec));
- }
-
- DEBUG_LOG("x: %d, y: %d, w: %d, h: %d\n", x, y, w, h);
-
- s = &pseudoramiXScreens[pseudoramiXNumScreens++];
- s->x = x;
- s->y = y;
- s->w = w;
- s->h = h;
-}
-
-// Initialize PseudoramiX.
-// Copied from PanoramiXExtensionInit
-void
-PseudoramiXExtensionInit(void)
-{
- Bool success = FALSE;
- ExtensionEntry *extEntry;
-
- if (noPseudoramiXExtension) return;
-
- TRACE;
-
- /* Even with only one screen we need to enable PseudoramiX to allow
- dynamic screen configuration changes. */
-#if 0
- if (pseudoramiXNumScreens == 1) {
- // Only one screen - disable Xinerama extension.
- noPseudoramiXExtension = TRUE;
- return;
- }
-#endif
-
- if (pseudoramiXGeneration != serverGeneration) {
- extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
- ProcPseudoramiXDispatch,
- SProcPseudoramiXDispatch,
- PseudoramiXResetProc,
- StandardMinorOpcode);
- if (!extEntry) {
- ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n");
- }
- else {
- pseudoramiXGeneration = serverGeneration;
- success = TRUE;
- }
- }
-
- if (!success) {
- ErrorF("%s Extension (PseudoramiX) failed to initialize\n",
- PANORAMIX_PROTOCOL_NAME);
- return;
- }
-}
-
-void
-PseudoramiXResetScreens(void)
-{
- TRACE;
-
- pseudoramiXNumScreens = 0;
-}
-
-static void
-PseudoramiXResetProc(ExtensionEntry *extEntry)
-{
- TRACE;
-
- PseudoramiXResetScreens();
-}
-
-// was PanoramiX
-static int
-ProcPseudoramiXQueryVersion(ClientPtr client)
-{
- TRACE;
-
- return ProcPanoramiXQueryVersion(client);
-}
-
-// was PanoramiX
-static int
-ProcPseudoramiXGetState(ClientPtr client)
-{
- REQUEST(xPanoramiXGetStateReq);
- WindowPtr pWin;
- xPanoramiXGetStateReply rep;
- register int rc;
-
- TRACE;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.state = !noPseudoramiXExtension;
- rep.window = stuff->window;
- if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swapl(&rep.window);
- }
- WriteToClient(client, sizeof(xPanoramiXGetStateReply),&rep);
- return Success;
-}
-
-// was PanoramiX
-static int
-ProcPseudoramiXGetScreenCount(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenCountReq);
- WindowPtr pWin;
- xPanoramiXGetScreenCountReply rep;
- register int rc;
-
- TRACE;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.ScreenCount = pseudoramiXNumScreens;
- rep.window = stuff->window;
- if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swapl(&rep.window);
- }
- WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply),&rep);
- return Success;
-}
-
-// was PanoramiX
-static int
-ProcPseudoramiXGetScreenSize(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenSizeReq);
- WindowPtr pWin;
- xPanoramiXGetScreenSizeReply rep;
- register int rc;
-
- TRACE;
-
- if (stuff->screen >= pseudoramiXNumScreens)
- return BadMatch;
-
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- /* screen dimensions */
- rep.width = pseudoramiXScreens[stuff->screen].w;
- // was screenInfo.screens[stuff->screen]->width;
- rep.height = pseudoramiXScreens[stuff->screen].h;
- // was screenInfo.screens[stuff->screen]->height;
- rep.window = stuff->window;
- rep.screen = stuff->screen;
- if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swapl(&rep.width);
- swapl(&rep.height);
- swapl(&rep.window);
- swapl(&rep.screen);
- }
- WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply),&rep);
- return Success;
-}
-
-// was Xinerama
-static int
-ProcPseudoramiXIsActive(ClientPtr client)
-{
- /* REQUEST(xXineramaIsActiveReq); */
- xXineramaIsActiveReply rep;
-
- TRACE;
-
- REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.state = !noPseudoramiXExtension;
- if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swapl(&rep.state);
- }
- WriteToClient(client, sizeof(xXineramaIsActiveReply),&rep);
- return Success;
-}
-
-// was Xinerama
-static int
-ProcPseudoramiXQueryScreens(ClientPtr client)
-{
- /* REQUEST(xXineramaQueryScreensReq); */
- xXineramaQueryScreensReply rep;
-
- DEBUG_LOG("noPseudoramiXExtension=%d, pseudoramiXNumScreens=%d\n",
- noPseudoramiXExtension,
- pseudoramiXNumScreens);
-
- REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
- rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
- if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swapl(&rep.number);
- }
- WriteToClient(client, sizeof(xXineramaQueryScreensReply),&rep);
-
- if (!noPseudoramiXExtension) {
- xXineramaScreenInfo scratch;
- int i;
-
- for (i = 0; i < pseudoramiXNumScreens; i++) {
- scratch.x_org = pseudoramiXScreens[i].x;
- scratch.y_org = pseudoramiXScreens[i].y;
- scratch.width = pseudoramiXScreens[i].w;
- scratch.height = pseudoramiXScreens[i].h;
-
- if (client->swapped) {
- swaps(&scratch.x_org);
- swaps(&scratch.y_org);
- swaps(&scratch.width);
- swaps(&scratch.height);
- }
- WriteToClient(client, sz_XineramaScreenInfo,&scratch);
- }
- }
-
- return Success;
-}
-
-// was PanoramiX
-static int
-ProcPseudoramiXDispatch(ClientPtr client)
-{
- REQUEST(xReq);
- TRACE;
- switch (stuff->data) {
- case X_PanoramiXQueryVersion:
- return ProcPseudoramiXQueryVersion(client);
-
- case X_PanoramiXGetState:
- return ProcPseudoramiXGetState(client);
-
- case X_PanoramiXGetScreenCount:
- return ProcPseudoramiXGetScreenCount(client);
-
- case X_PanoramiXGetScreenSize:
- return ProcPseudoramiXGetScreenSize(client);
-
- case X_XineramaIsActive:
- return ProcPseudoramiXIsActive(client);
-
- case X_XineramaQueryScreens:
- return ProcPseudoramiXQueryScreens(client);
- }
- return BadRequest;
-}
-
-static int
-SProcPseudoramiXQueryVersion(ClientPtr client)
-{
- REQUEST(xPanoramiXQueryVersionReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
- return ProcPseudoramiXQueryVersion(client);
-}
-
-static int
-SProcPseudoramiXGetState(ClientPtr client)
-{
- REQUEST(xPanoramiXGetStateReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- return ProcPseudoramiXGetState(client);
-}
-
-static int
-SProcPseudoramiXGetScreenCount(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenCountReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- return ProcPseudoramiXGetScreenCount(client);
-}
-
-static int
-SProcPseudoramiXGetScreenSize(ClientPtr client)
-{
- REQUEST(xPanoramiXGetScreenSizeReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- return ProcPseudoramiXGetScreenSize(client);
-}
-
-static int
-SProcPseudoramiXIsActive(ClientPtr client)
-{
- REQUEST(xXineramaIsActiveReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
- return ProcPseudoramiXIsActive(client);
-}
-
-static int
-SProcPseudoramiXQueryScreens(ClientPtr client)
-{
- REQUEST(xXineramaQueryScreensReq);
-
- TRACE;
-
- swaps(&stuff->length);
- REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
- return ProcPseudoramiXQueryScreens(client);
-}
-
-static int
-SProcPseudoramiXDispatch(ClientPtr client)
-{
- REQUEST(xReq);
-
- TRACE;
-
- switch (stuff->data) {
- case X_PanoramiXQueryVersion:
- return SProcPseudoramiXQueryVersion(client);
-
- case X_PanoramiXGetState:
- return SProcPseudoramiXGetState(client);
-
- case X_PanoramiXGetScreenCount:
- return SProcPseudoramiXGetScreenCount(client);
-
- case X_PanoramiXGetScreenSize:
- return SProcPseudoramiXGetScreenSize(client);
-
- case X_XineramaIsActive:
- return SProcPseudoramiXIsActive(client);
-
- case X_XineramaQueryScreens:
- return SProcPseudoramiXQueryScreens(client);
- }
- return BadRequest;
-}
diff --git a/xorg-server/hw/xquartz/pseudoramiX.h b/xorg-server/hw/xquartz/pseudoramiX.h
deleted file mode 100644
index f063919dd..000000000
--- a/xorg-server/hw/xquartz/pseudoramiX.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Minimal implementation of PanoramiX/Xinerama
- */
-
-extern int noPseudoramiXExtension;
-
-void
-PseudoramiXAddScreen(int x, int y, int w, int h);
-void
-PseudoramiXResetScreens(void);
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 18d0aa2f8..defbbadd8 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -125,7 +125,7 @@ winClipboardShutdown(void)
if (g_fClipboard && g_fClipboardLaunched && g_fClipboardStarted) {
/* Synchronously destroy the clipboard window */
if (g_hwndClipboard != NULL) {
- g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
+ g_fClipboardStarted=FALSE; /* This is to avoid dead-locls caused by the clipboard thread still doing some stuff */
SendMessage(g_hwndClipboard, WM_DESTROY, 0, 0);
/* NOTE: g_hwndClipboard is set to NULL in winclipboardthread.c */
}
@@ -417,7 +417,8 @@ winFixupPaths(void)
{
/* Open fontpath configuration file */
#if defined WIN32 && defined __MINGW32__
- static Bool once = False;
+qsdf qsdf qsdf qsdf
+ static Bool once = False;
char buffer[MAX_PATH];
snprintf(buffer, sizeof(buffer), "%s\\font-dirs", basedir);
buffer[sizeof(buffer)-1] = 0;
@@ -425,6 +426,7 @@ winFixupPaths(void)
if (once) fontdirs = NULL;
else once = True;
#else
+qsdfqsdf qsdf qsdf
FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt");
#endif
if (fontdirs != NULL) {
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index 89bff5bca..aa73e618d 100644
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -154,6 +154,7 @@ XWin_SOURCES = $(SRCS)
AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
XWIN_SYS_LIBS += -ldxguid
+XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la
XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS)
XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
diff --git a/xorg-server/hw/xwin/makefile b/xorg-server/hw/xwin/makefile
index f09cee19d..46bcc1e05 100644
--- a/xorg-server/hw/xwin/makefile
+++ b/xorg-server/hw/xwin/makefile
@@ -156,7 +156,7 @@ CSRCS := $(CSRCS:%.l=%.c)
DEFINES += $(DEFS:-D%=%) HAVE_XWIN_CONFIG_H PTW32_STATIC_LIB RELOCATE_PROJECTROOT
-INCLUDES += ..\..\miext\rootless
+INCLUDES += ..\.. ..\..\miext\rootless
INCLUDES += $(OBJDIR)
diff --git a/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.def b/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.def
index 8a8e8258e..b5826a404 100644
--- a/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.def
+++ b/xorg-server/hw/xwin/swrastwgl_dri/swrastwgl_dri.def
@@ -1,2 +1,2 @@
EXPORTS
- __driDriverExtensions
+
diff --git a/xorg-server/hw/xwin/winauth.c b/xorg-server/hw/xwin/winauth.c
index 18e370ef7..5c46c7022 100644
--- a/xorg-server/hw/xwin/winauth.c
+++ b/xorg-server/hw/xwin/winauth.c
@@ -40,6 +40,7 @@
/* Includes for authorization */
#include "securitysrv.h"
+#include "os/osdep.h"
/*
* Constants
@@ -62,8 +63,7 @@ static char *g_pAuthData = NULL;
#ifndef XCSECURITY
-static
- void
+void
GenerateRandomData(int len, char *buf)
{
int fd;
@@ -87,9 +87,8 @@ GenerateRandomData(int len, char *buf)
static char cookie[16]; /* 128 bits */
XID
- static
MitGenerateCookie(unsigned data_length,
- char *data,
+ const char *data,
XID id, unsigned *data_length_return, char **data_return)
{
int i = 0;
diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h
index 550eeb26c..d42497cc9 100644
--- a/xorg-server/hw/xwin/winclipboard.h
+++ b/xorg-server/hw/xwin/winclipboard.h
@@ -105,9 +105,6 @@ void
void *winClipboardProc(void *);
-void
- winDeinitClipboard(void);
-
/*
* winclipboardwndproc.c
*/
diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c
index 28348ac45..7447183ac 100644
--- a/xorg-server/hw/xwin/winclipboardwndproc.c
+++ b/xorg-server/hw/xwin/winclipboardwndproc.c
@@ -52,22 +52,12 @@
* References to external symbols
*/
-extern Bool g_fUseUnicode;
extern void *g_pClipboardDisplay;
extern Window g_iClipboardWindow;
extern Atom g_atomLastOwnedSelection;
extern Bool g_fClipboardStarted;
extern HWND g_hwndClipboard;
extern Bool g_fClipboardPrimary;
-/*
- * Local function prototypes
- */
-
-static int
-
-
-winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
- Bool fUseUnicode, int iTimeoutSec);
/*
* Process X events up to specified timeout
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index 09fbfd3aa..2671fc000 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -56,8 +56,6 @@ DISPATCH_PROC(winProcSetSelectionOwner);
* References to external symbols
*/
-extern unsigned int g_uiAuthDataLen;
-extern char *g_pAuthData;
extern Bool g_fClipboardLaunched;
extern Bool g_fClipboardStarted;
extern Bool g_fClipboard;
diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c
index 8e8c6fd3d..d55ff5bde 100644
--- a/xorg-server/hw/xwin/wincursor.c
+++ b/xorg-server/hw/xwin/wincursor.c
@@ -161,7 +161,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
HDC hDC;
BITMAPV4HEADER bi;
BITMAPINFO *pbmi;
- unsigned long *lpBits;
+ uint32_t *lpBits;
winDebug("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
@@ -255,15 +255,14 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
bi.bV4AlphaMask = 0xFF000000;
lpBits =
- (unsigned long *) calloc(pScreenPriv->cursor.sm_cx *
- pScreenPriv->cursor.sm_cy,
- sizeof(unsigned long));
+ (uint32_t *) calloc(pScreenPriv->cursor.sm_cx *
+ pScreenPriv->cursor.sm_cy,
+ sizeof(uint32_t));
if (lpBits) {
int y;
for (y = 0; y < nCY; y++) {
- unsigned long *src, *dst;
-
+ void *src, *dst;
src = &(pCursor->bits->argb[y * pCursor->bits->width]);
dst = &(lpBits[y * pScreenPriv->cursor.sm_cx]);
memcpy(dst, src, 4 * nCX);
@@ -272,9 +271,12 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
} /* End if-truecolor-icon */
if (!lpBits) {
+ RGBQUAD *pbmiColors;
/* Bicolor, use a palettized DIB */
winDebug("winLoadCursor: Trying two color cursor\n");
pbmi = (BITMAPINFO *) &bi;
+ pbmiColors = &(pbmi->bmiColors[0]);
+
memset(pbmi, 0, sizeof(BITMAPINFOHEADER));
pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
pbmi->bmiHeader.biWidth = pScreenPriv->cursor.sm_cx;
@@ -285,22 +287,23 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
pbmi->bmiHeader.biSizeImage = 0;
pbmi->bmiHeader.biClrUsed = 3;
pbmi->bmiHeader.biClrImportant = 3;
- pbmi->bmiColors[0].rgbRed = 0; /* Empty */
- pbmi->bmiColors[0].rgbGreen = 0;
- pbmi->bmiColors[0].rgbBlue = 0;
- pbmi->bmiColors[0].rgbReserved = 0;
- pbmi->bmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */
- pbmi->bmiColors[1].rgbGreen = pCursor->backGreen >> 8;
- pbmi->bmiColors[1].rgbBlue = pCursor->backBlue >> 8;
- pbmi->bmiColors[1].rgbReserved = 0;
- pbmi->bmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */
- pbmi->bmiColors[2].rgbGreen = pCursor->foreGreen >> 8;
- pbmi->bmiColors[2].rgbBlue = pCursor->foreBlue >> 8;
- pbmi->bmiColors[2].rgbReserved = 0;
+
+ pbmiColors[0].rgbRed = 0; /* Empty */
+ pbmiColors[0].rgbGreen = 0;
+ pbmiColors[0].rgbBlue = 0;
+ pbmiColors[0].rgbReserved = 0;
+ pbmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */
+ pbmiColors[1].rgbGreen = pCursor->backGreen >> 8;
+ pbmiColors[1].rgbBlue = pCursor->backBlue >> 8;
+ pbmiColors[1].rgbReserved = 0;
+ pbmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */
+ pbmiColors[2].rgbGreen = pCursor->foreGreen >> 8;
+ pbmiColors[2].rgbBlue = pCursor->foreBlue >> 8;
+ pbmiColors[2].rgbReserved = 0;
lpBits =
- (unsigned long *) calloc(pScreenPriv->cursor.sm_cx *
- pScreenPriv->cursor.sm_cy, sizeof(char));
+ (uint32_t *) calloc(pScreenPriv->cursor.sm_cx *
+ pScreenPriv->cursor.sm_cy, sizeof(char));
pCur = (unsigned char *) lpBits;
if (lpBits) {
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 8cd1e0dbb..2b619a2b6 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -691,7 +691,7 @@ winMultiWindowWMProc(void *pArg)
case WM_WM_MAP:
winDebug ("\tWM_WM_MAP\n");
/* Put a note as to the HWND associated with this Window */
- XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
+ XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32,
PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
@@ -702,7 +702,7 @@ winMultiWindowWMProc(void *pArg)
case WM_WM_MAP2:
winDebug ("\tWM_WM_MAP2\n");
- XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
+ XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32,
PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
@@ -712,7 +712,7 @@ winMultiWindowWMProc(void *pArg)
winDebug ("\tWM_WM_MAP3\n");
/* Put a note as to the HWND associated with this Window */
- XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER, //pWMInfo->atmPrivMap,
+ XChangeProperty(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmPrivMap, XA_INTEGER,
32,
PropModeReplace,
(unsigned char *) &(pNode->msg.hwndWindow), sizeof(HWND)/4);
@@ -999,15 +999,13 @@ winMultiWindowXMsgProc(void *pArg)
(pProcArg->pDisplay, pProcArg->dwScreen, TRUE)) {
if (!g_fAnotherWMRunning) {
g_fAnotherWMRunning = TRUE;
- SendMessage(pProcArg->hwndScreen, WM_UNMANAGE, 0,
- 0);
+ SendMessage(pProcArg->hwndScreen, WM_UNMANAGE, 0, 0);
}
}
else {
if (g_fAnotherWMRunning) {
g_fAnotherWMRunning = FALSE;
- SendMessage(pProcArg->hwndScreen, WM_MANAGE, 0,
- 0);
+ SendMessage(pProcArg->hwndScreen, WM_MANAGE, 0, 0);
}
}
Sleep(500);
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 1488a657c..9ca27e5ff 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -411,14 +411,14 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/*
* Add whatever the setup file wants to for this window
*/
- SetupSysMenu((unsigned long) hwnd);
+ SetupSysMenu(hwnd);
return 0;
case WM_SYSCOMMAND:
/*
* Any window menu items go through here
*/
- if (HandleCustomWM_COMMAND((unsigned long) hwnd, LOWORD(wParam))) {
+ if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam))) {
/* Don't pass customized menus to DefWindowProc */
return 0;
}
@@ -434,7 +434,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_INITMENU:
/* Checks/Unchecks any menu items before they are displayed */
- HandleCustomWM_INITMENU((unsigned long) hwnd, wParam);
+ HandleCustomWM_INITMENU(hwnd, (HMENU)wParam);
break;
case WM_ERASEBKGND:
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 5a51f3b3b..6fff8a10d 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -190,7 +190,7 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam)
}
/* Update the system menu for this window */
- SetupSysMenu((unsigned long) hwnd);
+ SetupSysMenu(hwnd);
/* That was easy... */
}
@@ -277,15 +277,11 @@ ReloadPrefs(void)
* Check/uncheck the ALWAYSONTOP items in this menu
*/
void
-HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn)
+HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu)
{
- HWND hwnd;
- HMENU hmenu;
DWORD dwExStyle;
int i, j;
- hwnd = (HWND) hwndIn;
- hmenu = (HMENU) hmenuIn;
if (!hwnd || !hmenu)
return;
@@ -307,15 +303,12 @@ HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn)
* Return TRUE if command is proccessed, FALSE otherwise.
*/
Bool
-HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
+HandleCustomWM_COMMAND(HWND hwnd, int command)
{
- HWND hwnd;
int i, j;
MENUPARSED *m;
DWORD dwExStyle;
- hwnd = (HWND) hwndIn;
-
if (!command)
return FALSE;
@@ -414,15 +407,13 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
* Add the default or a custom menu depending on the class match
*/
void
-SetupSysMenu(unsigned long hwndIn)
+SetupSysMenu(HWND hwnd)
{
- HWND hwnd;
HMENU sys;
int i;
WindowPtr pWin;
char *res_name, *res_class;
- hwnd = (HWND) hwndIn;
if (!hwnd)
return;
@@ -467,11 +458,8 @@ SetupSysMenu(unsigned long hwndIn)
* Possibly add a menu to the toolbar icon
*/
void
-SetupRootMenu(unsigned long hmenuRoot)
+SetupRootMenu(HMENU root)
{
- HMENU root;
-
- root = (HMENU) hmenuRoot;
if (!root)
return;
diff --git a/xorg-server/hw/xwin/winprefs.h b/xorg-server/hw/xwin/winprefs.h
index a4a6e7eec..8f4eb0807 100644
--- a/xorg-server/hw/xwin/winprefs.h
+++ b/xorg-server/hw/xwin/winprefs.h
@@ -150,16 +150,16 @@ void
LoadPreferences(void);
void
- SetupRootMenu(unsigned long hmenuRoot);
+ SetupRootMenu(HMENU root);
void
- SetupSysMenu(unsigned long hwndIn);
+ SetupSysMenu(HWND hwnd);
void
- HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn);
+ HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu);
Bool
- HandleCustomWM_COMMAND(unsigned long hwndIn, int command);
+ HandleCustomWM_COMMAND(HWND hwnd, int command);
int
winIconIsOverride(HICON hicon);
diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c
index 001e50e11..29f49abe1 100644
--- a/xorg-server/hw/xwin/winsetsp.c
+++ b/xorg-server/hw/xwin/winsetsp.c
@@ -51,7 +51,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
HBITMAP hbmpOrig = NULL;
- mybitmap_t bmi;
+ mybitmap_t bmi;
HRGN hrgn = NULL, combined = NULL;
int nbox;
BoxPtr pbox;
diff --git a/xorg-server/hw/xwin/wintrayicon.c b/xorg-server/hw/xwin/wintrayicon.c
index bcea0cc81..3c7820cf7 100644
--- a/xorg-server/hw/xwin/wintrayicon.c
+++ b/xorg-server/hw/xwin/wintrayicon.c
@@ -193,7 +193,7 @@ winHandleIconMessage(HWND hwnd, UINT message,
RemoveMenu(hmenuTray, ID_APP_HIDE_ROOT, MF_BYCOMMAND);
}
- SetupRootMenu((unsigned long) hmenuTray);
+ SetupRootMenu(hmenuTray);
/*
* NOTE: This three-step procedure is required for