Commit Graph

68 Commits

Author SHA1 Message Date
Daniel Martin
d5379b350f Use ARRAY_SIZE all over the tree
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-30 13:45:20 -04:00
Daniel Martin
0bcc65f2bf test: input: Fix used uninitialized warning in dix_event_to_core
input.c: In function ‘dix_event_to_core’:
../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized]
 #define SetBit(ptr, bit)  (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
                                                       ^~

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-30 13:44:45 -04:00
Mihail Konev
ead5064581 tests: Convert test/ to single binary
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12 15:01:36 -05:00
Peter Hutterer
ad02d0df75 test: add tests for new valuator mask features
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-20 12:44:58 +10:00
Peter Hutterer
9fb08310b5 mi: don't process events from disabled devices (#77884)
Once a device is disabled, it doesn't have a sprite pointer anymore. If an
event is still in the queue and processed after DisableDevice finished, a
dereference causes a crash. Example backtrace (crash forced by injecting an
event at the right time):

(EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f]
(EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240]
(EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389]
(EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720]
(EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58]
(EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457]
(EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7]
(EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb]
(EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6]
(EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748]
(EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9]
(EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28]
(EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65]
(EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69]
(EE) 15: ? (?+0x29) [0x29]

xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and
DisableDevice() calls mieqProcessInputEvents() again when flushing touches and
button events. Between that and disabling the device (which causes new events
to be refused) there is a window where events may be triggered and enqueued.
On the next call to PIE that event is processed on a now defunct device,
causing the crash.

The simplest fix to this is to discard events from disabled devices. We flush
the queue often enough before disabling that when we get here, we really don't
care about the events from this device.

X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 22:16:28 -07:00
Thierry Reding
31b0be69e5 test/input: Fix alignment assertion for doubles
The code previously tried to compute the offset of a field in the
valuator by subtracting the address of the valuator from the _value_ of
the field (rather than the field's address). The correct way to do it
would have been (note the &'s):

	assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0);
	assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0);

That's essentially what the offsetof() macro does. Using offsetof() has
the added benefit of not using void pointer arithmetic and therefore
silencing a warning on some compilers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-20 11:38:56 +10:00
Peter Hutterer
ce3df579e3 input: un-constify InputAttributes
Introduced in fecc7eb1cf and reverts most of
that but it's helpfully mixed with other stuff.

InputAttributes are not const, they're strdup'd everywhere but the test code
and freed properly. Revert the const char changes and fix the test up instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04 11:27:48 +10:00
Keith Packard
fecc7eb1cf xi: More warning cleanup for input
Lots more const char stuff.

Remove duplicate defs of CoreKeyboardProc and CorePointerProc from
test/xi2/protocol-common.c

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Geert Uytterhoeven
e7045c9dd2 test/input: Fix double-aligned test in dix_valuator_alloc() on m68k
On m68k, doubles are not 64-bit aligned, just like on i386 and sh.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-04-18 13:10:25 +02:00
Yaakov Selkowitz
ea1d76d1b6 Fix formatting of address operators
The formatter confused address operators preceded by casts with
bitwise-and expressions, placing spaces on either side of both.
That syntax isn't used by ordinary address operators, however,
so fix them for consistency.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-05 18:09:48 -06:00
Alan Coopersmith
ad4092cf7d Replace padlength tables with inline functions from misc.h
Adds new function padding_for_int32() and uses existing pad_to_int32()
depending on required results.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 22:52:30 -07:00
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Alan Coopersmith
ca64912c02 Namespace list api to reduce conflicts with similar system headers
Rename functions/macros from list_* to xorg_list_*
Rename struct from struct list to struct xorg_list.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
In-sed-I-trust: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-03 14:23:24 -08:00
Peter Hutterer
f75bdf7fbe test: fix grab mode value tests for new XIGrabModeTouch
This test checks that last-valid-mode + 1 returns a BadValue. With the
addition of XIGrabModeTouch, that value has changed - sync it up again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-22 10:16:15 +10:00
Peter Hutterer
218752bdc5 input: replace GRABTYPE_* with the InputLevel enums
They achieve the same thing, re-use the more generic InputLevel so we can
convert to/fro easier.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13 13:24:08 +10:00
Peter Hutterer
7af23259d8 dix: switch the syncEvent queue to a struct list
No effective functionality change, just cleanup to make this code slightly
more sane.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-09 14:56:20 +10:00
Jeremy Huddleston
4597ac6fe0 test: Add unit test for mieq
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21 00:32:04 -07:00
Jeremy Huddleston
a046d649e4 test: Silence some debug lines from the input unit tests
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-21 00:32:03 -07:00
Keith Packard
15bbdc103b Merge remote-tracking branch 'whot/for-keith' 2011-10-19 17:26:50 -07:00
Peter Hutterer
82c60232c0 dix: add valuator_mask_fetch_double()
Using this call simplifies callers that don't know if the mask bit is set.

