aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
committermarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
commite22891346b85a7db40dec7260a100f90b451cbc8 (patch)
treea7dd2d6757253947bcc821abbf68fd24d3301e89 /xorg-server/hw/xfree86
parentabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff)
downloadvcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.gz
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.bz2
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.zip
git mesa pixman xserver xkeyboard-config update 24 dec 2011
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c24
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h3
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c36
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.h3
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2ext.c4
6 files changed, 66 insertions, 6 deletions
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);
}