Commit Graph

46 Commits

Author SHA1 Message Date
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Adam Jackson 5bcdd1cc75 dix: Update some comments to reflect the new non-SIGIO input model
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2016-06-08 11:36:32 -04:00
Adam Jackson 95ce2bccdc dmx: Remove SIGIO input support here too
This code was broken anyway. Note that DEVICE_OFF would make dmx think
_no_ devices were using SIGIO anymore, which means 'xinput disable' on
your mouse would probably do weird things to your keyboard too. Rather
than try to repair that and keep SIGIO working on this one niche DDX,
just rip it out and use the thread model like everyone else.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2016-06-08 11:36:31 -04:00
Keith Packard 6a5a4e6037 Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input
throughout the X server, preparing the way for using threads for input
handling instead.

Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
to stub functions input_lock/input_unlock so that we don't lose this
information.

xfree86 SIGIO support is reworked to use internal versions of
OsBlockSIGIO and OsReleaseSIGIO.

v2: Don't change locking order (Peter Hutterer)
v3: Comment weird && FALSE in xf86Helper.c
    Leave errno save/restore in xf86ReadInput
    Squash with stub adding patch (Peter Hutterer)
v4: Leave UseSIGIO config parameter so that
    existing config files don't break (Peter Hutterer)
v5: Split a couple of independent patch bits out
    of kinput.c (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Peter Hutterer f485a1af64 Drop valuator mask argument from GetKeyboardEvents
Nothing was using it and if anyone had they would've gotten a warning and
noticed that it doesn't actually work. Drop this, it has been unused for years.

Input ABI 22

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2015-03-13 12:31:21 +10:00
Keith Packard c85e26d599 Bunch of DMX warning fixes
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Peter Hutterer e16dea72d6 dmx: queue button events with a flags of 0
Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set
the flags to 0 so we don't generate any motion on a button event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-30 07:41:20 +10:00
Peter Hutterer d04dfe3f75 Drop custom sigio block/unblock functions from kdrive, ephyr and dmx
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-03 15:56:35 +10: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
Peter Hutterer 20fb07f436 input: remove DDX event list handling
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.

Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer 8670c46bdf input: replace EventListPtr with InternalEvent array
EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer e7150db535 input: Provide Queue{Button|Keyboard|Proximity}Event helpers
Don't require every caller to use GPE + mieqEnqueue, provide matching
Queue...Event functions instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:33 +10:00
Peter Hutterer 071a6ac4d0 input: remove GetKeyboardValuatorEvents, this is now unnecessary.
GetKeyboardValuatorEvents handles NULL valuator masks already, so the
GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-18 13:05:46 +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
Peter Hutterer e909af88bf dmx: clarify a valuator mode condition.
Relative is defined as 0, so change the condition to be more obvious.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 16:18:59 +10:00
Peter Hutterer 675f4a8525 Abstract valuator masks through a set of APIs.
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.

The new calls for drivers are:
    valuator_mask_new()     /* to allocate a valuator mask */
    valuator_mask_zero()    /* to reset a mask to zero */
    valuator_mask_set()     /* to set a valuator value */

The new interface to the server is
    xf86PostMotionEventM()
    xf86PostButtonEventM()
    xf86PostKeyboardEventM()
    xf86PostProximityEventM()

all taking a mask instead of the valuator array.

The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.

For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.

This patch was initially written by Chase Douglas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:48 +10:00
Peter Hutterer 010d5e2865 dmx: remove doxygen-generated files.
These can be recreated by simply running 'doxygen doxygen.conf' in
hw/dmx/doc. Some of the files do not exist anymore, these have been removed.
Some other files have a different naming scheme.
Doxygen warnings about missing links fixed, two warnings remain:

/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:142: Warning: explicit link
request to 'dmxConfigureRootWindow' could not be resolved
/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:119: Warning: explicit link
request to 'dmxConfigureScreenWindow()' could not be resolved

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-20 13:32:16 +10:00
Peter Hutterer e7c2598f56 dmx: core events are always in screen coordinates when passed to GPE.
This fixes input in dmx, the pointer appears at the right positions to the
clients now.

Also mark the spot where we pass in the button state as valuator to GPE
with a FIXME. (??)

Tested-by: Kevin Martin
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26 12:25:19 +10:00
Peter Hutterer 72607960c1 dmx: Remove some dead code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:17 +10:00
Peter Hutterer 88187ad889 dmx: purge DMX EQ leftovers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:17 +10:00
Peter Hutterer 2d46678762 dmx: remove dmx-internal event queue.
The EQ is in the DIX now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:16 +10:00
Peter Hutterer 7d703af74c dmx: get the state from XKB for dmxCheckSpecialKeys
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:16 +10:00
Peter Hutterer 6e52f92331 dmx: fix dmxKeySymToKeyCode to work with mandatory XKB.
Approach taken is inefficient, it converts the xkb symbol table to a core
symbol table first and then extracts the keycode from there.
Consider this a todo for a rainy afternoon when the beer fridge demands
emptying.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:16 +10:00
Peter Hutterer 61ae0a5ca5 dmx: fix up dmxKeyCodeToKeySym for XKB-only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:15 +10:00
Peter Hutterer 6a500fdd4d dmx: include exglobals.h for DeviceKeyPress and friends.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05 08:02:17 +10:00
Peter Hutterer 591c2f8758 dmx: typecast to InternalEvent* before mieqEnqueue.
Silences a few compiler warnings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05 08:01:55 +10:00
Peter Hutterer 15b425b5a6 dmx: move 'state' around to silence compiler warning.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05 08:01:45 +10:00
Peter Hutterer 8a23707b86 dmx: change remainder of manual EQ allocation to GetEventList(). 2008-10-17 10:19:10 +10:30
Peter Hutterer 52752911ea dmx: don't free event list after use. 2008-06-05 16:14:23 +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 e251c9e75a Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac 2008-04-25 16:49:35 +09:30
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Brian e1dea151db Implement a minor hack in dmxCheckFunctionKeys() to detect special keys.
Keep track of status of (left) alt/ctrl keys so that ctrl-alt-q to exit
can be detected.  Not ideal, but works for now.
2007-04-03 11:21:50 -06:00
Brian e44f106ffc clean-up, debug code 2007-04-02 16:26:15 -06:00
Brian 3e482de7b1 checkpoint: more clean-up 2007-04-02 15:38:15 -06:00
Brian 76a7a5ca1f formatting fixes 2007-04-02 15:24:05 -06:00
Brian 69baad321d clean-up dmxCoreMotion() dmxCoreMotion2() 2007-04-02 15:21:22 -06:00
Brian 44eb15adee checkpoint clean-up 2007-04-02 15:12:04 -06:00
Brian 08a88d1803 Pass num_valuators=0 for ButtonPress/Release. This seems to fix the button coordinate problem 2007-04-02 12:29:37 -06:00
Brian ebdc8ce5c1 Checkpoint DMX updates: things are working much better now, but still not 100% right.
Use new dmxCoreMotion2() function which enqueues motion events with
GetPointerEvents()/mieqEnqueue().
The clipAxis() code in GetPointerEvents() is causing some grief.  The
limits seem to have always been (0,0) according to the original calls
to InitValuatorAxisStruct() in dmxinputinit.c.
Terrible hack for now: Call InitValuatorAxisStruct() with hard-coded max
values of 1280 (my screen width).
2007-03-30 16:05:46 -06:00
Brian 3c7413e0c2 Tweak some parameters, etc. Things seem a little better now, but still a ways to go. 2007-03-30 14:07:04 -06:00
Brian 7989dacdcb num_valuators=1 for GetPointerEvents(), hack ButtonPress/Release position 2007-03-30 13:44:24 -06:00
Brian 1ea842960f more debug 2007-03-30 13:43:15 -06:00
Brian 92e8cdbd32 Checkpoint fixes to DMX for X input changes.
Xdmx builds and runs now.
Keyboard seems OK, and mouse pointer moves, but everything else is flakey.
Something is still seriously wrong.
2007-03-30 13:19:33 -06:00
Kevin E Martin e348ac4b4d Prepare Xdmx and Xvfb for modularization by adding appropriate #include
<{dix,dmx}-config.h> to the source files.
2005-07-12 00:52:48 +00:00
Kevin E Martin 7976ee51af Add Distributed Multihead X (DMX) support 2004-06-30 20:06:56 +00:00