Before:
  if (valuator_mask_isset(mask, valnum))
    value = valuator_mask_get_double(mask, valnum));
  else
    value = someothervalue;

Now:
 if (!valuator_mask_fetch_double(mask, valnum, &value))
    value = someothervalue;

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-18 09:15:54 +10:00
Dave Airlie
1433103a49 test: fix input test
The test was memsetting the wrong thing, this fixes make check in my tinderbox.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-15 21:17:41 -07:00
Jeremy Huddleston
f9c6903d4a dix: add utility functions for double to/fro FP1616/FP3232 conversion
Co-authored-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2011-10-15 21:15:47 -07:00
Peter Hutterer
3304bbff9b Input: Add smooth-scrolling support to GetPointerEvents
For scroll wheel support, we used to send buttons 4/5 and 6/7 for
horizontal/vertical positive/negative scroll events.  For touchpads, we
really want more fine-grained scroll values.  GetPointerEvents now
accepts both old-school scroll button presses, and new-style scroll axis
events, while emitting both types of events to support both old and new
clients.

This works with the new XIScrollClass to mark axes as scrolling axes.
Drivers mark any valuators that send scroll events with SetScrollValuator.
(Currently missing: the XIDeviceChangeEvent being sent when a driver changes
a scroll axis at run-time. This can be added later.)

Note: the SCROLL_TYPE enums are intentionally different values to the XI2
proto values to avoid copy/overlapping range bugs.

Co-authored-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-30 09:24:18 +10:00
Daniel Stone
7e919ef5bf Input: Add double-precision valuator_mask API
Add API for valuator_mask that accepts and returns doubles, rather than
ints.  No double API is provided for set_range at the moment.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29 12:23:51 +10:00
Peter Hutterer
05284a03f9 input: make InputOption opaque, provide interface functions.
InputOptions is not switched to use struct list for a future patch to unify
it with the XF86OptionRec.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-08-22 15:56:53 +10:00
Nobuhiro Iwamatsu
b29ce0726d Disable check of double-aligned in test/input.c on Renesas SH
Renesas SH is not aligned at size of double.
When structure has double value, It is aligned in 4byte (long).

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-22 15:56:53 +10:00
Peter Hutterer
98fe735ea1 dix: add KEYBOARD_OR_FLOAT and POINTER_OR_FLOAT to GetMaster()
GetMaster() currently requires an attached slave device as parameter,
resuling in many calls being IsFloating(dev) ? dev : GetMaster(...);

Add two new parameters so GetMaster can be called unconditionally to get the
right device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-08-22 15:56:51 +10:00
Peter Hutterer
dbbe5735d1 test: add a test for GetMaster() behaviour
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-08-22 15:56:51 +10:00
Peter Hutterer
8ef0974874 test: don't test for double alignment on i386. (#36986)
i386 is one of the few architectures that doesn't need double alignment.

X.Org Bug 36986 <http://bugs.freedesktop.org/show_bug.cgi?id=36986>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-03 14:43:04 +10:00
Peter Hutterer
196d679bed test: remove glib dependency
The few features from the glib test suite we used can be replaced with
assert and printf. This patch is a simple replacement for these two
    g_assert → assert
    g_test_message → printf

g_test_init is removed and so is g_test_bug_base. g_test_run replaced with a
simple return 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
2011-04-21 13:43:43 +10:00
Peter Hutterer
419a27b521 Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)
commit 678f5396c9 only fixed the
initialization, not the copy. After a slave device change, the valuator
were out of alignment again.

