debian/changelog | 7 +++++++ debian/patches/series | 1 + debian/patches/xi2-resize-touch.patch | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+)
New commits: commit 2e84778c7527f10ed10392053cdee9886d193573 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed May 7 14:00:39 2014 +0200 Resize touch event history if the array is filled up. xi2-resize-touch.patch diff --git a/debian/changelog b/debian/changelog index 508e9bd..06eb8a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xorg-server (2:1.15.1-0ubuntu4) utopic; urgency=low + + * Resize touch event history if the array is filled up. + - xi2-resize-touch.patch + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Wed, 07 May 2014 13:52:59 +0200 + xorg-server (2:1.15.1-0ubuntu3) utopic; urgency=medium * Revive the old drm_device_keep_trying.patch. diff --git a/debian/patches/series b/debian/patches/series index 0351dc2..93c7b5a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -52,3 +52,4 @@ pixman-validate.patch fix-ftbfs-ppc64el.patch xmir.patch drm_device_keep_trying.patch +xi2-resize-touch.patch diff --git a/debian/patches/xi2-resize-touch.patch b/debian/patches/xi2-resize-touch.patch new file mode 100644 index 0000000..021dd59 --- /dev/null +++ b/debian/patches/xi2-resize-touch.patch @@ -0,0 +1,34 @@ +diff --git a/dix/touch.c b/dix/touch.c +index a7ea213..1478e38 100644 +--- a/dix/touch.c ++++ b/dix/touch.c +@@ -460,12 +460,26 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev) + if (ev->flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING)) + return; + ++ if (ti->history_elements == ti->history_size - 1) { ++ DeviceEvent *hist = NULL; ++ size_t sz = ti->history_size * 2; ++ ++ if (sz < 10000) { ++ hist = realloc(ti->history, sz * sizeof(*hist)); ++ ++ if (hist) { ++ ti->history = hist; ++ ti->history_size = sz; ++ memset(&hist[sz/2], 0, sizeof(*hist)*sz/2); ++ } ++ } ++ } ++ + ti->history[ti->history_elements++] = *ev; +- /* FIXME: proper overflow fixes */ + if (ti->history_elements > ti->history_size - 1) { + ti->history_elements = ti->history_size - 1; +- DebugF("source device %d: history size %d overflowing for touch %u\n", +- ti->sourceid, ti->history_size, ti->client_id); ++ ErrorF("source device %d: history size %d overflowing for touch %u\n", ++ ti->sourceid, ti->history_size, ti->client_id); + } + } + -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1wjrhz-00040s...@moszumanska.debian.org