Commit Graph

5626 Commits

Author SHA1 Message Date
Peter Hutterer
937e5aae33 dix: don't undisplay cursor if we don't own a sprite.
Sometimes we didn't have a cursor when coming back from suspend. Reason was
that the suspend caused the server to lose the device that was attached to the
VCP, and a RemoveDevice() would then set the cursor to NULL.
Solution: only set the cursor to NULL if we actually own the sprite.
2008-05-14 22:30:15 +09:30
Peter Hutterer
68b4f250ee dmx: fix build.
Just because it builds, doesn't mean it works.
2008-05-14 16:18:48 +09:30
Peter Hutterer
00db0f35ac dix: InitAndStartDevices doesn't need a window parameter.
Leftover from the old pointer-keyboard pairing code, obsolete and gone now.
2008-05-14 15:29:28 +09:30
Peter Hutterer
da728f2127 dix: don't use serverClient in AddInputDevice, use the one supplied instead.
We pass in the client that wants to create the device anyway, lets use the
parameter instead of hardcoding the serverClient.

Wow. I hope this is merge detritus, otherwise it'd be a sign that I didn't
have enough coffee that day.
2008-05-14 15:17:05 +09:30
Peter Hutterer
a6659291c7 mi: protect against NULL-pointer dereference.
Required by the recent patch to use a NullCursor instead of UndisplayCursor().
2008-05-14 09:42:50 +09:30
Peter Hutterer
dc3aba8a55 Xext: emulate XI events from core events when faking input.
We need XI events for event processing, so lets get rid of the pure core
events ASAP.
2008-05-13 20:00:08 +09:30
Peter Hutterer
8b3802d320 Xext: core button events have rootX/Y unset too. 2008-05-13 13:47:52 +09:30
Peter Hutterer
8234af6c6a xfree86: remove Ubuntu-ism.
Additional #include was required due to broken libc headers or something like
that. Remove it, there's more to the world than ubuntu alone.
2008-05-13 11:17:39 +09:30
Peter Hutterer
59b8d29b3a Xi: Fix up ProcIVector, got out of sync with the protocol.
When the opcode squash happened in the protocol, the processing vector got out
of sync for a few requests. As a result, client and server would interpret
requests differently, leading to a couple of BadLength problems.
2008-05-13 11:17:02 +09:30
Peter Hutterer
1fc1a2897e Remove UndisplayCursor API.
We can achieve the same thing by simply displaying a NullCursor, there's no
need for a separate API.
2008-05-13 11:17:02 +09:30
Peter Hutterer
913989d643 mi: don't try to display a cursor for devices w/o cursors. 2008-05-13 11:17:02 +09:30
Peter Hutterer
248a1df634 render: don't dereference cursor if cursor is NULL. 2008-05-13 11:17:02 +09:30
Peter Hutterer
fc35d1e3be config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set.
The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user
specifies a X-specific {rmlv}, then this is overridden through the use of
input.x11_options.Xkb{RMLV}.
However, the way how the server parses options--by ignoring capitalisation,
underscores and spaces--the HAL and the x11_options would override each other.

So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and
only actually add them to the device after parsing _all_ options.

* rmlv ... rules, model, layout, variant

See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037>
2008-05-08 16:58:31 +09:30
Peter Hutterer
1f54c05cf8 config: remove trailing whitespaces.
It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc.
2008-05-08 14:05:56 +09:30
Peter Hutterer
1a314a1ef0 Revert "config: deprecate (and ignore) the use of input.xkb.whatever options."
daniels:
"Hrm, I'd prefer to have input.xkb.{m,l,v,o} be the primary keys, and
have input.x11_options be a backup for that, rather than the former
being deprecated, for the reasons I listed earlier ..."

see http://bugs.freedesktop.org/show_bug.cgi?id=13037#c51

This reverts commit 26188875de.
2008-05-08 13:16:48 +09:30
Peter Hutterer
26188875de config: deprecate (and ignore) the use of input.xkb.whatever options.
These options are still sent by some HAL implementations (e.g. HAL on FC8),
and may overwrite the options set in the x11-input.fdi file.
For a more detailed description of why see Bug #13037, comment 42.

