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
Adam Jackson
00f01f3945
Don't inherit XAUTHORITY from the environment.
...
It's not especially obvious, and unpleasantly overloaded for the Xnest
case. Typically this gives you a server that looks for its auth data in
the authority file you were using for the running X session, which
generally doesn't have an entry for the display you just started.
All the major dm's, and startx, pass -auth explicitly, so this shouldn't
cause too much upheaval.
2008-10-02 15:48:18 -04:00
Peter Hutterer
fbd09486c6
Push server-known properties into xserver-properties.h.
2008-09-26 13:32:11 +09:30
Peter Hutterer
a2d83b9dc8
Xi: add "deletable" flag to properties, add DeleteProperty handler.
...
A property can only be deleted if any of the following is true:
- if a property is deletable and all handlers return Success.
- if a property is non-deleteable and the all handlers return Success AND the
delete request does not come from a client (i.e. driver or the server).
A client can never delete a non-deletable property.
2008-09-26 13:32:08 +09:30
Peter Hutterer
22e9047268
Xi: allow Set/GetProperties to return a status, and honour this status code.
...
If a property handler now bails out, return the error code to the caller. This
allows to be slightly more specific with the errors.
2008-09-26 13:32:07 +09:30
Peter Hutterer
1e24e7b9df
Xi: remove configure/query device property calls.
...
This removes all the meta-information about device properties (pending,
fromClient, range, valid_values, immutable).
2008-09-26 13:32:05 +09:30
Adam Jackson
991ed2949b
Rename SaveSetMap() to SaveSetShouldMap().
...
Avoids preprocessor collision with xfixeswire.h
2008-09-23 10:22:22 -04:00
Owen Taylor
ca9fae0079
Change 'remap' to 'map' in saveset functions/macros
...
Now that the code has been fixed so that Unmap means unmap and not "don't
remap", 'remap' was confusing to have in the function names/parameters, so
change it to simple 'map'.
Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-22 12:43:30 -07:00
Owen W. Taylor
722c51960d
Don't remap windows for SaveSetUnmap
...
Since ReparentWindow() does a unmap/map pair for windows that are already
mapped, for saveset windows with SaveSetUnmap, we must unmap the window
before calling ReparentWindow() to avoid the generation of MapRequest
events, and so forth.
2008-09-22 11:04:26 -04:00
Adam Jackson
0bb317a78b
Default to -br. Add -retro option for the nostalgic.
...
-retro also reverts to the classic cursor display behavior, meaning,
the cursor will be visible before anyone calls XDefineCursor().
2008-09-22 10:51:51 -04:00
Julien Cristau
ab17f88506
Don't use our version of ffs() if the system has one
2008-09-22 02:49:15 +02:00
Peter Hutterer
e76b5b5e73
dix: calloc, not malloc, ValuatorClassRec.
...
For master devices, the ptraccel code could segfault on free since we'd be
dereferencing random memory. Callocing the valuatorClassRec is the easy fix.
2008-09-18 14:55:32 +09:30
Eamon Walsh
b6ab114212
Array-index based devPrivates implementation.
...
Note: DevPrivateKey is now pointer-to-int, which means
each key now needs to point to some global storage of
size at least sizeof(int).
2008-09-12 19:11:53 -04:00
Daniel Drake
4e1f9f51a9
Don't try to destroy a NULL pixmap.
2008-09-02 16:20:40 -04:00
Tomas Carnecky
ebea78cdba
Prepare for array-index based devPrivates.
...
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Eamon Walsh
ec7907f8fa
Add an array of integers for use as per-screen cursor private keys.
...
Replaces the use of the screen pointer itself as the key, which was
nice but won't work now that an array index is being stored.
2008-08-27 19:27:13 -04:00
Adam Jackson
64ef7ed072
Centralize declaration of ConnectionInfo.
2008-08-20 13:14:34 -04:00
Peter Hutterer
609c04b62b
dix: stick a warning in about loss of subpixel precision.
2008-08-15 14:52:13 +09:30
Adam Jackson
0ce687634f
Eviscerate save-under support.
...
Use a compositing manager already. Plus I really wanted to use 'eviscerate'
in a commit message.
2008-08-13 17:28:08 -04:00
Peter Hutterer
998375f415
dix: remove superfluous check.
2008-08-12 20:42:08 +09:30
Mathieu Bérard
9f9268821b
The smart scheduler is not optional.
2008-08-11 13:52:38 -04:00
Matthieu Herrb
6e33e6f355
Move string comparaison functions to from dix/ to os/.
2008-08-09 23:51:39 +02:00
Peter Hutterer
465a9bb96e
dix: don't try to create events if we don't have a screen. #16898
...
A NULL screen may happen during server shutdown, when the output has been shut
down but the devices still generate events.
X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898 >
2008-08-08 17:37:06 +09:30
Simon Thum
e00cd54c1a
dix: remove misleading comment in ptrvelo.c
...
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-08-08 16:19:20 +09:30
Peter Hutterer
6ca34549b8
dix: remove obsolete FIXME comment.
...
Thanks to Simon Thum for pointing this out.
2008-08-08 16:19:20 +09:30
Peter Hutterer
2c3645581e
dix: SetModifierMapping should only apply to the ClientPointer and it's SDs.
2008-08-08 16:19:20 +09:30
Simon Thum
e1b286d495
dix: simplified debugging helper for pointer acceleration
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-08-08 16:19:20 +09:30
Simon Thum
4f333d5351
dix: simplify velocity tracking filters
...
prefer fp-mul over fp-div and remove rather pointless check
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-08-08 16:19:20 +09:30
Tomas Carnecky
277a74bcbb
Redefine clients as a fixed array
...
This removes yet another xalloc() each server generation. Also, I
couldn't find the corresponding xfree() so I guess that used to be a
memory leak there.
2008-08-05 01:17:32 +03:00
Tomas Carnecky
5532d63488
Redefine WindowTable as a fixed array
...
Instead of xalloc'ing it every server generation. The array is always
the same size (MAXSCREENS), anyway.
2008-08-05 01:17:32 +03:00
Simon Thum
d762c08aeb
dix: export driver-side functions for acceleration
...
also add additional safety for accel driver api
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-08-04 15:13:37 +09:30
Simon Thum
18e9fd69fe
dix: use average of pointer accel profile
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-08-04 15:13:30 +09:30
Simon Thum
805f28e96c
some trivial changes regarding C compat, indentation, etc.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:19 +09:30
Simon Thum
a17cb29f5a
dix: preparation change: make runtime exchange of filter chain safe
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:19 +09:30
Simon Thum
1a9f9ac50f
dix: optimize precision in device velocity estimation
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:19 +09:30
Simon Thum
c184b91d9a
dix: improve the driver interface to predictable pointer acceleration
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:18 +09:30
Simon Thum
87aa529857
dix: introduce defines for accel profile numbers
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:18 +09:30
Simon Thum
4e32e6fb38
dix: rename classic accel _scheme_ to lightweight to avoid confusion with
...
classic accel _profile_
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:18 +09:30
Simon Thum
d40183c665
dix: add legal statements to ptrvelo.{c|h}
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-28 18:13:18 +09:30
Peter Hutterer
7d9dece74f
dix: fix up enter/leave system once again.
...
Two corrections
1. the "detail" field has NotifyVirtual, etc., not the "mode" field. This was
a clear bug.
2. don't set/unset the flags for NotifyGrab or NotifyUngrab. Clients are
expected to deal with multiple enter/leave events per window if the mode is
not NotifyNormal.
Testable with TCL menu boxes (such as used in gitk):
tk_optionMenu .menu globVar Val1 Val2 Val3 ValJunk
pack .menu
Thanks to Michel Dänzer for pointing this out.
2008-07-28 09:04:41 +09:30
Mathieu Bérard
ae67508392
Fix AddExtension now that CloseDownProc can be NULL.
2008-07-25 10:05:30 -04:00
Adam Jackson
6bcde69585
Allow extension closedown hook to be null.
2008-07-24 15:46:08 -04:00
Adam Jackson
d6228cb22a
Shape extension is built-in and mandatory.
2008-07-24 15:46:08 -04:00
Keith Packard
67d7821ae7
dix: reset potential lastSlaves when disabling an SD
...
Unplug a mouse, then warp the pointer and the warp pointer code will try
to update the position of the last slave device associated with the
master. That pointer will be stale and the X server will crash.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-22 15:54:48 +09:30
Peter Hutterer
69de40ee45
dix: shift the duplicate button mapping check to ProcSetPointerMapping.
...
XI 2 allows two buttons to have the same button code.
2008-07-21 17:26:33 +09:30
Daniel Stone
6b5206e7cb
dix: Remove insane BC hacks
...
If your DDX needs a 1bpp mode and doesn't set it up, your DDX is
incompetent.
2008-07-21 03:50:15 +03:00
Søren Sandmann
b85392e66b
Give priority to clients that are receiving expose and configure events
2008-07-17 23:25:29 -04:00
Adam Jackson
af2138bfce
Nuke some ancient code for commandline-challenged OSes.
...
This appears to have been dead code even in 6.7.
2008-07-17 10:39:29 -04:00
Jie Luo
e3ff850174
Remove duplicate load of freetype font renderer.
...
libXfont will do this for us in FontFileRegisterFpeFunctions.
2008-07-17 10:27:24 -04:00
Adam Jackson
affec10635
Remove loadable font renderer support.
2008-07-16 14:49:36 -04:00
Adam Jackson
a82e6efb7b
Remove the numVideoScreens xprintism.
...
This was to account for cases where you had video and print screens in
the same server. Lunacy. Leave the slot in ScreenInfo, but rename it,
and stop looking at it.
2008-07-16 14:19:04 -04:00
Daniel Stone
55644d2f1c
Make --enable-debug usable again
...
Enable region debugging causes assertion failures (should really look
into that, though), and I don't need four messages every time I move my
pointer.
2008-07-16 14:23:34 +03:00
Daniel Stone
ad87c72edc
DIX: Add strcasestr from FreeBSD
...
Add strcasestr for use on systems which don't have it.
2008-07-16 03:02:17 +03:00
Daniel Stone
dcf6293030
strcasecmp: Actually use the right license
...
Forgot to update the license when I committed the FreeBSD version, so it
still had an old SGI license. Sorry. Sorry.
2008-07-16 03:02:10 +03:00
Daniel Stone
11f9e35202
DIX: Add strncasecmp from FreeBSD, make strcasecmp args const
...
Add strncasecmp (as we're now using it) in case someone doesn't have it,
and also change strncasecmp args to be const, in accordance with
everything else.
2008-07-16 01:38:22 +03:00