Commit Graph

51 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
Keith Packard 3f9015b6dc xwayland: Move sprite invalidation logic into mipointer
This creates a function that invalidates the current sprite and forces
a sprite image reload the next time the sprite is checked, moving that
logic out of the xwayland sources and allowing the miPointerRec
structure to be removed from the server API.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-25 11:00:56 -04:00
Adam Jackson e4b15125bb mipointer: Remove deprecated miPointerCurrentScreen
The only remaining use was in some debugging code in DMX.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:29:21 -04:00
Adam Jackson 4dca026880 mipointer: Remove EnqueueEvent from miPointerScreenFuncRec
No DDX overrode this, and we never actually called through that slot
anyway.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Adam Jackson ad076dc6e8 mipointer: Flatten calls to mieqSwitchScreen
No DDX was overriding this.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Peter Hutterer 21a15f9a04 Pass the event list through to the pointer barrier code to return it
Instead of having the pointer barrier code enqueue events separately from
GetPointerEvents, pass the event list through and let it add to it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-12-17 15:03:12 +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 3b36fd1b49 mi: switch miPointerSetPosition to take doubles
Don't switch between doubles and ints in the caller, instead take doubles in
miPointerSetPosition and do the conversion there. For full feature we should
change everything down from here for doubles too.

Functional change: previously we'd restore the remainder regardless of
screen switching/confinement (despite what the comment said). Now,
screen changing or cursor constraints will cause the remainder be clipped
off. This should happen for cursor constraints but arguably not for screen
crossing.

This also corrects a currently wrong comment about miPointerSetPosition's
input coordinates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-11 12:06:56 +10:00
Peter Hutterer 81cfe44b1e mi: return the screen from miPointerSetPosition
miPointerSetPosition may switch screens. Always return the screen the sprite
is on instead of relying on callers to call miPointerGetScreen().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-10-11 12:06:53 +10:00
Peter Hutterer c9562bed0d dix: rename mieqSwitchScreen argument fromDix → set_dequeue_screen, document
fromDIX is neither exactly true nor particularly helpful in understanding
what this parameter triggers. Rename to set_dequeue_screen, because that's
exactly what happens.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-08-22 15:56:51 +10:00
Peter Hutterer 769531b9cc Add mode field to pointer movement hooks.
Preparation work for pointer barriers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-14 13:25:14 -04:00
Alan Coopersmith 3d9079b898 Add API to update setting of waitForUpdate screen private in miPointer
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-02 14:27:49 +10:00
Keith Packard faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the
devPrivates infrastructure. This will permit a new devPrivates
implementation to be layed into the server without requiring
simultaneous changes in every devPrivates user.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05 19:23:03 -07:00
Peter Hutterer bbf266cca3 mi: un-deprecate miPointerWarpCursor
This function was deprecated in ef68273f5b
because it didn't take a device argument. The device argument was added in
1c7568b8a1 though, so the deprecation is
obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16 12:20:58 +10:00
Peter Hutterer d80798ba2a mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:18:14 +10:00
Peter Hutterer f5409aa026 mi: remove deprecated miPointerAbsoluteCursor
Functions that don't specify the device are so last year.
2009-03-20 15:17:57 +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
Paulo Cesar Pereira de Andrade fb22d4d928 Remove declarations of symbols that are never defined.
These symbols were removed from the X Server, or never declared.
  One symbol that may need special attention is XkbBuildCoreState(),
that doesn't have a prototype anywhere, but is called from
xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros
XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in
include/xkbstr.h.
  fb/wfbrename.h also may need some cleanup, as it makes several
"renames" of non existing symbols.
2008-11-30 01:33:20 -02:00
Tiago Vignatti d1bb5e3b47 mi: functions here are carrying 'time' without need. 2008-10-08 03:41:17 -03:00
Tiago Vignatti 4964a9ca6c mi: remove deprecated and unused functions.
miPointerDeltaCursor, miPointerGetMotionBufferSize and
miPointerSetNewScreen.
2008-10-08 03:41:17 -03:00
Tiago Vignatti 3164288b12 Remove deprecated function miPointerPosition(). 2008-07-04 03:55:59 -03:00
Julien Cristau 782394fe53 mi: Fix typo in comments about deprecated functions 2008-06-06 12:10:35 +02:00
Peter Hutterer 6fb76acc45 mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite().
In the xnest and vfb DDX we don't need the call anyway, it's performed by
mieqProcessInputEvent.
2008-05-16 21:10:00 +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 8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
Eamon Walsh 4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Paulo Ricardo Zanoni 82f97e1c0c Enable event delivery for multiple heads.
Requires moving the spriteTrace into the DeviceIntRec and adjusting a few
functions to take in device argument, most notably XYToWindow().

