aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/colormap.c4
-rw-r--r--xorg-server/dix/dispatch.c4
-rw-r--r--xorg-server/dix/dixfonts.c6
-rw-r--r--xorg-server/dix/events.c2
-rw-r--r--xorg-server/dix/getevents.c11
-rw-r--r--xorg-server/dix/main.c1
-rw-r--r--xorg-server/dix/makefile38
-rw-r--r--xorg-server/dix/ptrveloc.c10
-rw-r--r--xorg-server/dix/window.c5
9 files changed, 77 insertions, 4 deletions
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c
index a5a006e60..6fbf26c3b 100644
--- a/xorg-server/dix/colormap.c
+++ b/xorg-server/dix/colormap.c
@@ -65,6 +65,10 @@ SOFTWARE.
#include "privates.h"
#include "xace.h"
+#ifdef _MSC_VER
+#define UpdateColors thisUpdateColors
+#endif
+
extern XID clientErrorValue;
static Pixel FindBestPixel(
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 414bd0404..76ed70f66 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -110,6 +110,10 @@ Equipment Corporation.
#include <version-config.h>
#endif
+#ifdef CreateWindow
+#undef CreateWindow
+#endif
+
#ifdef PANORAMIX_DEBUG
#include <stdio.h>
int ProcInitialConnection();
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c
index 7d7ae71de..527060486 100644
--- a/xorg-server/dix/dixfonts.c
+++ b/xorg-server/dix/dixfonts.c
@@ -131,6 +131,7 @@ SetDefaultFont(char *defaultfontname)
int err;
FontPtr pf;
XID fid;
+ static FontPtr last_pf;
fid = FakeClientID(0);
err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync,
@@ -139,9 +140,10 @@ SetDefaultFont(char *defaultfontname)
return FALSE;
err = dixLookupResourceByType((pointer *)&pf, fid, RT_FONT, serverClient,
DixReadAccess);
- if (err != Success)
+ if (err == Success) last_pf = pf;
+ if (last_pf == (FontPtr) NULL)
return FALSE;
- defaultFont = pf;
+ defaultFont = last_pf;
return TRUE;
}
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 90a2675c4..0d01df512 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -2259,7 +2259,7 @@ static Window FindChildForEvent(DeviceIntPtr dev, WindowPtr event)
{
SpritePtr pSprite = dev->spriteInfo->sprite;
WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1];
- Window child;
+ Window child = None;
/* If the search ends up past the root should the child field be
set to none or should the value in the argument be passed
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 2912c1e85..e19d0ce11 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -62,6 +62,10 @@
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
+#ifdef _MSC_VER
+#define lroundf(val) ((int)(val<0.0f)?val-.5f:val+.5f)
+#endif
+
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256
@@ -126,6 +130,13 @@ key_autorepeats(DeviceIntPtr pDev, int key_code)
(1 << (key_code & 7)));
}
+#ifdef _MSC_VER
+float roundf(float f)
+{
+ return ((f<0.0f) ? ceil(f-.5) : floor (f+.5));
+}
+#endif
+
static void
init_event(DeviceIntPtr dev, DeviceEvent* event, Time ms)
{
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index f96245a4b..e49d6cd11 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -135,6 +135,7 @@ int main(int argc, char *argv[], char *envp[])
int i;
HWEventQueueType alwaysCheckForInput[2];
+ ptw32_processInitialize();
display = "0";
InitRegions();
diff --git a/xorg-server/dix/makefile b/xorg-server/dix/makefile
new file mode 100644
index 000000000..4abd48a32
--- /dev/null
+++ b/xorg-server/dix/makefile
@@ -0,0 +1,38 @@
+DEFINES += FONTDEBUG
+
+LIBRARY=libdix
+
+CSRCS=\
+ atom.c \
+ colormap.c \
+ cursor.c \
+ deprecated.c \
+ devices.c \
+ dispatch.c \
+ dixfonts.c \
+ dixutils.c \
+ enterleave.c \
+ events.c \
+ eventconvert.c \
+ extension.c \
+ ffs.c \
+ gc.c \
+ getevents.c \
+ globals.c \
+ glyphcurs.c \
+ grabs.c \
+ initatoms.c \
+ inpututils.c \
+ main.c \
+ pixmap.c \
+ privates.c \
+ property.c \
+ ptrveloc.c \
+ registry.c \
+ resource.c \
+ selection.c \
+ swaprep.c \
+ swapreq.c \
+ tables.c \
+ window.c
+
diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c
index 37c8e5178..684f2a851 100644
--- a/xorg-server/dix/ptrveloc.c
+++ b/xorg-server/dix/ptrveloc.c
@@ -26,6 +26,10 @@
#include <dix-config.h>
#endif
+#ifdef _MSC_VER
+#define _USE_MATH_DEFINES
+#endif
+
#include <math.h>
#include <ptrveloc.h>
#include <exevents.h>
@@ -33,6 +37,7 @@
#include <xserver-properties.h>
+
/*****************************************************************************
* Predictable pointer acceleration
*
@@ -59,6 +64,11 @@
*
****************************************************************************/
+#ifdef _MSC_VER
+#define inline __inline
+#define lrintf(val) ((int)val)
+#endif
+
/* fwds */
int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index caff1cbff..e9d90aba4 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -3042,9 +3042,12 @@ NotClippedByChildren(WindowPtr pWin)
void
SendVisibilityNotify(WindowPtr pWin)
{
+#ifndef NO_XINERAMA_PORT
+ unsigned int visibility;
+#endif
xEvent event;
#ifndef NO_XINERAMA_PORT
- unsigned int visibility = pWin->visibility;
+ visibility = pWin->visibility;
#endif
if (!MapUnmapEventsEnabled(pWin))
return;