X.Org Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037#c42>
2008-05-07 13:58:47 +09:30
Peter Hutterer
9e0d73fd8a xfree86: call SetCursor for the VCP when switching between SW/HW rendering.
We need a manual call to SetCursor when we switch from SW to HW rendering and
the other way round. This way we display the new cursor after removing the old
one.
In addition, we only update the internal state for the VCP's sprite. This way,
when we switch back to HW rendering the state is up-to-date and wasn't
overwritten with the other sprite's state.

The second part is a hack. It would be better to keep a state for each sprite,
but then again we don't have hardware that can render multiple cursors so we
might as well do with the hack.
2008-05-06 17:52:15 +09:30
Peter Hutterer
b9c1a57e7a xfree86: switch between to SW cursors if more than 1 sprite is available.
Switches back to HW cursors when sprites other than the VCP are removed.
The current state requires the cursor to change shape once before it updates
to SW / HW rendering (whatever is appropriate), e.g. by moving into a
different window. Until this is done, the cursor is invisible.
2008-05-06 14:51:23 +09:30
Peter Hutterer
3df88c17e3 xfree86: re-enable hardware cursor (for a single cursor)
This commit enables HW rendering for cursors again, but only for a single
cursor. Other cursors can be created, however they will not be visible.
2008-05-06 11:50:20 +09:30
Peter Hutterer
6f63724b28 xfree86: don't try to repaint the cursor before cursors exist. 2008-05-02 14:56:58 +09:30
Peter Hutterer
3344569529 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
2008-05-02 11:00:14 +09:30
Peter Hutterer
8e56fd9728 dix: continue to check for invalid valuator ranges.
In an ideal world, the drivers would init all axes with NO_AXIS_LIMIT. In the
real world, this is an ABI break, so let's just leave the old check in.
2008-05-02 10:22:06 +09:30
Michel Dänzer
3b8d53452c EXA: Fall back in CompositeRects if the driver can't accelerate Composite.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15780 .
2008-05-01 15:10:52 +02:00
Paulo Cesar Pereira de Andrade
01c61f3d97 xorgcfg: Fix a crash if xorg.conf doesn't have a Files section.
This patch only creates a Files section if required, so if no entries are
added, an empty Files section will not be created.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-01 15:55:15 +09:30
Paulo Cesar Pereira de Andrade
6899ff81e8 Fix an off by one read error in drmSIGIOHandler().
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-01 10:14:30 +09:30
Jeremy Huddleston
ec0419b505 XQuartz: Moved some relevant stuff from darwin.h to darwinEvents.h
(cherry picked from commit 1fcf74a436)
2008-04-30 17:33:11 -07:00
Jeremy Huddleston
28d1e21f15 Dix: Cleaned up sanity checking in Get{Pointer,Keyboard}Events
XQuartz was crashing because the Appkit thread was trying to GetXXXEvents while the Xserver thread was exiting.
This adds some more sanity checks and avoids that crash
(cherry picked from commit 34ec4bd6ac)
2008-04-30 17:33:07 -07:00
Kazuhiro Inaoka
ce36ae526d Add M32R architecture support (bug #10020)
Still needs autotools support, so this won't actually _build_: it's just
a starting point.
2008-04-30 11:58:32 +03:00
Peter Hutterer
a0e6a7d4f5 dix: resize EQ to minimum size to avoid reallocs during SIGIO.
When a new device is added, calculate the event size needed if a DCCE event is
sent and set the EQ's event size to this minimum. This avoids reallocs when a
event is sent (which may happen during a SIGIO).
2008-04-30 17:57:48 +09:30
Ben Byer
b71b51c982 xquartz: created darwinTablet, to represent tablet events
(cherry picked from commit 50641bce73)
2008-04-29 23:59:34 -07:00
Ben Byer
519581b0ba xquartz: remove unused params from DarwinEQInit
(cherry picked from commit 299a056737)
2008-04-29 23:59:31 -07:00
Jeremy Huddleston
d70487a4c0 XQuartz: Fix to tablet-event handling code; we now scale
more conservatively (to match Linux's Wacom driver) and
we now receive all tablet-related events.
(cherry picked from commit 588683cecc)
2008-04-29 23:59:26 -07:00
Peter Hutterer
fea39c94bc dix: fix typo from last commit. 2008-04-30 13:17:14 +09:30
Peter Hutterer
ffaccc2dc9 input: replace -1 as default axis limit with NO_AXIS_LIMIT define.
This allows easier refacturing of the coordinate limit handling. Grepping for
-1 is boring.
2008-04-30 11:49:11 +09:30
Peter Hutterer
00acb40f2b dix: fix typo in clipAxis.
Check needs to be (min_axis < max_axis), not (min_axis < min_axis)
2008-04-30 11:29:03 +09:30
Hong Liu
f65a1a62f9 Keep rotation wrappers in place while transforms are in use
LeaveVT/EnterVT cycles will free/realloc shadow frame buffers. Because of
this, the presense/absence of that data is insufficient to know whether
the screen function wrappers are necessary. Instead, the 'transform_in_use'
flag should be used.

This patch also adds 'xf86RotateFreeShadow' for drivers to use at LeaveVT
time to free the rotation data; it will be reallocated on EnterVT.
2008-04-29 09:00:11 -07:00
Peter Hutterer
18b33dd4ff Xi: stop excessive use of _X_EXPORT. 2008-04-29 15:24:55 +09:30
Peter Hutterer
2b179c32ac include: add declaration for CopyGetMasterEvent to shut up compiler warning. 2008-04-29 15:15:16 +09:30
Peter Hutterer
ff36753755 mi: call the custom event handlers for both MD and SD. 2008-04-29 14:53:41 +09:30
Peter Hutterer
ec2fca7e6f xfree86: DGA needs to call into Xi.
Two steps: first use UpdateDeviceState() instead of replicating the device
changing code. And emulate XI events instead of core events.
2008-04-29 14:53:20 +09:30
Peter Hutterer
8208b842b7 Xi: add IEventBase global variable. Stores event base for X Input events. 2008-04-29 14:19:42 +09:30
Peter Hutterer
46340b7406 Xi: change UpdateDeviceState to be _X_EXPORT. 2008-04-29 14:17:48 +09:30
Peter Hutterer
3a922c5d07 Xi: apply ValuatorEvent data to the device's valuators.
After UpdateDeviceState, the device has the current position in absolute
coordinates, the event has the correct valuator data to be delivered to the
client.
2008-04-29 11:18:35 +09:30
Peter Hutterer
f2a20294fe dix: store all valuators as they come from the device in the valuator events.
The event's sequenceNumber is mis-used to determine whether the values are
relative or absolute.
2008-04-29 11:18:35 +09:30
Jeremy Huddleston
d5ab89f4f1 XQuartz: Unset CFProcessPath... blech
(cherry picked from commit ce4fbfbc75)
2008-04-28 15:55:01 -07:00
Jeremy Huddleston
0c2312b21b XQuartz: xprIsX11Window can be called from the Appkit thread (see X11Application.m)
(cherry picked from commit 22cf724376)
2008-04-28 15:42:12 -07:00
Jeremy Huddleston
c3dc4bdbb0 XQuartz: Disabled DPMS extension
(cherry picked from commit 1448fed9b6)
2008-04-28 15:42:02 -07:00
Jeremy Huddleston
07382a70c7 XQuartz: Added thread debugging to xprFrame.c
(cherry picked from commit 41542502b3)
2008-04-28 15:40:22 -07:00
Michel Dänzer
8349732a67 EXA: Try to accelerate non-antialiased text via the glyph cache as well.
Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to
accelerate them otherwise.
2008-04-28 21:09:35 +02:00
Michel Dänzer
a65d530040 EXA: Accumulate glyphs whenever possible, for full benefits of the glyph cache. 2008-04-28 21:03:12 +02:00