diff options
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/dmx/examples/Makefile.am | 56 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/linux/keyboard.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/linux/ms.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/linux/ps2.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Module.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 24 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.h | 3 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 36 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.h | 3 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2ext.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xquartz/mach-startup/Makefile.am | 7 |
11 files changed, 108 insertions, 41 deletions
diff --git a/xorg-server/hw/dmx/examples/Makefile.am b/xorg-server/hw/dmx/examples/Makefile.am index 229bb57fc..d055ddc71 100644 --- a/xorg-server/hw/dmx/examples/Makefile.am +++ b/xorg-server/hw/dmx/examples/Makefile.am @@ -10,60 +10,60 @@ bin_PROGRAMS = \ noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG) dmxinfo_SOURCES = dmxinfo.c -dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxwininfo_SOURCES = dmxwininfo.c -dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@ -dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS) +dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxreconfig_SOURCES = dmxreconfig.c -dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxreconfig_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxresize_SOURCES = dmxresize.c -dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxresize_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxaddscreen_SOURCES = dmxaddscreen.c -dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxaddscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxrmscreen_SOURCES = dmxrmscreen.c -dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxrmscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxaddinput_SOURCES = dmxaddinput.c -dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxaddinput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) dmxrminput_SOURCES = dmxrminput.c -dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@ -dmxrminput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS) +dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) xinput_SOURCES = xinput.c -xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@ -xinput_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS) +xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) xtest_SOURCES = xtest.c -xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@ -xtest_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS) +xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) evi_SOURCES = evi.c -evi_LDADD = @X11EXAMPLES_DEP_LIBS@ -evi_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +evi_LDADD = $(X11EXAMPLES_DEP_LIBS) +evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) res_SOURCES = res.c -res_LDADD = @XRESEXAMPLES_DEP_LIBS@ -res_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +res_LDADD = $(XRESEXAMPLES_DEP_LIBS) +res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) xled_SOURCES = xled.c -xled_LDADD = @X11EXAMPLES_DEP_LIBS@ -xled_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +xled_LDADD = $(X11EXAMPLES_DEP_LIBS) +xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) xbell_SOURCES = xbell.c -xbell_LDADD = @X11EXAMPLES_DEP_LIBS@ -xbell_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +xbell_LDADD = $(X11EXAMPLES_DEP_LIBS) +xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS) ev_SOURCES = ev.c ev_LDADD = diff --git a/xorg-server/hw/kdrive/linux/keyboard.c b/xorg-server/hw/kdrive/linux/keyboard.c index f5f9d9b8a..ba2637b58 100644 --- a/xorg-server/hw/kdrive/linux/keyboard.c +++ b/xorg-server/hw/kdrive/linux/keyboard.c @@ -692,7 +692,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki) return !Success; fd = LinuxConsoleFd; - ki->driverPrivate = (void *) fd; + ki->driverPrivate = (void *) (intptr_t) fd; ioctl (fd, KDGKBMODE, &LinuxKbdTrans); tcgetattr (fd, &LinuxTermios); @@ -724,7 +724,7 @@ LinuxKeyboardDisable (KdKeyboardInfo *ki) if (!ki) return; - fd = (int) ki->driverPrivate; + fd = (int) (intptr_t) ki->driverPrivate; KdUnregisterFd(ki, fd, FALSE); ioctl(fd, KDSKBMODE, LinuxKbdTrans); @@ -753,7 +753,7 @@ LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds) if (!ki) return; - ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7); + ioctl ((int)(intptr_t)ki->driverPrivate, KDSETLED, leds & 7); } KdKeyboardDriver LinuxKeyboardDriver = { diff --git a/xorg-server/hw/kdrive/linux/ms.c b/xorg-server/hw/kdrive/linux/ms.c index b6151cd90..176e12550 100644 --- a/xorg-server/hw/kdrive/linux/ms.c +++ b/xorg-server/hw/kdrive/linux/ms.c @@ -152,7 +152,7 @@ MsEnable (KdPointerInfo *pi) } if (KdRegisterFd (port, MsRead, pi)) return TRUE; - pi->driverPrivate = (void *)port; + pi->driverPrivate = (void *)(intptr_t)port; return Success; @@ -164,7 +164,7 @@ MsEnable (KdPointerInfo *pi) static void MsDisable (KdPointerInfo *pi) { - KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE); + KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE); } static void diff --git a/xorg-server/hw/kdrive/linux/ps2.c b/xorg-server/hw/kdrive/linux/ps2.c index 465b963f2..b62d769f2 100644 --- a/xorg-server/hw/kdrive/linux/ps2.c +++ b/xorg-server/hw/kdrive/linux/ps2.c @@ -159,7 +159,7 @@ Ps2Enable (KdPointerInfo *pi) return BadAlloc; } - pi->driverPrivate = (void *)fd; + pi->driverPrivate = (void *)(intptr_t)fd; return Success; } @@ -168,7 +168,7 @@ Ps2Enable (KdPointerInfo *pi) static void Ps2Disable (KdPointerInfo *pi) { - KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE); + KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE); } static void diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index d35464351..1de87dbbe 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -83,7 +83,7 @@ typedef enum { */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(15, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(16, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(6, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index b9753f01d..280a6ec93 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -1410,4 +1410,28 @@ xf86EnableDevice(DeviceIntPtr dev) EnableDevice(dev, TRUE); } +/** + * Post a touch event with optional valuators. If this is the first touch in + * the sequence, at least x & y valuators must be provided. The driver is + * responsible for maintaining the correct event sequence (TouchBegin, TouchUpdate, + * TouchEnd). Submitting an update or end event for a unregistered touchid will + * result in errors. + * Touch IDs may be reused by the driver but only after a TouchEnd has been + * submitted for that touch ID. + * + * @param dev The device to post the event for + * @param touchid The touchid of the current touch event. Must be an + * existing ID for TouchUpdate or TouchEnd events + * @param type One of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd + * @param flags Flags for this event + * @param The valuator mask with all valuators set for this event. + */ +void +xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type, + uint32_t flags, const ValuatorMask *mask) +{ + + QueueTouchEvents(dev, type, touchid, flags, mask); +} + /* end of xf86Xinput.c */ diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 7d96fac78..ad092dd03 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -141,6 +141,9 @@ extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_co const int *valuators); extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); +extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, + uint16_t type, uint32_t flags, + const ValuatorMask *mask); extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void); extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min); extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr options); diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 0d613be8e..d6441a234 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -181,6 +181,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw) pPriv->last_swap_ust = 0; list_init(&pPriv->reference_list); pPriv->serialNumber = DRI2DrawableSerial(pDraw); + pPriv->needInvalidate = FALSE; if (pDraw->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDraw; @@ -376,6 +377,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, int old_buf = find_attachment(pPriv, attachment); if ((old_buf < 0) + || attachment == DRI2BufferFrontLeft || !dimensions_match || (pPriv->buffers[old_buf]->format != format)) { *buffer = (*ds->CreateBuffer)(pDraw, attachment, format); @@ -585,7 +587,7 @@ DRI2InvalidateDrawable(DrawablePtr pDraw) pPriv->needInvalidate = FALSE; list_for_each_entry(ref, &pPriv->reference_list, link) - ref->invalidate(pDraw, ref->priv); + ref->invalidate(pDraw, ref->priv, ref->id); } /* @@ -828,6 +830,19 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) return FALSE; } +/* + * A TraverseTree callback to invalidate all windows using the same + * pixmap + */ +static int +DRI2InvalidateWalk(WindowPtr pWin, pointer data) +{ + if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) + return WT_DONTWALKCHILDREN; + DRI2InvalidateDrawable(&pWin->drawable); + return WT_WALKCHILDREN; +} + int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 *swap_target, @@ -928,7 +943,24 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, */ *swap_target = pPriv->swap_count + pPriv->swapsPending; - DRI2InvalidateDrawable(pDraw); + if (pDraw->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); + + /* + * Find the top-most window using this pixmap + */ + while (pWin->parent && pScreen->GetWindowPixmap(pWin->parent) == pPixmap) + pWin = pWin->parent; + + /* + * Walk the sub-tree to invalidate all of the + * windows using the same pixmap + */ + TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); + DRI2InvalidateDrawable(&pPixmap->drawable); + } else + DRI2InvalidateDrawable(pDraw); return Success; } diff --git a/xorg-server/hw/xfree86/dri2/dri2.h b/xorg-server/hw/xfree86/dri2/dri2.h index 9c93209d1..a67e35f73 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.h +++ b/xorg-server/hw/xfree86/dri2/dri2.h @@ -166,7 +166,8 @@ typedef int (*DRI2ScheduleWaitMSCProcPtr)(ClientPtr client, CARD64 remainder); typedef void (*DRI2InvalidateProcPtr)(DrawablePtr pDraw, - void *data); + void *data, + XID id); /** * DRI2 calls this hook when ever swap_limit is going to be changed. Default diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index e612cf051..73ef7f25e 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -156,13 +156,13 @@ ProcDRI2Authenticate(ClientPtr client) } static void -DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv) +DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv, XID id) { xDRI2InvalidateBuffers event; ClientPtr client = priv; event.type = DRI2EventBase + DRI2_InvalidateBuffers; - event.drawable = pDraw->id; + event.drawable = id; WriteEventsToClient(client, 1, (xEvent *)&event); } diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.am b/xorg-server/hw/xquartz/mach-startup/Makefile.am index 0b1f8977e..21ad5b503 100644 --- a/xorg-server/hw/xquartz/mach-startup/Makefile.am +++ b/xorg-server/hw/xquartz/mach-startup/Makefile.am @@ -12,6 +12,13 @@ x11app_PROGRAMS = X11.bin dist_X11_bin_SOURCES = \ bundle-main.c +# strndup(3) was added in Mac OS X 10.7, but we do this unconditionally to deal +# with the case where we build on Lion but target Snow Leopard as the minimum +# OS version. +#if NEED_STRNDUP +dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c +#endif + nodist_X11_bin_SOURCES = \ mach_startupServer.c \ mach_startupUser.c |