X.Org Bug 36119 <http://bugs.freedesktop.org/show_bug.cgi?id=36119>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 13:04:19 +10:00
Peter Hutterer
579ee8f5d8 Merge branch 'mi-cleanup' into next 2011-02-23 08:44:42 +10:00
Peter Hutterer
93a7399370 test: write some event → XI1 conversion tests.
Don't test everything, but hey, life is short and I'm trying to have one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-02-22 08:08:55 +10:00
Daniel Stone
46b4979601 Input: Allow EventToCore to return multiple events
Some event types (notably Expose and GraphicsExpose) require multiple
events, a la XI 1.x.  Bring the EventToCore API in line with EventToXI's
and allow it to generate multiple events.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-17 09:40:59 +10:00
Peter Hutterer
8456625d64 Merge branch 'for-peter' of git://people.freedesktop.org/~daniels/xserver into for-keith 2011-01-07 09:35:07 +10:00
Peter Hutterer
fc6cbee772 input: add valuator_mask_free() to free a valuator mask.
Expecting the caller to free the mask requires us to keep it in a single
memory block (which may be an issue lateron), aside from leaving the API
asymetrical. Provide valuator_mask_free() to free the memory and reset the
mask pointer to NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-01-07 08:28:27 +10:00
Daniel Stone
2592effef5 Test: Input: Add helper function for failing EventToCore
We have quite a few tests which involve checking that EventToCore fails
for specific events, so refactor them into a separate function.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-01-06 17:10:21 +00:00
Peter Hutterer
42dc91e32a include: let BitIsOn() return a boolean value.
Simply returning the mask bit breaks checks like
    BitIsOn(mask, 0) != BitIsOn(mask, 1);
as used in 048e93593e.

The naming of this macro suggests that it should return boolean values
anyway. This patch also adds a few simple tests for these macros to make
sure they don't accidentally break in the future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pat Kane <pekane52@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-11-26 09:59:24 +10:00
Peter Hutterer
d435e1ecb8 test: reduce range of byte-padding macro tests.
Byte padding and conversion is interesting for the rage of 0-8 bytes, and
then interesting towards the end of the valid range (INT_MAX - 7 and INT_MAX
- 3).

Note: this changes the upper range for pad_to_int32() and bytes_to_int32()
from the previous (INT_MAX - 4) to (INT_MAX - 3).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-24 08:47:00 +10:00
Peter Hutterer
f49ee9074a test: compare byte padding macros against the expected bytes.
We calculate the expected bytes for each value, let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-24 08:47:00 +10:00
Peter Hutterer
88cb61e1e5 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts:
	dix/getevents.c
	hw/xfree86/common/xf86Xinput.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 12:54:46 +10:00
Peter Hutterer
4613ce3f78 test: valuator_mode tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-25 10:37:52 +10:00
Peter Hutterer
dd11f734a9 input: remove "mode" field from ValuatorClassRec.
We have per-axis mode now. For those bits that still need it (XI 1.x),
assume that the first axis holds the device's mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:19:00 +10:00
Chase Douglas
290af0418f test: input - set valuators mask for event to core conversion
Commit de8be07cc0 adds a requirement to
event to core conversion that at least one of the X or Y valuators are
set in the valuator mask. This commit fixes the event conversion test to
be compliant.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-22 13:36:10 +10:00
Peter Hutterer
9696c782c8 test: valuator_mask tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:53 +10:00
Dan Nicholson
87a1507da7 xfree86: Match devices based on USB ID
Sometimes the vendor and product names aren't specific enough to target
a USB device, so expose the numeric codes in the ID. A MatchUSBID entry
has been added that supports shell pattern matching when fnmatch(3) is
available. For example:

	MatchUSBID "046d:*"

The IDs are stored in lowercase hex separated by a ':' like "lsusb" or
"lspci -n".

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11 09:30:33 +10:00
Dan Nicholson
645679c152 xfree86: Match devices based on PnP ID
Serial input devices lack properties such as product or vendor name. This
makes matching InputClass sections difficult. Add a MatchPnPID entry to
test against the PnP ID of the device. The entry supports a shell pattern
match on platforms that support fnmatch(3). For example:

	MatchPnPID "WACf*"

A match type for non-path pattern matching, match_pattern, has been added.
The difference between this and match_path_pattern is the FNM_PATHNAME
flag in fnmatch(3).

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11 09:30:07 +10:00
Peter Hutterer
151659f963 test: fix up InputAttributes helper function test.
Just some extra clarification as pointed out by Dan Nicholson,
and that memcpy should have been a memcmp.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-28 16:49:30 +10:00
Peter Hutterer
86303a338a dix: add helper functions to duplicate and free InputAttributes.
No special memory handling is used to give drivers the maximum flexibility
with the data. Drivers should be able to call realloc on the product string
if needed and perform similar operations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-25 10:06:11 -07:00
Peter Hutterer
b4baab90c0 dix: EventToCore needs to copy the root window too.
This value isn't actually set for normal events but it saves us some work
for the record extension support.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:38:16 -08:00