summaryrefslogtreecommitdiff
path: root/hw/xwin/winmouse.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-23hw/xwin: Handle WM_MOUSEHWHEELJon TURNEY1-15/+11
Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll wheel messages, to generate X button 6 and 7 presses and releases. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9Jon TURNEY1-7/+17
Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X buttons 6 and 7 for tilt wheel. Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a dynamic allocation to a fixed one of the required size for all the labels we use. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-03-21Introduce a consistent coding styleKeith Packard1-243/+215
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-01-27hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()Colin Harrison1-3/+0
Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce changed miPointerSetPosition() to take co-ordinates as doubles, not ints, so this code as it stands is now wrong (if it ever was correct in the first place :-)) It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition() which potentially constrains the cursor, and then convert back to ints. Fortunately, this whole dance seems to be unnecessary, and we can simply remove the call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other input driver. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-26hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reportedJon TURNEY1-1/+1
Try to be more intelligent with default options, turn on -emulate3buttons by default if less than 3 mouse buttons are reported by Windows Also, add -noemulate3buttons option so this default setting can be reversed if desired Also, correctly report the number of mouse buttons windows is reporting, rather than always at least 3 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2011-05-24Fix XWin compilation after updates for input API changesColin Harrison1-2/+2
Fix XWin compilation after updates for input API changes in commits e7150db5 8670c46b and 20fb07f4 Also remove a no longer needed InternalEvent* variable Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-11input: remove DDX event list handlingPeter Hutterer1-6/+2
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-11input: replace EventListPtr with InternalEvent arrayPeter Hutterer1-2/+2
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-11input: Provide Queue{Button|Keyboard|Proximity}Event helpersPeter Hutterer1-11/+4
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-03-25Fix XWin compilation after commit 769531b9Jon TURNEY1-1/+1
commit 769531b9 "Add mode field to pointer movement hooks" changes the function signature of miPointerSetPosition() to include the movement mode which resulted in the pointer position Update use of miPointerSetPosition() in winEnqueueMotion() appropriately (See http://tinderbox.freedesktop.org/builds/2011-03-16-0008/logs/xserver/#build) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15Fix compilation after input API changeJon TURNEY1-0/+1
Fix compilation after commit 675f4a8525d29ebad783351e17be785b2f32b2e8 converts winmouse.c to the new ValuatorMask input API, but doesn't include the required header inpututil.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Peter Hutterer1-10/+3
input-api Conflicts: dix/getevents.c hw/xfree86/common/xf86Xinput.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-22Abstract valuator masks through a set of APIs.Peter Hutterer1-2/+6
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-19Xming: Casts to remove warnings on event pointersColin Harrison1-2/+2
winkeybd.c: In function ‘winSendKeyEvent’: winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type winmouse.c: In function ‘winMouseButtonsSendEvent’: winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type winmouse.c: In function ‘winEnqueueMotion’: winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19Cygwin/X: unifdef XFree86ServerJon TURNEY1-8/+1
Remove XFree86Server define, which was always on anyhow, and the code which was guarded by !XFree86Server This completes the process of removal started in 2006 :-) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion()Colin Harrison1-1/+1
Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as they are in screen coordindates and may need to be scaled to the axis range appropriately Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-10-14Xming: Fix various 'ISO C90 forbids mixed declarations and code' warningsColin Harrison1-4/+3
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-17Cygwin/X: Fix permuted args to InitPointerDeviceStruct()Jon TURNEY1-1/+1
Fix a minor error in commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e, new btn_labels argument to InitPointerDeviceStruct() wasn't added in the right place
2009-06-18input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7Peter Hutterer1-1/+19
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-27Cygwin/X: Remove unused TimeSinceLastInputEvent()Jon TURNEY1-1/+0
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17Cygwin/X: enqueue a pointer motion event on mouse movementJon TURNEY1-0/+26
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17Cygwin/X: update for changes in mieq APIJon TURNEY1-10/+15
Bring Cygwin/X up to date with mieq event API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-04-25Remove all traces of #ifdef XINPUT and the matching bits from the configure.acPeter Hutterer1-4/+4
2007-05-09Migrate some code to the new mi apisColin Harrison1-2/+3
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-1/+0
2005-07-04Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includesAlexander Gottwald1-0/+3
handling Warning fixes
2004-10-28Import recent changes from CYGWIN branchAlexander Gottwald1-5/+23
2004-09-15add support for mice with more than 3 buttons and one scroll wheel (ChrisAlexander Gottwald1-7/+10
B)
2004-06-21Bug 777: Merge from CYGWIN branchAlexander Gottwald1-12/+34
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-14Initial revisionKaleb Keithley1-0/+295