Cursor rendering on the second screen is busted.
2007-04-26 15:58:50 +09:30
Peter Hutterer f1f8b562aa Alloc sprite memory in devices' devPrivates, allow undisplaying cursors.
Improve memory usage by allocating the sprite's memory only to devices that
actually have a sprite and provide means to remove a device's cursor from the
screen (more hotplugging, yay!).
This commit breaks ScreenRec's ABI.
2007-04-09 19:31:59 +09:30
Peter Hutterer e8777a91f3 Merge branch 'master' into mpx
Conflicts:

	Xi/closedev.c
	Xi/exevents.c
	Xi/extinit.c
	Xi/listdev.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	include/extinit.h
	mi/mipointer.c
2007-04-02 15:36:26 +09:30
Adam Jackson af769892a9 Static and dead code cleanup from mi/ 2007-03-25 17:56:32 -04:00
Peter Hutterer d8b5394eda Cleaning up ifdef MPX from remaining files, removing it from configure.ac.
Removing building mpx extension from Makefile.am
2006-12-18 17:35:34 +10:30
Peter Hutterer 1c7568b8a1 mi: closing memory leak, miPointer is freed in miPointerCloseScreen
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX
	adding DeviceIntPtr parameter to ScreenRec's cursor functions.
	cleanup of miPointer code to use same scheme in each function

dix:	MPHasCursor() function determines checking whether to invoke
	cursor rendering.

animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies
	 on the core pointer right now.

xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on
	the core pointer right now.

rac:	adding DeviceIntPtr parameter to cursor functions but RAC relies on
	the core pointer right now.

ramdac:	adding DeviceIntPtr parameter to cursor functions but ramdac relies on
	the core pointer right now.
2006-11-23 17:15:14 +10:30
Peter Hutterer 7b4b619d4c mi: moved core pointer information from miSpriteScreenRec into a
miCursorInfoRec.
        bugfix in mipointer, semicolon after preprocessor statement
2006-11-20 13:10:07 +10:30
Peter Hutterer 90bea69dfd mi:
added miCursorInfoRec to contain info of the MPX cursors.
        calling miUpdatePointerSprite() from event queue for MPX devices.
        adding device-specific processing to miPointer*() functions.

dix:    Call to SetCursorPosition in CheckMotion() temporarily disabled.

xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ

NOTE: This build will not display cursor images.
BUG: The second mouse does to take correct x coordinates.
2006-11-17 18:03:43 +10:30
Peter Hutterer 94e106a898 dix: moved isMPdev field to end of _DeviceIntRec structure
mi:
        added miMPPointers array to mipointer.c
        added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer
        we use inputInfo.pointer as standard value. ABI BREAK!

ramdac:
        forcing failed HW Cursor initialisation. MPX needs software rendering.
        changes to use new miPointerSpriteFunc (this required externing
        inputInfo, should probably be fixed at a later point).

RAC: changes to use new miPointerSpriteFuncs.
2006-11-17 15:10:37 +10:30
Daniel Stone b1debebf8f mi: remove mi motion history
This is now unneeded as we do motion history in the DIX.
2006-10-25 01:10:20 +03:00
Daniel Stone 11fb58be77 miscellaneous warning fixes
Use the correct type for time, and fix the mi prototype of EnqueueEvent.
2006-10-25 01:07:36 +03:00
Daniel Stone 41bb9fce47 mipointer: take device arguments, split miPointerAbsoluteCursor
Update mipointer API to take a device argument to (almost) all functions,
and split miPointerAbsoluteCursor into a couple of separate functions.
Remove miPointerAbsoluteCursor call from mieq, as we now deal with it in
GetPointerEvents.
Make miPointerSetPosition (successor of miPointerAbsoluteCursor) take
pointers to x and y, so it can return the clipped values.
Modify callers of miPointer*() functions to generally use the new
functions.
This should fix things with multi-head setups.
2006-10-08 20:34:32 +03:00
Daniel Stone ef68273f5b mi/mipointer: deprecate functions which don't take a device
Deprecate all mi pointer functions which don't take a device argument, and
replace them with versions which do, in preparation for MPX.
2006-10-08 17:44:37 +03:00
Daniel Stone 80cdd26581 mi/pointer: mark public pointer functions as deprecated
Deprecate miPointer functions which don't take a device pointer.  Pointer
movement should be handled through GetPointerEvents, and functions which
take a device as an argument (e.g. miPointerPosition) will be added.
2006-10-08 17:23:54 +03:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone 32be08ba72 Remove horrendously ugly DDX backward-compatibility. 2006-06-01 19:22:38 +00:00
Daniel Stone 825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +00:00
Daniel Stone e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Egbert Eich 2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich 867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich 147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley d568221710 XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00