aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
committermarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
commita233ed27754bb0d373d63569d9a28aeb8fee5b82 (patch)
tree2732a9434bbc102653dc22df9887d94e19570836 /xorg-server/dix
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.gz
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.bz2
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.zip
Checked in xorg-server-1.6.99.901
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/Makefile.in45
-rw-r--r--xorg-server/dix/deprecated.c18
-rw-r--r--xorg-server/dix/devices.c48
-rw-r--r--xorg-server/dix/events.c2
-rw-r--r--xorg-server/dix/getevents.c4
5 files changed, 52 insertions, 65 deletions
diff --git a/xorg-server/dix/Makefile.in b/xorg-server/dix/Makefile.in
index caa244120..661851255 100644
--- a/xorg-server/dix/Makefile.in
+++ b/xorg-server/dix/Makefile.in
@@ -69,6 +69,9 @@ am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo deprecated.lo \
registry.lo resource.lo selection.lo swaprep.lo swapreq.lo \
tables.lo window.lo
libdix_la_OBJECTS = $(am_libdix_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
libmain_la_LIBADD =
am_libmain_la_OBJECTS = main.lo
libmain_la_OBJECTS = $(am_libmain_la_OBJECTS)
@@ -82,10 +85,22 @@ am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) dix.c
DIST_SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) dix.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -119,9 +134,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
@@ -210,6 +225,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@
KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
+LAUNCHD_ID_PREFIX = @LAUNCHD_ID_PREFIX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
@@ -499,9 +515,9 @@ clean-noinstLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
libdix.la: $(libdix_la_OBJECTS) $(libdix_la_DEPENDENCIES)
- $(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS)
libmain.la: $(libmain_la_OBJECTS) $(libmain_la_DEPENDENCIES)
- $(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -513,7 +529,7 @@ clean-noinstPROGRAMS:
rm -f $$list
@XSERVER_DTRACE_FALSE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES)
@XSERVER_DTRACE_FALSE@ @rm -f dix.O$(EXEEXT)
-@XSERVER_DTRACE_FALSE@ $(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS)
+@XSERVER_DTRACE_FALSE@ $(AM_V_CCLD)$(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -556,22 +572,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
diff --git a/xorg-server/dix/deprecated.c b/xorg-server/dix/deprecated.c
index 8123886ca..21d0f574d 100644
--- a/xorg-server/dix/deprecated.c
+++ b/xorg-server/dix/deprecated.c
@@ -162,22 +162,4 @@ LookupIDByClass(XID id, RESTYPE classes)
return val;
}
-/* replaced by dixLookupResourceBy{Type,Class} */
-_X_EXPORT int
-dixLookupResource (pointer *result, XID id, RESTYPE rtype,
- ClientPtr client, Mask mode)
-{
- Bool istype = ((rtype & TypeMask) && (rtype != RC_ANY)) || (rtype == RT_NONE);
-
- static int warn = 1;
- if (warn > 0 && --warn)
- ErrorF("Warning: dixLookupResource() "
- "is deprecated. Please convert your driver/module "
- "to use dixLookupResourceByType/dixLookupResourceByClass().\n");
- if (istype)
- return dixLookupResourceByType (result, id, rtype, client, mode);
- else
- return dixLookupResourceByClass (result, id, rtype, client, mode);
-}
-
/* end deprecated functions */
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 0be3d58ab..76e962e4e 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -312,8 +312,11 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
PairDevices(NULL, other, dev);
} else
{
- other = (IsPointerDevice(dev)) ? inputInfo.pointer :
- inputInfo.keyboard;
+ if (dev->coreEvents)
+ other = (IsPointerDevice(dev)) ? inputInfo.pointer :
+ inputInfo.keyboard;
+ else
+ other = NULL; /* auto-float non-core devices */
AttachDevice(NULL, dev, other);
}
}
@@ -1131,7 +1134,7 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src)
return TRUE;
}
-_X_EXPORT Bool
+Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
CARD8 *map)
{
@@ -1330,7 +1333,7 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev)
return TRUE;
}
-_X_EXPORT Bool
+Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
{
PtrFeedbackPtr feedc;
@@ -2335,7 +2338,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
return BadDevice;
/* set from floating to floating? */
- if (!dev->u.master && !master)
+ if (!dev->u.master && !master && dev->enabled)
return Success;
/* free the existing sprite. */
@@ -2357,7 +2360,13 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
*/
if (!master)
{
- WindowPtr currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
+ WindowPtr currentRoot;
+
+ if (dev->spriteInfo->sprite)
+ currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
+ else /* new device auto-set to floating */
+ currentRoot = WindowTable[0];
+
/* we need to init a fake sprite */
screen = currentRoot->drawable.pScreen;
screen->DeviceCursorInitialize(dev, screen);
@@ -2374,30 +2383,11 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
RecalculateMasterButtons(master);
}
- /* If we were connected to master device before, this MD may need to
- * change back to it's original classes.
+ /* XXX: in theory, the MD should change back to its old, original
+ * classes when the last SD is detached. Thanks to the XTEST devices,
+ * we'll always have an SD attached until the MD is removed.
+ * So let's not worry about that.
*/
- if (oldmaster)
- {
- DeviceIntPtr it;
- for (it = inputInfo.devices; it; it = it->next)
- if (!IsMaster(it) && it->u.master == oldmaster)
- break;
-
- if (!it) /* no dev is paired with old master */
- {
- EventListPtr event = NULL;
-
- /* XXX: reset master back to defaults */
- event = InitEventList(1);
- SetMinimumEventSize(event, 1, sizeof(DeviceChangedEvent));
- CreateClassesChangedEvent(event, oldmaster, oldmaster,
- DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT);
- XISendDeviceChangedEvent(oldmaster, oldmaster,
- (DeviceChangedEvent*)event->event);
- FreeEventList(event, 1);
- }
- }
return Success;
}
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..46e508002 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -858,10 +858,6 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code)
* that is done by SwitchCoreKeyboard, which is called from
* mieqProcessInputEvents. If replacing that function, take care to call
* SetCoreKeyboard before processInputProc, so keymaps are altered to suit.
- *
- * Note that this function recurses! If called for non-XKB, a repeating
- * key press will trigger a matching KeyRelease, as well as the
- * KeyPresses.
*/
int
GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,