From 77a4732b0637493966889fe3545966fdc12a1b5e Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 4 Oct 2009 19:13:27 +0000 Subject: Updated to xkeyboard-config-1.7 pixman-0.16.2 libX11-1.3 libXinerama-1.1 xkbcomp-1.1.1 recordproto-1.14 xineramaproto-1.2 inputproto-2.0 compositeproto-0.4.1 xorg-server-1.7.0 --- xorg-server/dix/Makefile.am | 2 ++ xorg-server/dix/Makefile.in | 13 +++++---- xorg-server/dix/Xserver.d | 7 ++++- xorg-server/dix/colormap.c | 64 ++++++++++++++++++++++++++++++++++++++++++ xorg-server/dix/eventconvert.c | 12 ++++---- xorg-server/dix/events.c | 4 ++- xorg-server/dix/getevents.c | 18 ++++++++++-- 7 files changed, 105 insertions(+), 15 deletions(-) (limited to 'xorg-server/dix') diff --git a/xorg-server/dix/Makefile.am b/xorg-server/dix/Makefile.am index 13e5dedd7..23fe46007 100644 --- a/xorg-server/dix/Makefile.am +++ b/xorg-server/dix/Makefile.am @@ -54,6 +54,7 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ || cp Xserver-dtrace.h.in $@ +if !XQUARTZ # Generate dtrace object code for probes in libdix dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o @@ -63,6 +64,7 @@ noinst_PROGRAMS = dix.O dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) ld -r -o $@ .libs/*.o endif +endif dix.c: touch $@ diff --git a/xorg-server/dix/Makefile.in b/xorg-server/dix/Makefile.in index 661851255..eff37155a 100644 --- a/xorg-server/dix/Makefile.in +++ b/xorg-server/dix/Makefile.in @@ -36,7 +36,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@XSERVER_DTRACE_TRUE@noinst_PROGRAMS = dix.O$(EXEEXT) +@XQUARTZ_FALSE@@XSERVER_DTRACE_TRUE@noinst_PROGRAMS = dix.O$(EXEEXT) subdir = dix DIST_COMMON = $(dist_miscconfig_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -527,6 +527,9 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +@XQUARTZ_TRUE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES) +@XQUARTZ_TRUE@ @rm -f dix.O$(EXEEXT) +@XQUARTZ_TRUE@ $(AM_V_CCLD)$(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS) @XSERVER_DTRACE_FALSE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES) @XSERVER_DTRACE_FALSE@ @rm -f dix.O$(EXEEXT) @XSERVER_DTRACE_FALSE@ $(AM_V_CCLD)$(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS) @@ -833,11 +836,11 @@ uninstall-am: uninstall-dist_miscconfigDATA @XSERVER_DTRACE_TRUE@ || cp Xserver-dtrace.h.in $@ # Generate dtrace object code for probes in libdix -@XSERVER_DTRACE_TRUE@dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) -@XSERVER_DTRACE_TRUE@ $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o +@XQUARTZ_FALSE@@XSERVER_DTRACE_TRUE@dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) +@XQUARTZ_FALSE@@XSERVER_DTRACE_TRUE@ $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o -@XSERVER_DTRACE_TRUE@dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) -@XSERVER_DTRACE_TRUE@ ld -r -o $@ .libs/*.o +@XQUARTZ_FALSE@@XSERVER_DTRACE_TRUE@dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) +@XQUARTZ_FALSE@@XSERVER_DTRACE_TRUE@ ld -r -o $@ .libs/*.o dix.c: touch $@ diff --git a/xorg-server/dix/Xserver.d b/xorg-server/dix/Xserver.d index e4c9b8320..cea97e908 100644 --- a/xorg-server/dix/Xserver.d +++ b/xorg-server/dix/Xserver.d @@ -29,8 +29,13 @@ /* * Xserver dtrace provider definition */ - +#ifdef __APPLE__ +#define string char * +#define pid_t uint32_t +#define zoneid_t uint32_t +#else #include +#endif provider Xserver { /* reqType, data, length, client id, request buffer */ diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c index a5a006e60..d702b0204 100644 --- a/xorg-server/dix/colormap.c +++ b/xorg-server/dix/colormap.c @@ -2690,3 +2690,67 @@ IsMapInstalled(Colormap map, WindowPtr pWin) xfree(pmaps); return (found); } + +struct colormap_lookup_data { + ScreenPtr pScreen; + VisualPtr visuals; +}; + +static void _colormap_find_resource(pointer value, XID id, + pointer cdata) +{ + struct colormap_lookup_data *cmap_data = cdata; + VisualPtr visuals = cmap_data->visuals; + ScreenPtr pScreen = cmap_data->pScreen; + ColormapPtr cmap = value; + int j; + + j = cmap->pVisual - pScreen->visuals; + cmap->pVisual = &visuals[j]; +} + +/* something has realloced the visuals, instead of breaking + ABI fix it up here - glx and compsite did this wrong */ +Bool +ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, + DepthPtr depth) +{ + struct colormap_lookup_data cdata; + int numVisuals; + VisualPtr visuals; + XID *vids, vid; + int first_new_vid, first_new_visual, i; + + first_new_vid = depth->numVids; + first_new_visual = pScreen->numVisuals; + + vids = xrealloc(depth->vids, (depth->numVids + new_visual_count) * sizeof(XID)); + if (!vids) + return FALSE; + + /* its realloced now no going back if we fail the next one */ + depth->vids = vids; + + numVisuals = pScreen->numVisuals + new_visual_count; + visuals = xrealloc(pScreen->visuals, numVisuals * sizeof(VisualRec)); + if (!visuals) { + return FALSE; + } + + cdata.visuals = visuals; + cdata.pScreen = pScreen; + FindClientResourcesByType(serverClient, RT_COLORMAP, _colormap_find_resource, &cdata); + + pScreen->visuals = visuals; + + for (i = 0; i < new_visual_count; i++) { + vid = FakeClientID(0); + pScreen->visuals[first_new_visual + i].vid = vid; + vids[first_new_vid + i] = vid; + } + + depth->numVids += new_visual_count; + pScreen->numVisuals += new_visual_count; + + return TRUE; +} diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index d91ba67c2..e25f3ee97 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -352,17 +352,17 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv->device_state = state; switch (xv->num_valuators) { case 6: - xv->valuator5 = ev->valuators.data[i + 5]; + xv->valuator5 = ev->valuators.data[xv->first_valuator + 5]; case 5: - xv->valuator4 = ev->valuators.data[i + 4]; + xv->valuator4 = ev->valuators.data[xv->first_valuator + 4]; case 4: - xv->valuator3 = ev->valuators.data[i + 3]; + xv->valuator3 = ev->valuators.data[xv->first_valuator + 3]; case 3: - xv->valuator2 = ev->valuators.data[i + 2]; + xv->valuator2 = ev->valuators.data[xv->first_valuator + 2]; case 2: - xv->valuator1 = ev->valuators.data[i + 1]; + xv->valuator1 = ev->valuators.data[xv->first_valuator + 1]; case 1: - xv->valuator0 = ev->valuators.data[i + 0]; + xv->valuator0 = ev->valuators.data[xv->first_valuator + 0]; } if (i + 6 < num_valuators) diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index a79cf6d2f..d60b8a534 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -4414,10 +4414,12 @@ DeviceEnterLeaveEvent( filter, grab); } else { if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event)) - return; + goto out; DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter, NullGrab); } + +out: xfree(event); } diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 7ddf88bad..2df32e8f5 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -578,12 +578,13 @@ GetMaximumEventsNum(void) { static void clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { - AxisInfoPtr axis = pDev->valuator->axes + axisNum; - /* InitValuatoraAxisStruct ensures that (min < max). */ + AxisInfoPtr axis; if (axisNum >= pDev->valuator->numAxes) return; + axis = pDev->valuator->axes + axisNum; + /* If a value range is defined, clip. If not, do nothing */ if (axis->max_value <= axis->min_value) return; @@ -780,6 +781,19 @@ positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac, *screeny_frac = dev->last.remainder[1]; } + /* Hit the left screen edge? */ + if (*screenx <= 0 && *screenx_frac < 0.0f) + { + *screenx_frac = 0.0f; + x_frac = 0.0f; + } + if (*screeny <= 0 && *screeny_frac < 0.0f) + { + *screeny_frac = 0.0f; + y_frac = 0.0f; + } + + old_screenx = *screenx; old_screeny = *screeny; /* This takes care of crossing screens for us, as well as clipping -- cgit v1.2.3