Commit Graph

1261 Commits

Author SHA1 Message Date
Simon Thum
35fce4e5c7 dix: fix warning in pointer acceleration
newer gcc's warn against how this cast is done (though it eludes me why),
and lrintf() is also faster especially on insane processors like the P4
(http://www.mega-nerd.com/FPcast).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-07 16:49:02 +10:00
Peter Hutterer
d220d6907d Xi: add GrabButton and GrabKeysym code.
We don't do keycode grabs in XI2, they're pointless.
2009-05-06 14:37:33 +10:00
Peter Hutterer
59358de4b6 input: ensure various ProcUngrabKey/Buttons have the right grabtype set. 2009-05-04 17:40:29 +10:00
Peter Hutterer
834ea071b6 dix: if grab types differ, two grabs cannot be the same. 2009-05-04 17:40:25 +10:00
Peter Hutterer
08cd846000 dix: only free the old cursor if the grab was successful.
Testcase: start thunderbird and move a message around, crashes after two or
three moves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:38 +10:00
Peter Hutterer
6a618929a0 input: reshuffle CreateGrab and friends to take a GrabParameters param.
This is cleaning up work in preparation for XI2 passive grabs.
2009-05-01 09:07:37 +10:00
Eamon Walsh
57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
Peter Hutterer
c2c515ead3 dix: remove all but main() from main.c
All other functions are pushed into where they seemed to fit.
main.c is now linked separately into libmain.a and linked in by the various
DDXs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
987579c930 dix: remove all but main() from main.c
All other functions are pushed into where they seemed to fit.
main.c is now linked separately into libmain.a and linked in by the various
DDXs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 15:57:14 +10:00
Peter Hutterer
057fc9a4f8 Merge branch 'master' into xi2
Conflicts:
	Xi/chdevhier.c
	include/input.h
2009-04-24 16:15:47 +10:00
Benjamin Close
fab563bf8f input: propagate XTst events through virtual slave devices.
A XTest virtual slave device pair (kbd/ptr) exists for every master
device pair. This is so XTest events are correctly propogated via slave
devices up to Master devices and the classes are correctly changed along
the way. We add the XTest slave device pair to the Virtual Core pointer
and provide a simple way of creating the devices.

A XTest Slave Device is identified by the XTstDevicePrivateKey property
being set in the devices devProperties

XI events are still propagated through the matching device, in the hope the
client knows what it is doing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-24 15:28:33 +10:00
Benjamin Close
826a5bff01 dix: Change AllocMaster into AllocDevicePair, allow creation of SDs too.
Allocating a slave device is essentially the same as allocating a master device.
Hence we rename AllocMaster to AllocDevicePair and provided the ability to
indicate if a master or slave device pair is required.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-21 13:11:51 +10:00
Peter Hutterer
e2e5932bda dix: don't allow more than MAX_VALUATORS on one device.
Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the
internal event delivery relies on not having more than MAX_VALUATOR axes, so
let's cap it down.
If there's real devices that require more than the current 36, I'm sure we can
bump this up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-21 13:11:51 +10:00
Julien Cristau
063833f3a6 Add XI 1.5 event and requests to protocol.txt 2009-04-20 12:50:34 +02:00
Julien Cristau
4f86ee61a4 Add RandR 1.3 requests to protocol.txt 2009-04-20 12:50:29 +02:00
Peter Hutterer
d5ad14c8ed Merge branch 'master' into xi2 2009-04-19 22:28:22 +10:00
Peter Hutterer
54716fd3db Convert to using int32_t fixed point values on the wire.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer
129ac9a914 dix: set root_x/y for device events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer
74d0fc3aee dix: don't allow more than MAX_VALUATORS on one device.
Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the
internal event delivery relies on not having more than MAX_VALUATOR axes, so
let's cap it down.
If there's real devices that require more than the current 36, I'm sure we can
bump this up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
edb70caf21 dix: remove un-used parameter "core" from AllowSome
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
c94ea5bc05 input: use a GrabMask union in GrabDevice to allow for XI2 masks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
09f9a86077 input: replace GrabRec's coreGrab field with grabtype.
Don't allow grabs of different types to override each other.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:08 +10:00
Simon Thum
cbbc7fed99 dix: correctly utilize tracker buffer and protect from timer overruns
two small related fixes hard to split up

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:19:00 +10:00
Peter Hutterer
8bf2f56267 dix: fix dev/keybd variable mixup.
Reported-by: Eric Anhold <eric@anholt.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:18:05 +10:00
Simon Thum
73b01a9aac dix: fix pointer accelerations remainder handling
This didn't really work as intended, but did amazingly well thanks
to roundf() hiding the defect. Cheers!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:17:48 +10:00
Peter Hutterer
4318075140 dix: store subpixel precision and send it down the wire to the client.
For the valuator data, not yet for root x/y and event x/y.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:17:07 +10:00
Simon Thum
9212948461 dix: allow relative motion buffer to accumulate in a natural way
Since with XI2 we pass sub-pixel motion, anything else is broken.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:16:49 +10:00
Peter Hutterer
b406886bbf input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct.
Virtually all callers use
    XkbGetRulesDefault(&rmlvo);
    InitKeyboardDeviceStruct(..., rmlvo);

Let's save them the trouble and accept NULL as a hint to take the
default RMLVO.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-04-17 10:03:40 +10:00
Peter Hutterer
4e4e263bc0 dix: remove un-used parameter "core" from AllowSome
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-17 10:03:30 +10:00
Eric Anholt
4474c200a1 Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave.
This is more sane anyway, as it ensures a rebuild when changing them.
2009-04-14 10:35:44 -04:00
Simon Thum
ff7f019bbc dix: correctly utilize tracker buffer and protect from timer overruns
two small related fixes hard to split up

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-10 13:49:51 +10:00
Simon Thum
06aebecb19 dix: fix pointer accelerations remainder handling
This didn't really work as intended, but did amazingly well thanks
to roundf() hiding the defect. Cheers!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-10 13:49:51 +10:00
Peter Hutterer
011cee3103 dix: fix dev/keybd variable mixup.
Reported-by: Eric Anhold <eric@anholt.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09 20:50:32 +10:00
Peter Hutterer
6c3b633299 Merge branch 'master' into xi2 2009-04-07 19:36:27 +10:00
Peter Hutterer
0cfd481308 dix: Dont change the keyboard mapping on non-keyboard devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-07 19:25:17 +10:00
Adam Jackson
6574ab092f DPMS: Remove the defaultDPMS* variables 2009-04-03 18:22:20 -04:00
Adam Jackson
c1cf36ee29 DPMS: Simplify command line parsing 2009-04-03 18:22:20 -04:00
Adam Jackson
d52fddefae DPMS: Align the default timeouts with the default screensaver timeout.
On a typical LCD, a black screensaver is actually worse for power
consumption than a normal screen, because it takes more energy to turn
the crystals opaque.  Also, the intermediate DPMS states are essentially
useless and most monitors alias them to the 'off' state, so we may as
well do the same.

As a pleasant side effect, this brings the default DPMS timeouts in line
with the EnergyStar Program Requirements for Computers:

http://www.energystar.gov/index.cfm?c=revisions.computer_spec

which state that products must be "shipped with the display's Sleep mode
set to activate within 15 minutes of user inactivity".
2009-04-03 18:22:20 -04:00
Adam Jackson
38576dc3ae DPMS: Simplify some macro silliness. 2009-04-03 18:22:19 -04:00
Adam Jackson
2e145989d1 dix: Simplify InitClient() 2009-03-31 15:00:27 -04:00
Peter Hutterer
e3c1096273 dix: build_modmap_from_modkeymap needs to bounds-check its argument.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-03-27 11:26:15 +10:00
Peter Hutterer
45baef0b77 dix: return BadValue as error in SetModifierMapping.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-03-27 11:26:15 +10:00
Peter Hutterer
844bb629fe dix: remove a truly useless a = (foo) ? bar : bar; statement.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-23 16:06:53 +10:00
Tomas Carnecky
62183a06e5 Remove two unused defines in C files
These two defines were defined in C files but not used anywhere:

  dix/window.c      #define DeviceEventMasks (KeyPressMask | [...]
  os/connection.c   #define MAXFD 500

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-23 16:06:34 +10:00
Peter Hutterer
111ef10375 dix: move ProcGrabPointer guts into GrabDevice.
Yes, this means we have even more arguments to GrabDevice. But it beats having
a copy of most but not all of GrabDevice in ProcGrabPointer.
Also, reshuffle the order of parameters, the CARD* status is a return value
and should be last.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:57 +10:00
Peter Hutterer
15a969c0fc dix: remove now obsolete mskidx parameter from DeliverEventsToWindow.
mskidx would always be dev->id anyway, so if we're already passing in the
device, mskidx is superfluous.
2009-03-20 15:17:57 +10:00
Peter Hutterer
46145a9312 dix: remove coreMods field from GrabRec.
Nobody uses it anyway, and it's taking up a whole bit!
2009-03-20 15:17:56 +10:00
Peter Hutterer
d9b7343eac dix: even if we don't get a XI1 event, continue processing. 2009-03-20 15:17:56 +10:00
Peter Hutterer
e11dc10f01 dix: Send HierarchyEvents when devices are added/removed/enabled/disabled. 2009-03-20 15:17:56 +10:00
Peter Hutterer
8634e1bcba dix: send presence events when floating and unfloating SDs 2009-03-20 15:17:56 +10:00
Peter Hutterer
a4b61cfc78 dix: un-static FixUpEventFromWindow and deal with focus events too. 2009-03-20 15:17:56 +10:00
Peter Hutterer
4cc6a96d71 input: add support for RawDeviceEvents. 2009-03-20 15:17:56 +10:00
Peter Hutterer
a668d91e28 dix: store the xi2mask on grabs and pass it around as needed.
This enables passive and implicit passive grabs for XI2 events, except that we
don't have the protocol spec yet to request them.
2009-03-20 15:17:56 +10:00
Peter Hutterer
97e89a5957 Allow XI2 event selection for AllDevices and AllMasterDevices. 2009-03-20 15:17:55 +10:00
Peter Hutterer
808a158182 dix: Enable XI2 delivery for events and focused events.
No support for grabbed events yet.
2009-03-20 15:17:55 +10:00
Peter Hutterer
87ff1159b4 dix: deliver device enter/leave events. 2009-03-20 15:17:55 +10:00
Peter Hutterer
3f37923a72 Xi: send XI2 focus events. 2009-03-20 15:17:55 +10:00
Peter Hutterer
daf7dd3bfe dix: Add GetWindowXI2Mask helper 2009-03-20 15:17:55 +10:00
Peter Hutterer
38bba0c1b7 Xi: Change ChangeMasterDeviceClasses to new XI2 events.
Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that
assembles the XI2 wire event for the DeviceChanged event. Re-use this when
detaching the last SD.

Not quite perfect yet, we still copy the device classes from the slave now
rather than from the data we had when the event occured. But it's a start.

(We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:55 +10:00
Peter Hutterer
181e41511d dix: fix up device enter/leave for XI_Enter/XI_Leave. 2009-03-20 15:17:55 +10:00
Peter Hutterer
0befeb36c1 dix: Add device info to DeviceChangedEvent, and fill in CCCE.
We need to fill the info here, as the device may change until we get a chance
to process it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:55 +10:00
Peter Hutterer
b2ba77bac4 dix: add EventToXI2 and GetXI2Type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:55 +10:00
Peter Hutterer
dfa2e8e966 Xi: add XIQueryDevice request handling. 2009-03-20 15:17:55 +10:00
Peter Hutterer
77d51b94bd dix: FixUpEventForWindow needs to handle XI2 events. 2009-03-20 15:17:54 +10:00
Peter Hutterer
95ed2ab715 Add XI2_EVENT check. 2009-03-20 15:17:54 +10:00
Peter Hutterer
43e48900fc dix: Force deviced ids of 2 and higher for actual devices.
0 is now reserved for the "AllDevices" virtual device.
1 is now reserved for the "AllMasterDevices" virtual device.

This also means that wherever we passed in (mskidx = 0), we now need to pass
in the deviceid.
2009-03-20 15:17:54 +10:00
Peter Hutterer
70896f6127 dix: abstract event filters through GetEventFilters.
Don't let everyone acces the filters[] array directly. This is necessary once
we start dealing with GenericEvents, where the filters are a bit more
complicated.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:54 +10:00
Peter Hutterer
8a8763f150 dix: restructure DeliverEventsToWindow, a little bit anyway.
Desperate attempt of making the code easy to read and understand. A failed
desparate attempt, possibly.
2009-03-20 15:17:54 +10:00
Peter Hutterer
891cfc8020 dix: clean up DeliverDeviceEvents.
Move mask checking into external function and streamline the code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:54 +10:00
Peter Hutterer
445daa62e7 Xext: purge XGE event masks.
The masks were originally designed to generically handle event masks for
extensions. Since all that is in-server anyway, it's much better writing
custom event masks for those extensions that need it and not providing a
unified mechanism.
XI2 needs more than the current implementation, which is already too complex
for most other extensions. good riddance.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
6fe4c28bf4 Add agressive event type checking.
Best to FatalError if a wrong event comes in. At least that forces me to fix
it really quickly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
497a125339 dix: remove duplicate PickKeyboard() command.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
7d4df0ee44 dix: fix device sync state when calling SyncBoth during AllowEvents.
This did access the wrong device's sync state, potentially freezing or not
thawing the actual device that was supposed to be thawed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
f1c7b95d83 dix: do percentage check before device check in ProcBell
This is just for correctness. The server should return BadValue for anything
not in [-100, 100].

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
d60391d8ca dix: fix uncredible fail in PostSyntheticMotion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Simon Thum
1a71862d33 dix/xfree86: simplified velocity approximation algorithm
Replace multi-stage filtering with simple linear velocity,
tracked several instances backwards. A heuristic ensures
only approximately linear motion is considered, so velocity
remains valid in any case. Numerical stability is much
better, and nothing changes to people who didn't tune the
advanced features of the previous algorithm.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
e8094d8f3f dix: ProcSendEvent shouldn't use inputInfo.keyboard directly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
31301861c1 dix: remove wrong InputInfo.pointer usage - should be pDev instead. 2009-03-16 13:29:07 +10:00
Peter Hutterer
639658b2ea dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard. 2009-03-16 13:29:06 +10:00
Peter Hutterer
f01ee198ff dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab
I'm not sure if that's the right solution, but the other one is wronger.
2009-03-16 13:29:06 +10:00
Peter Hutterer
de415743f4 dix: fix XACE checks in ProcWarpPointer 2009-03-16 13:29:06 +10:00
Peter Hutterer
18430616cf dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard.
Affected calls:
 ProcChangeKeyboardControl
 ProcBell
 ProcUngrabKey
 ProcUngrabButton
2009-03-16 13:29:06 +10:00
Peter Hutterer
e31727158c dix: fix ProcChangePointerControl's wrong inputInfo.pointer usage.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-16 13:29:06 +10:00
Peter Hutterer
97cb3cc28e dix: Merge DevicePresence notify events generation into a single function.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-12 11:03:29 +10:00
Peter Hutterer
7f1ba804a1 dix: s/numEvents/num_events/ in GetKeyboardValuatorEvents
GPE and GProxE use the same.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-12 11:03:29 +10:00
Peter Hutterer
b368dd1720 dix: remove a few pointless (void) casts of return values.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-12 11:03:29 +10:00
Keith Packard
f8dd80d13b Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
2009-03-09 13:08:09 -07:00
Jason Vas Dias
e0ed9f16d0 Fix build with --enable-debug.
[amended by Peter Hutterer]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-03 16:53:06 +10:00
Peter Hutterer
6093d3eb1d dix: fix two compiler warnings (old-style function definition).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-03 07:07:30 +10:00
Peter Hutterer
59bc615ed2 dix: set the valuator mode in set_valuators
We only have per-device mode for now anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-25 14:50:55 +10:00
Peter Hutterer
cffa3c499a dix: remove unused variable 'tmp'
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-25 14:50:55 +10:00
Peter Hutterer
a180c23679 dix: remove ConvertBackToXI.
This was a temporary solution for the internal-events rework and is not needed
anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-25 14:40:08 +10:00
Peter Hutterer
26cf709e71 Doxygenify events.h and eventconvert.c
Should have done that before pushing, but oh well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-25 14:40:08 +10:00
Peter Hutterer
d3b355875a dix: fix wrong condition for setting valuators on the event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-24 11:20:23 +10:00
Peter Hutterer
a50c40be1f dix: don't apply button mappings to SDs, or the device's MD. (#20122)
Only ever change the button map on the device we actually care about, not the
attached SDs, not the current MD of the device.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-02-23 18:54:53 +10:00
Peter Hutterer
bdc262701a dix: remove un-used getValuatorEvents and countValuatorEvents from getevents.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
763848d3ab Input: change processing API to InternalEvents.
Don't pass xEvent* and count through to processing, pass a single
InternalEvent.

Custom handlers are disabled for the time being. And for extra fun,
XKB's pointer motion emulation is disabled. But stick an error in there so
that we get reminded should we forget about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
085d503608 dix: Fix PostSyntheticMotion to use a DeviceEvent for posting.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
155986a93d dix: CheckPassiveGrabsOnWindow moved to internal events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
1c38abd4b1 dix: switch DeliverGrabbedEvent to internal events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
fb858774b8 dix: switch DeliverDeviceEvents to internal events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
3aa9404fcd dix: switch DeliverFocusedEvent to internal events.
And because of xfree() macro hilarity, rename "pointer" to "ptr". Oh, how we
laughed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
8c873e7f51 dix: Switch DeliverGrabbedEvents to use internal events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
a371853698 dix: Deliver{Grabbed|Focused|Device}Events API changed to InternalEvents.
With the API change, we can now purge the XI conversion from POE.

Note: this commit breaks DGA even more.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
8f94ec6f78 dix: convert passive grabs to use internal events.
deviceGrab.sync.event is now an internal event, and CheckDeviceGrabs and
friends is changed over.

Note that this currently breaks some frozen grabs. See towards the end of
ComputeFreezes().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
daa3245c47 dix: fix EnqueueEvent to work with internal events.
Note that we're only partially switched to internal events. The event in the
devices' event queue (dev->deviceGrab.sync.event) is still an XI event. The
events in syncEvents are InternalEvents only now.
This also implies fixing CheckVirtualMotion to work with internal events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
75595ba4aa Xi: make ProcessOtherEvents more InternalEvent aware.
Get rid of the deviceValuator processing and a few other things, but still
drop back into XI before checking device grabs or doing anything else.

NoticeEventTime now needs to take InternalEvents, and while we're at it,
change NoticeTime from a macro to a function.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
3a02e538db dix: update CheckMotion to deal with DeviceEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
8829d966a6 Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEvent
Note that this breaks DGA. Life is tough.

EnqueueEvent is a somewhat half-baked solution, we immediately drop back into
XI and store them. But it should in theory work.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

Don't let the dcce be random data.
2009-02-23 17:52:39 +10:00
Peter Hutterer
007e93c869 xkb: Switch the xkb event processing path over to InternalEvents.
Before dropping down into the DIX, convert back into XI events. This is a
temporary solution only, until the DIX is capable of handling InternalEvents
anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
64ea607810 dix: change eventconvert to always return an array of xEvents
Just alloc the memory on demand rather than doing things with EventListPtrs
etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
4026c63e4e mi: switch the EQ to contain InternalEvents only.
This gets rid of the nevents parameter, InternalEvents are always a single
item per event. Also remove the special DeviceValuator handling in both
enqueueing and dequeueing.

Custom callback handlers are now broken until fixed.

For bisectability, we copy the InternalEvent back into the XI required during
POE and friends. Consider this a temporary solution.

Note: Because of misc linker bonghits, Xvfb won't link in this revision.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
5a827593f9 dix: switch event generation to InternalEvents.
GPE, GKVE, GProxE generate InternalEvents now.
DeviceClassesChangedEvents generates an InternalEvent now, but incomplete! We
need to tack on the information about the new SD in the ClassesChanged events.

Note: To make the progress bisectable, we drop back into XI events at the end of the
Get*Events functions. So the rest of the server still uses XI events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
00b03683d0 dix: Add temporary conversion function ConvertBackToXI.
Until the InternalEvents are used throughout the server, we can use this one
to drop us back into XI la-la land where every event is the wire format.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
269d4d9f2e dix: add GetCoreType and GetXIType.
Convert from an InternalEvent type to the matching core/XI type. Currently
only for a few events, those we actually need in the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:38 +10:00
Peter Hutterer
656491921e dix: add InternalEvent -> core/xi event conversion routines.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:38 +10:00
Peter Hutterer
64e595d12e dix: check if keybd->key is valid before getting the keyboard state.
For floating SDs, GetPairedDevice() returns the SD itself, hence keybd->key
may be NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-19 09:51:51 +10:00
Peter Ã…strand
ddb8d8945d xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:38 +10:00
Peter Hutterer
b735a4b495 dix: Remove lastEventMask variable, substitute with a #define.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:18 +10:00
Peter Hutterer
772e0f9159 dix: Don't set core events in SetMaskForEvent.
Rather, modify the two callers to call separately for the two different.
events. Unexport SetMaskForEvent too.
And while we're at it, get rid of the MotionFilter macro, because it's one
half confusing and one half pointless.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:17 +10:00
Benjamin Close
d62c085f36 dix: Remove includes which are not actually used directly
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-02-13 17:23:43 +10:30
Peter Hutterer
340f1576af dix: remove DefineInitialRootWindow()
Obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13 14:41:57 +10:00
Peter Hutterer
c178c3f814 dix: doxygen-ify enterleave.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13 14:41:57 +10:00
Peter Hutterer
cc696a2b79 Doxygen-ify bits of events.c 2009-02-13 14:41:57 +10:00
Peter Hutterer
8364bf7374 Document the event masks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13 14:41:57 +10:00
Simon Thum
ed9d58c3c2 dix: refactor pointer acceleration
The algorithm is split in a 2D-specific and a general part.
This potentially allows to accelerate more than just screen motion.
A state machine is intoduced to make code more explicit and readable.
It also improves handling of 'phase 1' mickeys when axial correction
kicks in (corner case).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13 14:41:57 +10:00
Shunichi Fuji
7bbf05d9aa dix: build fix if PANORAMIX is not defined.
Signed-off-by: Shunichi Fuji <palglowr@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 16:06:35 +10:00
Peter Hutterer
5b2bbffc12 dix: deduplicate SyntheticMotion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 14:26:59 +10:00
Peter Hutterer
34820f9c13 dix: remove XineramaChangeToCursor.
It's nearly identical to ChangeToCursor now anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 14:26:57 +10:00
Peter Hutterer
942eae6868 dix: Remove XineramaCheckPhysLimits.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 14:26:55 +10:00
Peter Hutterer
bf044f6d10 dix: reduce redunancy in XineramaConfineCursorToWindow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 14:26:53 +10:00
Peter Hutterer
cdce5699f0 dix: Get rid of XineramaCheckVirtualMotion.
Yes, this is an ugly piece mess of #ifdefs, but it beats having two nearly
identical functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-10 14:26:44 +10:00
Maarten Maathuis
1cb5afdf1e dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. 2009-02-08 18:59:17 +01:00
Tomas Carnecky
9a1d07ecb7 Fix "warning: cast from pointer to integer of different size"
Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-05 14:31:29 +10:00
Peter Hutterer
0e15697b53 dix: die if we can't activate or init the VCP/VCK.
If we have a busted xkb setup, the XKB initialization on the core devices
fails and leaves us with dev->key->xkbInfo == NULL. This in turn causes
segfaults lateron.

Return BadValue when the XKB configuration for a master device failed, and if
that happens for the VCP/VCK, die semi-gracefully.
The VCP init can only fail on OOM.

Reported by Aaron Plattner.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2009-02-05 14:31:29 +10:00
Tomas Carnecky
bc57efffe6 Fix "warning: unused variable XXX"
events.c:4614: warning: unused variable ‘kbd’
xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’
xf86Events.c:409: warning: unused variable ‘ke’
generic.c:131: warning: unused variable ‘cs’
generic.c:130: warning: unused variable ‘size’
xf86RandR12.c:591: warning: unused variable ‘crtc’

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:41:25 +10:00
Tomas Carnecky
111fdef74d ISO C90: Move declaration to the beginning of the function
devices.c: In function ‘DoChangeKeyboardControl’:
devices.c:1768: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:41:05 +10:00
Peter Hutterer
f80332a04d dix: for core events, pass the core filter into DeliverEventsToWindow
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:01:27 +10:00
Alan Coopersmith
5623c27700 Constify atom name strings
Changes MakeAtom to take a const char * and NameForAtom to return them,
since many callers pass pointers to constant strings stored in read-only
ELF sections.   Updates in-tree callers as necessary to clear const
mismatch warnings introduced by this change.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03 10:06:00 -08:00
Peter Hutterer
412e09e1e3 dix: Use GenericEvent instead of LASTEvent to check for core events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03 11:13:54 +10:00
Peter Hutterer
a7e6424d99 dix: remove obsolete comment. Event lists should not be allocated by the DDX 2009-01-27 09:29:03 +10:00
Adam Jackson
132b464d73 Remove a bunch of useless casts.
We've had void * for twenty years now people let's try to act like we
know how it works.
2009-01-22 02:11:16 -05:00
Daniel Stone
18e51911f5 Input: Add postdown to ButtonClassRec
This mirrors that in KeyClassRec: the state of the buttons as posted to
GetPointerEvents, rather than the state of the buttons as processed by
ProcessOtherEvent and friends.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:09:00 +11:00
Daniel Stone
7af53799cc Input: Remove unused CoreProcess{Keyboard,Pointer}Event
Everything goes through XKB's Process{Keyboard,Pointer}Event on its way
through to ProcessOtherEvent now, so get rid of the old, useless functions.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:59 +11:00
Daniel Stone
4fa3872dc2 Input: Remove core keysyms from KeyClassRec
Instead of always keeping two copies of the keymap, only generate the
core keymap from the XKB keymap when we really need to, and use the XKB
keymap as the canonical keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:59 +11:00
Daniel Stone
bc909f7136 Input: Centralise pointer map changing
Replace both core and Xi functions with one function that validates the
proposed map, and sends out both kinds of notification.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:58 +11:00
Daniel Stone
f06a9d2e05 Input: Clean up keymap change notifications
Keyboard map notifications are always generated from within XKB code,
which also takes care of copying the keysyms, etc.  If you need to
mangle the keymap yourself, generate a new core keymap/modmap, and pass
it to XkbApplyMappingChange.

SendMappingNotify is renamed to SendPointerMappingNotify (and ditto its
Device variants), which still only _sends_ the notifications, as opposed
to also doing the copying a la XkbApplyMappingChange.

Also have the modmap change code traverse the device hierachy, rather
than just going off the core keyboard.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-22 15:08:58 +11:00
Daniel Stone
32db27a7f8 Input: Remove modifierMap from core
We already have modmap (in the exact same format!) in XKB, so just use
that all the time, instead of duplicating the information.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
f062e90a95 Input: Remove modifierKeyMap
Since modifierKeyMap is generated from modifierMap, just remove it, and
only generate it when we need to send the modifier map to the client.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
cf6a2fc2bd Input: Ignore modifiers in core input processing
Modifiers get cleared by the XKB code when we drop down into core input
processing, so just delete the dead code path to simplify things a bit.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
6727ee9408 Input: Remove state from KeyClassRec
We already have state fully stored within XKB, so instead of duplicating it,
just generate the values to send to clients when required.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:55 +11:00
Daniel Stone
08363c5830 Input: Overhaul keyboard initialisation process
XkbInitKeyboardDeviceStruct is now the only valid keyboard
initialisation: all the details are hidden behind here.  This now makes
it impossible to supply a core keymap at startup.

If dev->key is valid, dev->key->xkbInfo->desc is also valid.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:08:51 +11:00
Daniel Stone
40877c6680 XKB: Make XKB mandatory
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:06:25 +11:00
Adam Jackson
20d2117eb8 Move CreateUnclippedWinSize to mbuf
It's the only user, so.
2009-01-20 00:18:02 -05:00
Daniel Stone
07c3bb922b XKB: Move XkbCopyKeymap definition to xkbsrv.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-20 15:32:18 +11:00
Jeremy Huddleston
ca46c01869 XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue
Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
(cherry picked from commit 94e417ac87)
2009-01-16 13:58:20 -08:00
Peter Hutterer
646add4eb4 dix: remove XineramaCheckMotion, merge into CheckMotion.
For 5 lines difference, we don't need to duplicate the whole function. really.
2009-01-16 16:11:16 +10:00
Peter Hutterer
e76f904abe dix: remove "notyet" conditional compilation.
If it's "notyet" for 3 years, then "yet" won't arive anytime soon.
2009-01-16 16:11:16 +10:00
Thomas Jaeger
717a961528 Don't release grabs unless all buttons are up
Previously, only buttons <= 5 would count here, but the core protocol
allows for 255 buttons.

http://lists.freedesktop.org/archives/xorg/2009-January/042092.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-16 11:46:26 +10:00
Peter Hutterer
1ae529bef5 dix: replace manual check for event types with IsPointerEvent() 2009-01-15 15:28:29 +10:00
Simon Thum
19275ea8e9 dix: add property support for pointer acceleration.
Note: properties don't need to be cleaned up, the DIX does it for us anyway.
Data that is stored in properties is cleaned up by the property system.
Handlers, etc. don't need to be unregistered while cleaning up, as they get
deleted when the device is removed anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Simon Thum <simon.thum@gmx.de>
2009-01-15 09:28:55 +10:00
Peter Hutterer
d36adf52a2 dix: fix WarpPointer calls for devices with custom valuator ranges (#19297)
If the MD's lastSlave was a devices with custom axes ranges, then a
WarpPointer would position the cursor at the wrong location. A WarpPointer
request provides screen coordinates and these coordinates were scaled to the
device range before warping.

This patch consists of two parts:
1) in the WarpPointer handling, get the lastSlave and post the event through
   this device.
2) assume that WarpPointer coordinates are always in screen coordinates and
   scale them to device coordinates in GPE before continuing. Note that this
   breaks device-coordinate based XWarpDevicePointer calls (for which the spec
   isn't nailed down yet anyway) until a better solution is found.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-13 09:22:56 +10:00
Peter Hutterer
488d452951 dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies
No MotionNotify events in the processing anymore, so let's have them treat DMN
instead.

Reported by Thomas Jaeger.
2009-01-13 09:22:56 +10:00
Peter Hutterer
56efbc0986 dix: drop x/y back into last.valuators before updating the history (#19285)
positionSprite needs to scale to screen coordinates and in the process of
doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after
finishing and before updating the motion history. This way, we don't push the
screen coordinates into the motion history.

X.Org Bug 19285 <http://bugs.freedesktop.org/show_bug.cgi?id=19285>
2009-01-12 11:44:10 +10:00
Julien Cristau
a2a760e33c dix: don't mix declarations and code 2009-01-11 08:54:10 +01:00
Julien Cristau
466dddbb83 dix: fix cast from pointer to integer 2009-01-11 08:54:10 +01:00
Julien Cristau
54332e4732 dix: ANSI cleanups 2009-01-11 08:54:10 +01:00
Peter Hutterer
a3f9e887d9 dix: don't accept Button 0 presses in GPE. 2009-01-09 16:08:37 +10:00
Peter Hutterer
eb2d7b3d70 dix: move focus handling into enterleave.c.
This commit moves the focus handling from events.c into enterleave.c and
implements a model similar to the core enter/leave model.
For a full description of the model, see:
http://lists.freedesktop.org/archives/xorg/2008-December/041740.html

This commit also gets rid of the focusinout array in the WindowRec, ditching
it in favour of a local array that keeps the current focus window for each
device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
673eb23aac dix: add a few auxiliary functions for the updated focus model.
SetFocusIn and SetFocusOut, including the static array to keep all focus
windows.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
38b28dcadd dix: reduce FirstPointerChild complexity
Instead of keeping a flag on each window for the devices that are in this
window, keep a local array that holds the current pointer window for each
device. Benefit: searching for the first descendant of a pointer is a simple
run through the array.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
72ad4a85cc dix: remove now unused "exclude" parameter from FirstPointerChild
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
0aa4460c3b dix: re-implement enter/leave model.
The old model was implemented based on a misunderstanding of NotifyVirtual and
NotifyNonlinearVirtual events. It became complicated and was broken in some
places [1]. This patch wipes this model completely.

A much simplified implementation is provided instead. Rather than a top-down
approach ("we have a tree of windows, which ones need to get which event")
this one uses a step-by-step approach. For each window W between A and B
determine the pointer window P as perceived by this window and determine the
event type based on this information. This is in-line with the model described
by Owen Taylor [2].

[1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html
[2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html
2009-01-08 11:45:22 +10:00
Thomas Jaeger
3d549438c2 Don't alter device button maps in DoSetPointerMapping
Currently, if a device map differs from the core pointer map, then the
request may return MappingBusy, even though all the affected core
buttons are in the up state.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
b72c6b083b dix: remove inputInfo.keyboard reference in QueryPointer handling.
PickKeyboard() is to be used instead.
2009-01-08 11:45:21 +10:00
Kim Woelders
30d2cfcd38 dix: Fix handling of do_not_propagate_mask window attribute.
This was broken in 32aa252e98.

Signed-off-by: Kim Woelders <kim@woelders.dk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:21 +10:00
Paulo Cesar Pereira de Andrade
49b93df8a3 Default to use standard bitmap fonts, with builtins as fallback
The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
  This should be a more reasonable solution, to "correct" the most
common Xorg FAQ (could not open default font 'fixed'), and also don't
break by default applications that use only the standard/historical
X Font rendering.
2009-01-07 19:37:03 -02:00
Peter Hutterer
27011254c4 xfree86: If an input device failed to activate, return immediately.
Devices are only activated once - right after they've been added to the
server. If a device failes activation, it's dead. There's no reason to
continue. Return the error code from ActivateDevice() without setting up
sprite information or even sending a event to the client.

Then - in the DDX - just remove the device again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-05 11:05:13 +10:00
Peter Hutterer
477c327087 dix: don't disable uninitialized devices.
If a device hasn't been initialized, it doesn't have a cursor yet. So don't
set the cursor to the NullCursor, and don't try to DisableDevice either.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-23 09:12:55 +10:00
Peter Hutterer
08a3d6928c dix: Allocate the space for the DCCE when the last SD is removed.
This still doesn't fix reset the MD's classes (a TODO that's been here for
ages), but at least we don't segfault anymore when detaching the last SD.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-18 09:58:42 +10:00
Peter Hutterer
689be0cb4b dix: set the correct length in CreateClassesChangedEvent.
Fallout from aeff14d5f2. Yes, we don't malloc
anymore because we are inside a SIGIO and the memory is already there anyway.
But we still need to set the event length correctly, otherwise
mieqEnqueue/mieqProcessInputEvent don't know how much memory to copy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-18 09:58:42 +10:00
Peter Hutterer
6383bc93b2 dix: Init DeviceEnterLeave event's type before FixUpEventFromWindow (#19064)
X.Org Bug 19064 <http://bugs.freedesktop.org/show_bug.cgi?id=19064>
2008-12-15 11:24:52 +10:00
Peter Hutterer
aeff14d5f2 dix: don't alloc in ChangeMasterDeviceClasses.
We mustn't realloc as we are inside a signal handler. With
SetMinimumEventSize, this code should never be hit anyway, as the event list
should have the required memory before this code is hit.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-12 11:43:32 +10:00
Peter Hutterer
d961abb59f dix: fix compiler warning (mixing declarations + statements)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-12 11:43:32 +10:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Simon Thum
fbb57a2c54 dix: ptraccel - Add GetAccelerationProfile()
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-12 11:43:31 +10:00
Peter Hutterer
0b4fef6337 dix: move MAX_VALUATOR_EVENTS into include/input.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10 12:42:45 +10:00
Peter Hutterer
b36c398b11 dix: purge dead device-based window access code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10 12:42:45 +10:00
Peter Hutterer
ee1a6c2841 dix: fix calculation of valuator events.
Follow-up to 4971315296. countValuatorEvents was copied from GKVE where it
was obviously broken but nobody noticed. GPE had the correct version, but that
one got lost during de-duplication. Restoring the correct calculation - if we
have 6 valuators, we want 1 valuator event, not 2.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-08 12:05:52 +10:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Peter Hutterer
9c5dd7337f Let the DDX decide on the XkbRulesDefaults.
Rather than assuming rules in the CoreKeyboardProc, init the default rules in
InitCoreDevices, then re-use them later.

In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether
we'll load kbd or evdev.

If we create a new MD, use pc105,us as default and re-use the rules file used
previously.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-03 16:10:40 +10:00
Peter Hutterer
e670fd8896 dix: fix GetMaximumEventsNum(), may return a DCCE event too.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-03 16:10:40 +10:00
Peter Hutterer
260e48c252 dix: remove confusing (and wrong) comment. VCP is not the only pointer.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-02 15:50:38 +10:00
Peter Hutterer
5d02e580d7 dix: use UpdateFromMaster in GetProximityEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-02 15:50:38 +10:00
Peter Hutterer
a85f0d6b98 Xi: fix use of button->down - bitflags instead of int arrays.
The device's button down state array was changed to use DOWN_LENGTH and thus
bitflags for each button in cfcb3da7.

Update the DBSN events to copy this bit-wise state.
Update xkb and Xi to check for the bit flag instead of the array value.

Reported by ajax.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-02 15:50:37 +10:00
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Paulo Cesar Pereira de Andrade
74e2669103 Export symbols also defined in libXfont.
libXfont has stubs for these symbols, so, when compiling with hidden
symbols by default, these symbols must be visible in the X Server, or
the stubs in libXfont will be used.
2008-11-27 04:33:44 -02:00
Peter Hutterer
ec1d08442f dix: Enable core devices in InitCoreDevices already.
Updated patch, see
http://lists.freedesktop.org/archives/xorg/2008-November/040540.html

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-11-26 10:53:23 +10:00
Peter Hutterer
2b45602e82 Revert "dix: Enable core devices in InitCoreDevices already."
I merged the wrong patch. See correct patch at:
http://lists.freedesktop.org/archives/xorg/2008-November/040540.html

Not activating the device before attempting to enable it would leave the
sprite unset, crashing the server when enabling the real devices.

This reverts commit e078901a4e.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-26 10:53:23 +10:00
Michael Vogt
c8472a7444 Do not send VisibilityNotify events when MapUnmapEvents are disabled
This prevents a protocol visible side-effect (XVisibilityEvent) on
XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow().

The problem shows up in gnome-screensaver with compiz and "unredirect
fullscreen windows" enable. A VisibilityNotify event is generated (first
with obscured and than with unobscured) when the window swithces from
redirected to unredirected.

https://bugs.freedesktop.org/show_bug.cgi?id=18133
http://launchpad.net/bugs/278112
2008-11-25 22:35:47 +02:00
Peter Hutterer
b292a7a2d7 dix: updated enter/leave core event model.
As proposed by Owen Taylor [1], the enter-leave event model needs to adjust
the events sent to each window depending on the presence of pointers in a
window, or in a subwindow.

The new model can be summarised as:
- if the pointer moves into or out of a window that has a pointer in a child
  window, the events are modified to appear as if the pointer was moved out of
  or into this child window.
- if the pointer moves into or out of a window that has a pointer in a parent
  window, the events are modified to appear as if the pointer was moved out of
  or into this parent window.

Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to
be split and treated separately.

[1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:46 +10:00
Peter Hutterer
724f83b87b dix: add FirstPointerChild, FirstPointerAncestor auxiliary functions.
FirstPointerChild: Return the first child that has a pointer within its
boundaries.

FirstPointerAncestor: return the first ancestor with a child within its
boundaries.

These are required for the updated enter/leave model.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:46 +10:00
Peter Hutterer
7d3e595f93 dix: Add EnterWindow, LeaveWindow, HasPointer auxiliary functions.
These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00
Peter Hutterer
6bdc963cda dix: split enter/leave event handling into core and device handling.
Device events always need to be delivered, core events only in some cases.
Let's keep them completely separate so we can adjust core event delivery.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00
Peter Hutterer
5e48f5e2dd dix: remove unused EnterLeaveSemaphoresIsset.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00
Peter Hutterer
868fd503b7 dix: move Enter-Leave related functions into new enterleave.c
Preparation for the new core enter/leave model.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-25 09:21:45 +10:00
Peter Hutterer
e078901a4e dix: Enable core devices in InitCoreDevices already.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-11-24 10:17:40 +10:00
Peter Hutterer
d939f2482e dix: fix false comment.
VCP and VCK are always present, this comment is a leftover from earlier MPX
days.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-24 10:07:22 +10:00
Peter Hutterer
f4e725f248 dix: memset DeviceVelocityPtr to zero.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-11-21 09:04:51 +10:00
Simon Thum
7f818776b7 dix: fix typos in comments, one formatting fix.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-21 09:04:17 +10:00
Fernando Carrijo
17bccff4ce [dix] Remove a duplicate statement.
Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-11-14 12:36:20 -05:00
Peter Hutterer
f5841e9648 dix: don't store enter/leave and focus semaphores in a devPrivate.
We need them for each window, every time a window is allocated. Storing them
in a devPrivate is the wrong thing to do.

This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-11-13 17:06:32 +10:00
Peter Hutterer
26f701704b dix: remove duplicate line in EnterLeaveEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-13 15:06:46 +10:00
Peter Hutterer
d91243beb6 dix: formatting fix. 2008-11-11 14:57:26 +10:00
Peter Hutterer
dde09076c5 dix: remove superfluous variable devgrab
grab == devgrab anyway, this is a leftover from the time when we had two
different grabs per device (core and XI grab).

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-11 14:52:54 +10:00
Fernando Carrijo
31005efb1b input: Remove useless conditional. 2008-11-10 13:23:45 -05:00
James Cloos
b3c7e62664 Remove some null statements.
Remove several doubled statement-terminal semicolons.

Reported by Fernando Carrijo.
2008-11-08 12:21:20 -05:00
Peter Hutterer
d972399566 Purge device-based WindowAccess code.
Really, this was a bad idea. It's not security, the UI features that would
have been cool (e.g. clicking through windows) aren't implemented anyway, and
there's nothing you can't achieve just by using plain XI anyway.

Requires inputproto 1.9.99.6.
2008-11-04 16:04:15 +10:30
Peter Hutterer
4971315296 dix: clean up GetPointerEvents and GetKeyboardValuatorEvents.
Split into several functions, remove some stale comments.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:02:25 +10:30
Daniel Stone
d9ff20e323 DIX: Remove unnecessary prototype
We don't call XkbCopyKeymap from getevents.c anymore, so axe it.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:01:42 +10:30
Daniel Stone
f4036f6ace Remove XEvIE
It's unmaintained and has been broken for quite a while; MPX finally
smashed it completely.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:01:07 +10:30
Peter Hutterer
971aef6441 dix: FreeDeviceClass() and friends can be static. 2008-10-31 18:26:18 +10:30
Peter Hutterer
7c5dec9f71 dix: remove unused GuessFreePointerDevice().
Not used since the MD/SD hierarchy was introduced many moons ago.
2008-10-31 18:26:18 +10:30
Peter Hutterer
12599af285 dix: NextFreePointerDevice() can be static. 2008-10-31 18:26:18 +10:30
Peter Hutterer
5d0a945a03 dix: SwitchCorePointer is long gone, bury it. 2008-10-31 17:09:13 +10:30
Peter Hutterer
eb014021c2 dix: PairDevices() can be static, remove from input.
PairDevices() is only ever called in EnableDevice().
2008-10-31 17:09:13 +10:30
Peter Hutterer
b6b26560d6 Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h. 2008-10-31 17:09:13 +10:30
Peter Hutterer
f781a752e6 Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency. 2008-10-31 17:09:13 +10:30
Eamon Walsh
2809a56b4b xace: Fix an incorrect call to the RECEIVE_ACCESS hook. 2008-10-30 18:29:51 -04:00
Julien Cristau
e85d5d707d Ansify declaration of FontToXError() 2008-10-26 11:55:50 +01:00
Julien Cristau
add946daed Nuke unused variables 2008-10-26 11:44:10 +01:00
Peter Hutterer
4c926dbac6 dix: fix two more endian issues, correct initial "enabled" value. #18111
EnableDevice and DisableDevice both change the property too.

And enabled must be set to FALSE in AddInputDevice, the device is not enabled
yet.

X.Org Bug 18111 <https://bugs.freedesktop.org/show_bug.cgi?id=18111>
2008-10-23 14:17:04 +02:00
Peter Hutterer
ff60e592f0 dix: don't allow VCP/VCK be disabled through properties. 2008-10-23 17:42:47 +10:30
Peter Hutterer
98f01c2abe dix: fix endianess issue in AddInputDevice. #18111
dev->enabled is a Bool. Bool is two bytes.
BOOL on the other hand is a protocol type and always 1 byte. So copy the value
into the one-byte type before passing it into XIChangeDeviceProperty.

Found by Michel Dänzer.

X.Org Bug 18111 <http://bugs.freedesktop.org/show_bug.cgi?id=18111>
2008-10-23 17:39:07 +10:30
Peter Hutterer
f6cbe0326c dix: init remaining three xkb fields to zero in a new client. 2008-10-22 18:16:12 +10:30
Peter Hutterer
f3f6ea89aa Xi: check all handlers before applying property changes.
The current code exposes to inconsistent updates, i.e. if handler N succeeds
but handler N+1 fails in setting the property, an error is returned to the
client although parts of the server now behave as if the property change
succeeded.

This patch adds a "checkonly" parameter to the SetProperty handler. The
handlers are then called twice, once with checkonly set to TRUE.
On the checkonly run, handlers _MUST_ return error codes if the property
cannot be applied. Handlers are not permitted to actually apply the changes.
On the second run, handlers are permitted to apply property changes.
Errors codes returned on the second run are ignored.
2008-10-13 13:50:40 +10:30
Peter Hutterer
ad67e3f063 dix: remove duplicate code in ReleaseActiveGrabs
Spotted by Colin Harrison.
2008-10-13 13:50:40 +10:30
Peter Hutterer
decec14219 dix: silence "unused variable" compiler warning. 2008-10-10 16:57:32 +10:30
Tiago Vignatti
d1bb5e3b47 mi: functions here are carrying 'time' without need. 2008-10-08 03:41:17 -03:00
Adam Jackson
30193fbff9 Reinstate cursorScreenDevPriv 2008-10-07 10:36:12 -04:00
Adam Jackson
c6d6d3e87a Loader: Unexport a handful of consumerless symbols from dixsym. 2008-10-06 16:18:21 -04:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson
0b7b89fbac xalloc+bzero -> xcalloc 2008-10-06 14:19:30 -04:00
Adam Jackson
94825ad3c7 Remove unused wrapping for visual initialization. 2008-10-03 17:51:21 -04:00
Adam Jackson
0ce61e21d6 Remove the Must_have_memory hack.
Also remove an astonishing amount of misunderstanding of how casts work.
2008-10-03 17:51:19 -04:00
Adam Jackson
e6b1c1fada const cleanup 2008-10-03 17:51:19 -04:00
Adam Jackson
1c1a6e965d Remove an utterly, utterly ancient changelog.
Wow.
2008-10-03 11:58:20 -04:00
Peter Hutterer
9c8a2be2c7 dix: fix axis scaling.
For two axes [a, b] and [x, y] (inclusive), the formula to scale point P(ab)
to (x,y) is:
    (P - a)/(b - a) * (y - x) + x

And the whole end result rounded of course to get the integer we need.
2008-10-03 15:27:07 +09:30
Peter Hutterer
93ef72fa26 dix: don't lose subpixel precision when scaling.
Only scale x/y back from screen range if we have crossed screen, otherwise
leave it as it is.
2008-10-03 15:27:07 +09:30
Simon Thum
5ef5e89f0e dix: fix non-initialization of pointer accel in master devices.
Init MDs always with PtrAccelNoOp.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-10-03 15:27:07 +09:30