Commit Graph

733 Commits

Author SHA1 Message Date
Jeremy Huddleston
b3415187e9 Rootless: Correct border rendering on parent-relative windows
Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow
(cherry picked from commit cf2e3312cf)
2009-09-27 23:31:50 -07:00
Jeremy Huddleston
226b1033b4 XQuartz: Transition from xEvent based mieq to InternalEvent
(cherry picked from commit a3dbde2de8)
2009-09-27 23:31:07 -07:00
Kevin E Martin
c9ec2bab2f dmx: undefine MITSHM, move undefs to miinitext.c.
This patch undefines MITSHM for dmx - we don't support the required
screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to
miinitext.c, where they belong.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-26 13:14:50 +10:00
Peter Hutterer
90aa0e4a49 input: don't use typecasts to access members of InternalEvent.
To avoid confusion, the member names are now postfixed with _event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-22 11:15:32 +10:00
Keith Packard
8b5086250a Eliminate bogus event resizing.
Now that all event queues hold internal events only, they never need
to be resized. Resizing them led to memory corruption as they would
get sized for an appropriate xEvent, not an internal event.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20 20:45:24 +10:00
Peter Hutterer
b968237131 mi: include shmint.h if needed, silence compiler warning.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-24 10:09:14 +10:00
Tiago Vignatti
93d9646c71 mi: fix indentation
mieq.c looks indented-wise now. Let's see how long it will take to someone
mess it again.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-08 20:18:10 +03:00
Tiago Vignatti
f9a2fff224 mi: fix cursor warping screens
The server was processing ET_RawMotion type when the cursor was wrapping to
another screen and getting wrong valuator values. This fix such issue
considering only ET_Motion, ET_KeyPress, ET_KeyRelease, ET_ButtonPress and
ET_ButtonRelease types when the cursor detects a new screen, keeping the
"normal" processing of device events.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-08 20:09:32 +03:00
Peter Hutterer
3d3b8babd1 mi: update master event copying to InternalEvents.
This is long overdue. The device events are InternalEvents now (and only one
at a time), diminishing the need for an EventList for the master event.
Furthermore, don't make masterEvent a static since this will interfere if
mieqProcessDeviceEvent is called from somewhere else (e.g. XKB actions).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30 08:43:13 +10:00
Peter Hutterer
4e9b2938cd include: untangle events.h from the SDK headers.
InternalEvents shouldn't be used anywhere outside the X server itself. Split
up into events.h for opaque typedefs for the events needed by various
headers and eventstr.h for the actual struct definitions.

eventstr.h must only be included by code that requires internal events and
is not part of the SDK.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30 08:43:13 +10:00
Jeremy Huddleston
b8e0f74082 mieq: Protect from pDev=NULL in mieqEnqueue and mieqProcessInputEvents
(cherry picked from commit bf60ffb497)
2009-07-25 20:17:25 -07:00
Peter Hutterer
20daa145c4 mi: fix build error caused by missing xtest.h
xtest.h was renamed to xtestconst.h in xextproto.
Requires xextproto 7.0.99.3

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-23 08:38:58 +10:00
Pierre Willenbrock
9965174f4f Check dev->u.master if there is a custom event handler, too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17 14:40:54 +10:00
Pierre Willenbrock
c806162c13 Always update u.lastSlave
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17 14:40:54 +10:00
Peter Hutterer
d3f6b43a24 Update to xextproto 7.0.99.1.
xextproto had Xlib client headers moved into libXext.
Protocol header files are named fooproto.h, header files with constants
foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-15 17:00:05 +10:00
Peter Hutterer
d040af7fa3 Update to type-specific raw events - require inputproto 1.9.99.14.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15 10:36:30 +10:00
Peter Hutterer
b773b4e8e0 s/MAX_DEVICES/MAXDEVICES/ updates.
The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6)
Two comments updated to refer to MAXDEVICES.

MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more
than 15 physical input devices were present, this could result in a
failure to install the SIGIO handler for any device above 15.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06 12:58:39 +10:00
David Miller
afa680e495 mi: ignore DGA events in ChangeDeviceID
DGA events don't have a deviceid, so they don't need changing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18 08:23:30 +10:00
Peter Hutterer
6de67d3206 Merge branch 'master' into xi2 2009-06-03 16:11:33 +10:00
Peter Hutterer
af4e658401 mi: only process master if the SD is still attached.
SDs may be detached during event processing (e.g. if a passive grab
activates). In this case, the event must not be processed through the master
device.

Reported-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-03 14:38:55 +10:00
Jeremy Huddleston
f2151f1b0d XQuartz: Fix alpha to be 1 (screenshots bug, etc)
This is related to: bc964ff1e3
XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless.

which was on the 1.4 branch and implemented in fbPaintWindow.  Now that fbPaintWindow is gone, this is now in miPaintWindow().
(cherry picked from commit 032173f693)
2009-05-29 14:48:18 -07:00
Peter Hutterer
d7aef3f663 Merge branch 'master' into xi2
Conflicts:
	Xext/geext.c
	Xi/chdevcur.c
	Xi/extgrbdev.c
	Xi/xiproperty.c
	configure.ac
	dix/ptrveloc.c
	hw/xfree86/common/xf86Config.c
	mi/mipointer.h
	test/input.c
	xkb/xkb.c
2009-05-28 17:20:58 +10:00
Peter Hutterer
b25e29e801 mi: use GetMaster() from MIPOINTER and MISPRITE.
Both may in some cases be called for a SD attached to a master keyboard. In
this case, we need to get the right master device (i.e. the pointer).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22 15:44:57 +10:00
Peter Hutterer
ebe45e1a72 input: introduce partial class copying depending on the event.
Copying all classes into the master device has drawbacks for hybrid devices
(devices that are both mice and keyboards). If such a device posts an event,
it's key classes are moved into the VCP. The key event itself is unaffected
by keyboard grabs and the like.

Partial class copying copies depending on the event and copies the classes
into the right master device (i.e. the VCK for key events, the VCP for
pointer events).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22 15:44:57 +10:00
Peter Hutterer
438a4eafa5 input: remove nested union from InternalEvent.
There's no need for internal events to be a struct with a single nested
union, we might as well make the union itself the InternalEvent.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22 15:44:56 +10:00
Peter Hutterer
b12d302df8 Input: rename DeviceIntRec->isMaster to ->type.
isMaster is not enough as long as we differ between master pointers and
keyboard. With flexible device classes, the usual checks for whether a
master device is a pointer (currently check for ->button, ->valuators or
->key) do not work as an SD may post an event through a master and mess this
check up.

Example, a device with valuators but no buttons would remove the button
class from the VCP and thus result in the
IsPointerDevice(inputInfo.pointer) == FALSE.

This will become worse in the future when new device classes are introduced
that aren't provided in the current system (e.g. a switch class).

This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and
MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an
IsMaster(dev).
2009-05-22 15:44:50 +10:00
Peter Hutterer
add2defac7 Split the signal-handler's lastSlave out into a separate variable.
dev->u.lastSlave was not signal safe since it was accessed by the DIX and
during signal handling.
Replaced with:
'dev->last.slave' for the signal handler's lastSlave (used to generate
                  DeviceChangedEvents), .
'dev->u.lastSlave' for the DIX lastSlave (currently only used in
                   change_modmap)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22 15:44:03 +10: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
c1d7deca92 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:01:22 +10:00
Adam Jackson
c66cf7b64c Update several of my and/or Red Hat's licenses to standard form. 2009-05-14 07:02:44 -04:00
Peter Hutterer
749cae8220 mi: don't crash if we're trying to update the pointer for a keyboard.
If a device doesn't have a pointer, just return.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-05 14:12:04 +10:00
Peter Hutterer
3d30789a05 mi: don't crash if we're trying to update the pointer for a keyboard.
If a device doesn't have a pointer, just return.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-01 09:07:39 +10:00
Eamon Walsh
57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
Peter Hutterer
057fc9a4f8 Merge branch 'master' into xi2
Conflicts:
	Xi/chdevhier.c
	include/input.h
2009-04-24 16:15:47 +10:00
Peter Hutterer
932d6bcbb6 mi: remove superfluous check.
mieqProcessInputEvents doesn't process events from MDs anymore, so we don't
need to check for pDev->isMaster.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-24 15:29:24 +10:00
Peter Hutterer
f2e957c534 mi: add prototype for CopyGetMasterEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:18:15 +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
4fa7fcf610 mi: fix compiler warning - explicitly typecast to InternalEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:18:14 +10:00
Peter Hutterer
fcc19e673e mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09 20:50:32 +10:00
Peter Hutterer
630a6e9d14 mi: fix compiler warning - explicitly typecast to InternalEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09 20:50:32 +10:00
Peter Hutterer
e3bb7dea06 mi: add prototype for CopyGetMasterEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09 20:50:32 +10:00
Peter Hutterer
6c3b633299 Merge branch 'master' into xi2 2009-04-07 19:36:27 +10:00
Adam Jackson
17239c8e31 misprite: Remove private header, fold into misprite.c 2009-03-27 12:44:20 -04:00
Adam Jackson
bb89fc2771 misprite: Fix software cursor on multiple ScreenRecs 2009-03-27 12:36:42 -04:00
Adam Jackson
2c000f4980 misprite: Do window check first for Get{Image,Spans} too 2009-03-27 11:54:52 -04:00
Adam Jackson
8beced6c02 misprite: RECT_IN_REGION -> miRectIn 2009-03-27 11:43:33 -04:00
Adam Jackson
a232116b9e misprite: Fix a typo 2009-03-27 11:41:40 -04:00
Adam Jackson
1f0eaf886d misprite: Fix cast abuse 2009-03-27 11:29:40 -04:00
Adam Jackson
4ab93f0566 misprite: In SourceValidate, check that it's a Window first
It almost never is.  However, you have _lots_ of input devices now, and
walking them all on every Composite operation is not the cheapest thing
in the world.
2009-03-23 15:19:47 -04: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
Peter Hutterer
4cc6a96d71 input: add support for RawDeviceEvents. 2009-03-20 15:17:56 +10:00
Peter Hutterer
6fe4c28bf4 Add agressive event type checking.
Best to FatalError if a wrong event comes in. At least that forces me to fix
it really quickly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
0b2b330f6f mi: remove a bunch of useless inputInfo.pointer assignments.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-16 13:29:07 +10:00
Peter Hutterer
b874a5c0aa mi: only print the "EQ overflowing" error once.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-03 07:07:30 +10:00
Peter Hutterer
36583a4996 mi: split EQ popping and event processing into two functions.
mieqProcessInputEvents() - pop an event off the EQ and pass it to
mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy.

This way, we can use mieqPDE() from Xtest, xkb, and others to post an event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
47f136ed6f mi: change custom handlers to internal events
This should re-enable DGA, but XQuartz needs to be changed to internal events
too now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
763848d3ab Input: change processing API to InternalEvents.
Don't pass xEvent* and count through to processing, pass a single
InternalEvent.

Custom handlers are disabled for the time being. And for extra fun,
XKB's pointer motion emulation is disabled. But stick an error in there so
that we get reminded should we forget about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
007e93c869 xkb: Switch the xkb event processing path over to InternalEvents.
Before dropping down into the DIX, convert back into XI events. This is a
temporary solution only, until the DIX is capable of handling InternalEvents
anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer
4026c63e4e mi: switch the EQ to contain InternalEvents only.
This gets rid of the nevents parameter, InternalEvents are always a single
item per event. Also remove the special DeviceValuator handling in both
enqueueing and dequeueing.

Custom callback handlers are now broken until fixed.

For bisectability, we copy the InternalEvent back into the XI required during
POE and friends. Consider this a temporary solution.

Note: Because of misc linker bonghits, Xvfb won't link in this revision.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Åstrand
ddb8d8945d xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:38 +10:00
Maarten Maathuis
d591c7d1b8 mi: kill a few warnings 2009-02-07 21:58:17 +01:00
Maarten Maathuis
00226d0b58 mi: clip exposures to pGC->clientClip. 2009-02-07 21:58:17 +01:00
Maarten Maathuis
2e76958d30 fb: move some code to mi 2009-02-06 18:42:39 +01:00
Peter Hutterer
9fe9b6e4ef mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668
In Xinerama all windows hang off the first root window. Crossing the screens
must not reset the spriteTrace, otherwise picking fails and events are sent to
the root window.

X.Org Bug 18668 <http://bugs.freedesktop.org/show_bug.cgi?id=18668>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:01:27 +10:00
Adam Jackson
132b464d73 Remove a bunch of useless casts.
We've had void * for twenty years now people let's try to act like we
know how it works.
2009-01-22 02:11:16 -05:00
Daniel Stone
40877c6680 XKB: Make XKB mandatory
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:06:25 +11:00
Jeremy Huddleston
ca46c01869 XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue
Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
(cherry picked from commit 94e417ac87)
2009-01-16 13:58:20 -08:00
Peter Hutterer
d645721170 mi: ensure chained button mappings from SD -> MD (#19282)
After copying the master event, flip the detail field to the mapped button of
the SD, not the physical button. This way if the SD has a mapping 1:3 and the
MD has a mapping of 3:4, a press on button 1 on the SD results in a core event
on button 4.

X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-15 09:28:01 +10:00
Peter Hutterer
d36adf52a2 dix: fix WarpPointer calls for devices with custom valuator ranges (#19297)
If the MD's lastSlave was a devices with custom axes ranges, then a
WarpPointer would position the cursor at the wrong location. A WarpPointer
request provides screen coordinates and these coordinates were scaled to the
device range before warping.

This patch consists of two parts:
1) in the WarpPointer handling, get the lastSlave and post the event through
   this device.
2) assume that WarpPointer coordinates are always in screen coordinates and
   scale them to device coordinates in GPE before continuing. Note that this
   breaks device-coordinate based XWarpDevicePointer calls (for which the spec
   isn't nailed down yet anyway) until a better solution is found.

X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-13 09:22:56 +10:00
Jeremy Huddleston
dde5c591be mieq: Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
This is more of a hack around the problem.  This is something that will need to be addressed in a
more structured manner with the multi threaded input efforts.
(cherry picked from commit 3c596c061e)
2009-01-11 16:39:20 -08:00
Jeremy Huddleston
5339c22a8c XQuartz: Add locking to make mieq thread safe on OSX
(cherry picked from commit 7a8d226686)
2009-01-11 01:56:45 -08:00
Julien Cristau
46f3c1b937 mi: don't mix declarations and code 2009-01-11 08:54:12 +01:00
Julien Cristau
5aa9483d3e mi: ANSI cleanups 2009-01-11 08:54:12 +01:00
Jeremy Huddleston
a939368ab8 mi: Reuse memory in mieqProcessInputEvents rather than making excessive calls to calloc()
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2008-12-15 03:20:17 -08:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Peter Hutterer
d281866b74 mi: Clean up CopyGetMasterEvent, re-use the memory.
Alloc an EventList once and then re-use instead of allocing a new event each
time we need a master event.
There's a trick included: because all the event processing handlers only take
an xEvent, init a size 1 EventList and squash the events into this one.

Events that have count > 1 must be squished into an xEvent array anyway before
passing into the event handlers, so we don't lose anything here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2008-12-10 12:42:45 +10:00
Peter Hutterer
0b4fef6337 dix: move MAX_VALUATOR_EVENTS into include/input.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10 12:42:45 +10:00
Peter Hutterer
090f631239 mi: always update the sprite for master devices.
Follow-up to 9ce995373e. This re-enables cursor rendering if the MD is
controlled through software (e.g. synergy).

Reported by John Tapsell: "I use Xorg with no mouse attached, but use synergy
to control the mouse.  The commit means that I no longer have a visible mouse
cursor.  The mouse cursor is still 'there' in terms that I can click buttons
etc with it, but it's just not visible."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10 11:06:59 +10:00
Paulo Cesar Pereira de Andrade
b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02: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
Peter Hutterer
9ce995373e mi: UpdateSprite only if the device is attached. 2008-12-02 15:50:38 +10: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
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Jeremy Huddleston
19aac4274b mi: Push screen-saver/DPMS handling to after the EQ pop operation.
This way we on't need to hold the mutex during the dixSaveScreens() call.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-19 10:55:29 -08:00
Jeremy Huddleston
56d1793c43 mi: Only increment tail (push) when the event data is actually in the queue
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-19 10:54:57 -08:00
Peter Hutterer
fc3e8bfb82 mi: clean up mieqProcessInputEvents, copy all events before processing.
Copy the EventRec's information into local variables before processing them,
this should make it safer for upcoming threading and also makes it easier to
read.

Simplify the event allocation code from the abyss it was before.

This also fixes a potential bug where a custom handler could scramble the
event before the same -now scrambled- event was then passed through the
master's custom event handler.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-11 14:52:54 +10: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
Julien Cristau
d3d6be4948 mi: Fix infinite loop on regen when swrast_dri.so is missing
The swrast DRI provider gets pushed on the glx provider stack at every
server generation, so the stack turns into a circular list on regen.

X.Org bug#18388 <https://bugs.freedesktop.org/show_bug.cgi?id=18388>
2008-11-07 19:03:32 +01:00
Peter Hutterer
cbc6f98395 xkb: when faking mouse button events, fake them on the correct devices.
When MouseKeys are activated, keyboard devices may generate fake mouse button
events through XKB. Let's get then running through the appropriate paths, i.e.
as XI events on the correct device.

To make matters more fun, ProcessOtherEvents drops events if the DIX device
state cannot be updated accordingly, i.e. all button events from keyboard
devices.
Hence we need to get the paired MD for the device in XkbDDXFakeDeviceButton,
and post the event through the paired MD (usually the VCP).

Removes now-unused ddxFakeBtn.c.

Note: this patch only half-arsedly fixed button events, motion events are a
more complicated matter.
2008-11-04 16:04:15 +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
Daniel Stone
889a8dc02b Xi: XINPUT has been mandatory for ages
Ditch all #ifdef XINPUT, since it's always built.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04 16:01:07 +10:30
Julien Cristau
4b96ba8ddf Nuke unused miBankNewSerialNumber 2008-10-26 11:56:35 +01:00
Julien Cristau
30a7a06a9e Nuke prototype for nonexistent function
miDoInitVisuals was removed in commit
94825ad3c7, but its prototype was left.
2008-10-26 11:44:57 +01:00
Adam Jackson
b736f477f5 mieq: Backtrace when the queue overflows.
Since we're probably stuck down in a driver somewhere, let's at least
try to point out where.  This will need to be rethought when the input
thread work lands though.
2008-10-10 16:33:57 -04: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
Adam Jackson
0b7b89fbac xalloc+bzero -> xcalloc 2008-10-06 14:19:30 -04:00
Adam Jackson
b72a217ad5 Dangling use of miDestroyGCOps 2008-10-03 18:30:37 -04:00
Adam Jackson
f5bbc54a93 Fix compile for miSetScreenPixmap prototype. 2008-10-03 18:18:02 -04:00
Adam Jackson
9dbfcd8921 Delete unused miModifyBanking() 2008-10-03 17:51:21 -04:00
Adam Jackson
94825ad3c7 Remove unused wrapping for visual initialization. 2008-10-03 17:51:21 -04:00
Adam Jackson
4791f8e2ba staticize mi{G,S}etScreenPixmap 2008-10-03 17:51:20 -04:00
Adam Jackson
14d98b4a2f miFindMaxBand is dead code 2008-10-03 17:51:20 -04:00
Adam Jackson
48b4792813 mi{Create,Destroy}GCOps are unused, nuke 'em. 2008-10-03 17:51:20 -04:00
Adam Jackson
bd0e87c747 Remove a bunch of unused API from the mi export list. 2008-10-03 17:51:20 -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
Jeremy Huddleston
dac9e91870 mieq: Made custom event handlers safer for nevents >1 2008-09-21 17:33:04 -07:00
Keith Packard
03ab8f11d2 When resizing a window with redirected descendents, don't expose them
Bit/window gravity computations need to recompute exposures to manage the
bits which are saved by gravity during the resize computation. That's easy
for non-redirected windows where the bits are all within the parent's
pixmap. For redirected windows, we don't need to deal with this at all, so
just skip the whole re-computation adventure.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-19 20:59:40 -07:00
Jeremy Huddleston
47bf269d59 mieq: Fix my broken cherry pick. 2008-09-03 12:54:56 -07:00
Jeremy Huddleston
9e70a3cf58 mieqProcessInputEvents: Check custom event handlers first. 2008-09-03 09:33:39 -07: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
af5125968a Refactor misprite a bit.
No variable declarations in header files, please.
2008-08-19 14:47:10 -04:00
Fredrik Höglund
244a635fcd Fix the tile offset in miPaintWindow for ParentRelative windows. 2008-08-18 19:27:34 +02:00
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
Adam Jackson
63bdd4c27d Unifdef XIDLE.
Seriously how was this still here.
2008-07-31 17:31:36 -04:00
Adam Jackson
f3ff238601 Sync is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
3fcf4d3eb8 XC-MISC is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Adam Jackson
f65c50c4e9 Bigreqs are built-in and mandatory. 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
Adam Jackson
856db05b58 Unifdef sgi. 2008-07-23 13:37:42 -04:00
Adam Jackson
0ff5bc4048 Unifdef QNX.
Again, hasn't worked since at least 7.0.
2008-07-23 10:44:34 -04:00
Adam Jackson
0b45ba488d Drop the FONTCACHE extension.
This appears to have been dead code since X-TT was merged.
2008-07-18 10:54:10 -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
22e64108ec XFree86: Remove XFree86-Misc extension
Its last remaining purpose in life has been destroyed by input
properties.  Au revoir: it's been fun, by which I mean awful.
2008-07-16 06:25:26 +03:00
Tiago Vignatti
d78bebb20a Remove unused function and variables. 2008-07-04 04:04:19 -03:00
Tiago Vignatti
3164288b12 Remove deprecated function miPointerPosition(). 2008-07-04 03:55:59 -03:00
Adam Jackson
cbc20d92de XTrap delenda est. 2008-06-25 09:52:36 -04:00
Adam Jackson
9719354ae0 Check for __amd64__, not __x86_64__.
Spiritual revert of 1fa4de80fc.  Intel's C
compiler claims to be gcc-compatible; if they're not defining the same
macros as gcc then that's their bug, not ours.  Even if we were to do
this aliasing we should do it once and for all in servermd.h.
2008-06-24 14:37:06 -04:00
Peter Hutterer
4f3ed54dc9 mi: remove trailing whitespaces from misprite.c 2008-06-18 10:07:37 +09:30
Eamon Walsh
9d871e19c9 Fix "warning: unused variable ‘pDev’, `pPointer'". 2008-06-13 21:35:29 -04:00
Tiago Vignatti
881e551de9 CopyGetMasterEvent() can be static. 2008-06-11 18:03:33 -03:00
Tiago Vignatti
656949cbe2 Remove more unused things.
In function ‘miSpriteCloseScreen’:
    warning: unused variable ‘pDev’
2008-06-11 17:57:19 -03:00
Peter Hutterer
ea6a02c048 mi: protect mipointrst.h against multiple includes. 2008-06-11 17:24:19 +09:30
Peter Hutterer
a7d4bec884 mi: remove leftover old license comment. 2008-06-08 23:28:28 +09:30
Julien Cristau
782394fe53 mi: Fix typo in comments about deprecated functions 2008-06-06 12:10:35 +02:00
Peter Hutterer
d25ffcfbfc mi: protect against possible NULL-pointer dereference. 2008-06-05 16:14:34 +09:30
Paulo Cesar Pereira de Andrade
8644aa4717 mi: minor build fix when compiling with debug enabled.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-06-05 08:55:09 +09:30
Peter Hutterer
58d12c99ab mi: Remove #ifdef XINPUT, kdrive otherwise won't get events. 2008-05-31 18:45:11 +09:30
Peter Hutterer
341a61b608 mi: reduce noisyness. DebugF is enough if device ID can't be changed.
Also - printing out the event type is actually helpful.
2008-05-31 17:42:05 +09:30
Peter Hutterer
9b544fa400 mi: ansify. 2008-05-28 14:23:08 +09:30
Peter Hutterer
26c1958c32 Merge branch 'master' into mpx 2008-05-26 17:37:31 +09:30
Peter Hutterer
e0fbe404a4 mi: handle sprite even for floating slave devices.
We still don't render it, but we accept all the other calls to update it's
internal state.
2008-05-22 23:24:29 +09:30
Kristian Høgsberg
77ff8fd507 Drop glcore GLX provider.
Obsoleted by the DRI swrast driver.
2008-05-21 12:15:18 -04:00
George Sapountzis
255142b61e drop xprint remnants: InitGlobals 2008-05-21 18:13:09 +03:00
Peter Hutterer
7509fb498c Merge branch 'hwcursor' into mpx 2008-05-21 16:25:35 +09:30
Peter Hutterer
2ae3bed337 mi: shut up compiler warning (return w/o a value) 2008-05-21 15:51:35 +09:30
George Sapountzis
6ff6465931 Add loader for the swrast dri driver. 2008-05-20 16:38:05 -04:00
Peter Hutterer
f9edecd1b5 mi: sync declaration and definition of mieqResizeEvents. 2008-05-20 11:07:17 +09:30
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
Conflicts:

	Xext/xprint.c (removed in master)
	config/hal.c
	dix/main.c
	hw/kdrive/ati/ati_cursor.c (removed in master)
	hw/kdrive/i810/i810_cursor.c (removed in master)
	hw/xprint/ddxInit.c (removed in master)
	xkb/ddxLoad.c
2008-05-20 10:20:14 +09:30
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
dfb7de6571 mi: don't call from miPointerMoved into the spriteFuncs for anything but VCP.
Calling ->MoveCursor for anything but the HW-rendered VCP causes the
SW-rendered cursor routines to be started, including mallocs, etc. Since
miPointerMoved is called during SIGIO, this is a bad idea.
2008-05-16 20:56:04 +09:30
Peter Hutterer
48ba58feac 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 19:33:51 +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
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
Adam Jackson
1c8bd318fb X n'est pas une print API. 2008-05-12 14:15:11 -04:00
Keith Packard
6c1accce87 Empty the borderClip of manual redirect windows. (bug 15823)
Thanks to Owen Taylor for root-causing this one.

If a TreatAsTransparent window has any area in the borderClip, that will be
added to the totalClip region for use by other windows. That's wrong.
Instead, simply empty the borderClip for TreatAsTransparent windows right up
front.
2008-05-04 21:54:22 -07: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
Peter Hutterer
ff36753755 mi: call the custom event handlers for both MD and SD. 2008-04-29 14:53:41 +09:30
Peter Hutterer
1fab51edfc mi: guard against NULL-pointer dereference. 2008-04-28 11:37:21 +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
Peter Hutterer
f5ac98747d Standardise copyright headers for all new files created as part of MPX. 2008-04-25 14:50:24 +09:30
Peter Hutterer
8190ef8754 Merge branch 'master' into mpx
Conflicts:

	Xext/EVI.c
	Xext/appgroup.c
	Xext/cup.c
	Xext/mitmisc.c
	Xext/sampleEVI.c
	dix/window.c
2008-04-22 18:04:05 +09:30
Peter Hutterer
179a082c26 Xext: route event through master if required (XTestFakeInput) 2008-04-22 17:45:55 +09:30
Peter Hutterer
fb784d99c5 mi: fix typo in comment. 2008-04-22 17:45:48 +09:30
Adam Jackson
a7503615a6 Death to TOG-CUP.
If you still care about 8bpp visuals that much, fix Composite to provide
synthetic visuals.
2008-04-18 19:56:41 -04:00
Eric Anholt
25827fde68 Nuke the MIT-SUNDRY-NONSTANDARD extension.
This extension provided bug-compatibility with pre-X11R6, but has been
stubbed out in our server since 2006 to return BadRequest when you actually
asked for it.
2008-04-18 16:37:08 -07:00
Adam Jackson
eafaf40fb3 Death to APPGROUP. 2008-04-18 18:50:05 -04:00
Adam Jackson
f6617b4127 Death to Extended Visual Information. 2008-04-18 18:28:01 -04:00
Matt Turner
1fa4de80fc Check for __x86_64__ when we check for __amd64__
It seems Intel C Compiler neglects to define __amd64__, __amd64, or
amd64, but *does* define __x86_64__.
2008-04-12 20:39:18 +02:00
Magnus Vigerlöf
5ffbcfec3d dix: Ensure Proximity events don't kill the server.
Add Prox events to the if-clauses with the other events
that are usually sent from the input devices.
Ensure that the event deliverers won't try to deliver
events of type '0' (some extended events doesn't have
an equivalent core-type)

Small modification by Peter Hutterer.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-04-08 14:43:22 +09:30
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Eamon Walsh
b5f98fcea2 XSELinux: Add xorg.conf option for permissive/enforcing/disabled.
Patch by Joe Nall.

The option goes in the "extmod" subsection.
TODO: Make it easier for extension modules to handle their own options.
2008-03-28 14:14:23 -04:00
Daniel Stone
88bec0915e mi: More meaningful assert crashes
When we fail an assert in miregion.c (which happens every now and then,
though I haven't yet checked up why), at least generate a segfault, so
we'll get a backtrace.
2008-03-14 21:56:31 +02:00
Peter Hutterer
4f2cd0ed96 Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.

Conflicts:

	Xi/opendev.c
	dix/devices.c
	dix/dixfonts.c
	dix/getevents.c
	dix/resource.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	mi/mipointer.c
	xkb/ddxBeep.c
	xkb/ddxCtrls.c
	xkb/ddxKeyClick.c
	xkb/ddxList.c
	xkb/ddxLoad.c
	xkb/xkb.c
	xkb/xkbAccessX.c
	xkb/xkbEvents.c
	xkb/xkbInit.c
	xkb/xkbPrKeyEv.c
	xkb/xkbUtils.c
2008-03-04 18:11:10 +10:30
George Sapountzis
3d64290547 clean some "unused" warnings 2008-03-01 19:49:24 +02:00
Peter Hutterer
b81c330f70 mi: remove RawDeviceEvent's ID changing. 2008-02-14 09:32:54 +10:30
Eamon Walsh
4be69e41c0 Revert "Bug #8937: Extension setup functions not called on server resets"
This reverts commit 5e946dd853.

The devPrivates rework makes this workaround unnecessary.
2008-02-11 16:15:26 -05:00
Peter Hutterer
521a7f26e0 mi: Only UpdateSpriteForScreen if we actually changed the screen. (Bug #12650)
X.Org Bug 12650 <http://bugs.freedesktop.org/show_bug.cgi?id=12650>
2008-02-05 18:34:31 +10:30
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Eamon Walsh
e915a26397 xselinux: Move the extension to extmod instead of being built-in. 2008-01-25 19:22:19 -05:00
Eamon Walsh
f6a78ee143 XACE: Remove the extension code entirely, XACE is completely static now. 2008-01-25 18:04:10 -05:00
Peter Hutterer
883811c2be dix: remove inputInfo.pointer reference in TryClientEvents.
Unfortunately, this requires a change in the TCE API, and thus a change in all
callers. Tough luck.
2008-01-18 18:48:46 +10:30
Peter Hutterer
38bf01bd1c Merge branch 'master' into mpx 2008-01-10 13:38:46 +10:30
Peter Hutterer
e070c2cbef mi: change infamous "Tossed event ..." error for something more explanatory.
Few whitespace errors fixed.
Two ErrorF's prefixed with [mi].
(cherry picked from commit 117458d2db)
2008-01-09 13:42:10 +10:00
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
643c52be32 xselinux: Remove "X" prefix on remaining functions and strings.
Should be evident from the context.
2007-12-28 13:27:28 -05:00
Jeremy Huddleston
f3042a63be XQuartz: Handle Pseudorami init in miinitext
(cherry picked from commit a585c94fed)
2007-12-21 01:24:43 -08:00
Dave Airlie
6a5c3e04fa mi: set the private key to a unique non-zero value 2007-12-17 14:59:12 +10:00
Bartosz Fabianowski
5b02a6ca5b Input: Fix proximity events with valuators
Initialise num_events to 1, so we always send a proximity event, and then
optionally valuator events.  Also make sure mieq can deal with valuator
events sent after proximity events.
2007-12-14 13:15:26 +02:00
Eamon Walsh
c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Peter Hutterer
3a058456e0 mi: unify ErrorFs, prepend [mi] 2007-12-07 20:23:36 +10:30
Peter Hutterer
c5acf401da mi: unify last two ErrorF's in mieq.c 2007-12-07 20:19:43 +10:30
Peter Hutterer
117458d2db mi: change infamous "Tossed event ..." error for something more explanatory.
Few whitespace errors fixed.
Two ErrorF's prefixed with [mi].
2007-12-07 20:18:49 +10:30
Adam Jackson
fa47910045 Clean up many #if 0. 2007-12-02 12:40:25 -05:00
Peter Hutterer
a4edfbef02 mi: only call UpdateSpriteForScreen if the screen actually changed.
If we call it unconditionally, we flip the dev->spriteInfo->sprite permanently
when using XTestFakeInput (once in CheckMotion as called from the
processInputProc, another time in UpdateSpriteForScreen when we actually warp
the cursor). USFS also updates to the screen's root window unconditionally,
which is not really what we want if we haven't changed screen at all.
2007-11-24 16:16:48 +10:30
Keith Packard
33b94da632 Re-add call to XFixesExtensionInit for static servers.
This reverts a portion of bcbaf2a0ce which
removed the call to XFixesExtensionInit and some cpp lines.
2007-11-23 16:01:11 -08:00
Jeremy Huddleston
bcbaf2a0ce Darwin: Dead code removal, Code cleanup, Added launcher
Imported changes from xorg-server-1.2-apple to make master more current wrt
file layout, build system changes, and dead code removal.
2007-11-21 19:52:11 -08:00
Alan Coopersmith
a55ec1a9f4 Restore checks for __i386 where needed for Sun compilers on Solaris 2007-11-20 18:31:07 -08:00
Eamon Walsh
2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Eamon Walsh
60be452c2e xace: restore the old SaveScreens function and introduce new API, since the
old version is called from drivers...
2007-11-19 16:59:34 -05:00
Eamon Walsh
a95bb52b43 devPrivates rework: add missing include of dix/privates.h 2007-11-19 16:34:38 -05:00
Adam Jackson
748cfbc820 Disinfect mi/ of mfb. 2007-11-17 21:23:05 -05:00
Peter Hutterer
a08665d4d3 mi: don't call SwitchCoreKeyboard, we switch during event processing now. 2007-11-15 10:42:29 +10:30
Eamon Walsh
1603130236 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/xace.c
	Xext/xace.h
2007-11-14 13:35:50 -05:00
Peter Hutterer
51239f87ce dix: Send MappingNotify when keyboard maps change.
If a slave device is attached to a master device, then we need to send a
mapping notify to the client.
Mapping notify needs to be sent if
 - different slave device but on same master
 - different master

This gives you funny behaviour with the ClientPointer. When a
MappingNotify is sent to the client, the client usually responds with a
GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping,
regardless of which keyboard sent the last mapping notify request. So
depending on the CP setting, your keyboard may change layout in each app...
2007-11-13 11:26:16 +10:30
Peter Hutterer
5a7a65a3c9 mi: avoid SIGABRT by setting master_event to NULL. 2007-11-12 12:37:39 +10:30
Peter Hutterer
7a81bafc9b Xi, dix: Add ability to change MD classes + send event when doing so.
Each time a different slave device sends through a master, an
DeviceClassesChangedEvent is enqueued. When this event is processed, all
classes of the matching master device are changed, and the event is sent to
the clients.

Next time the master is queried, it thus shows the evclasses of the last slave
device. The original classes are stored in the devPrivates.

TODO: if all slave devices are removed, the master's original classes need to
be restored.
2007-11-09 23:10:24 +10:30
Ben Byer
ce7cfbe261 Fixed check to refer to DarwinApp, not all Darwin targets 2007-11-08 20:10:51 -08:00
Peter Hutterer
59b304d8a2 dix, mi: stop segfaults when a floating device emits events.
For pointers: don't try to set master->valuator fields if there is no master.
For keyboards: check if device is valid before trying to access the fields in
miPointerGetScreen (btw. this disables DGA events for floating keyboards).

Also stop the hideous number of ErrorFs if we request the paired device for a
floating dev.
2007-11-08 15:44:18 +10:30
Peter Hutterer
3063f0c667 mi: change the device id to the master devices' when duplicating the event.
Move the event duplication into a CopyGetMasterEvent(), makes the code a bit
better to read.
2007-11-08 11:51:03 +10:30
Peter Hutterer
184a7b8917 Merge branch 'mpx' into mdsd
Conflicts:

	Xi/opendev.c
2007-11-08 09:34:35 +10:30
Peter Hutterer
0b729051c0 Merge branch 'master' into mpx
Conflicts:

	Xi/extinit.c
	Xi/grabdev.c
	Xi/setmode.c
	Xi/ungrdev.c
	dix/devices.c
	dix/events.c
	dix/getevents.c
	include/dix.h
	mi/midispcur.c
	mi/misprite.c
	xkb/xkbActions.c
	xkb/xkbEvents.c
	xkb/xkbPrKeyEv.c
2007-11-07 15:37:23 +10:30
Peter Hutterer
15944b8f02 mi: duplicate event before processing it, so master has original values
Event values may get changed in the event processing stage, so we need to
duplicate it to pump different events through for slave and master device.
2007-11-07 11:33:24 +10:30
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Daniel Stone
be9ee17f96 mi: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Kristian Høgsberg
a5546a99ac Change the GLX module to initialize after COMPOSITE.
This changes the module initalization order so that the GLX module initializes
after COMPOSITE.  The reason for this change is to be able to initialize a
GLX visual config for the COMPOSITE ARGB visual.
2007-10-29 18:14:18 -04:00
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Kristian Høgsberg
7d74690536 Simplify and clean up GLX visual initialization.
Instead of the fragile setup where we filter the modes common between the
DDX generated GLX visuals and the DRI driver generated fbconfigs, we now
just take the fbconfigs returned by the DRI driver to be our supported set.
2007-10-18 21:03:43 -04:00
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Eamon Walsh
baabae623b xselinux: Started reworking extension using new XACE hooks. 2007-10-17 13:54:56 -04:00
Peter Hutterer
9aadde3779 mi: don't call UndisplayCursor for non-sprite-owners.
Segfaults are bad.
2007-10-17 12:05:50 +09:30
Peter Hutterer
8b7c4249d8 mi: call processInputProc for master devices after slave event processing.
More work is needed to sort out grabs though.
2007-10-17 10:41:58 +09:30
Peter Hutterer
de70cfdbe6 mi: fix some macros to allow multiple cursors for master devices.
Macros defaulted to inputInfo.pointe rfor devices that weren't spriteOwners.
Changed to take the device's master device now.

This includes sticking in a number of checks and warnings that cursor
rendering won't be called for floating devices.
2007-10-17 09:52:30 +09:30
Peter Hutterer
5eb033835e mi: don't exclude inputInfo.pointer from rendering. 2007-10-16 18:03:52 +09:30
Ben Byer
3d4eb17b38 mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI 2007-10-14 18:07:03 -07:00
Dodji Seketeli
81692b628f Fix #12650: "windows not receiving mouse events in multiple screens context"
* dix/events.c, include/dix.h:
	  (UpdateSpriteForScreen): added this to update the mouse sprite context
	   when we switch from a pScreen to another.
	* mi/mipointer.c:
	  (miPointerWarpCursor): as we are switching to a new pScreen,
	   don't forget to update the mouse sprite context.
2007-10-02 13:48:48 +02:00
Peter Hutterer
2b075e97ec mi: switch core keyboard on XI events, not only on core events.
We only get core events through the EQ in exceptional cases, so make sure we
actually swap the core keymap for XI events as well. Gives us back the ability
to have multiple keyboard layouts simultaneously.
2007-10-02 13:28:40 +09:30
Peter Hutterer
a511c445de Remove generation of core events, long live XI!
Let the drivers only generate XI events and put those into the event queue.
When processing events, generate core events as needed. This fixes a number of
problems with XKB and the DIX in general.

The previous approach was to put core events and XI events as separate events
into the event queue. When being processed, the server had no knowledge of
them coming from the same device state change. Anything that would then change
the state of the device accordingly was in danger of changing it twice,
leading to some funny (i.e. not funny at all) results.

Emulating core events while processing XI events fixes this, there is only one
path that actually changes the device state now. Although we have to be
careful when replaying events from synced devices, otherwise we may lose
events.

Note: XI has precedence over core for passive grabs, but core events are
delivered to the client first.

This removes the wrapping added in 340911d724
2007-09-28 18:46:41 +09:30
Peter Hutterer
340911d724 Wrap core event handling through ProcessOtherEvents.
When processing events from the EQ, _always_ call the processInputProc of the
matching device. For XI devices, this proc is wrapped in three layers.
Core event handling is wrapped by XI event handling, which is wrapped by XKB.
A core event now passes through XKB -> XI -> DIX.

This gets rid of a sync'd grab problem: with the previous code, core events
did disappear during a sync'd device grab on account of mieqProcessInputEvents
calling the processInputProc of the VCP/VCK instead of the actual device. This
lead to the event being processed as normal instead of being enqueued for
later replaying.
2007-09-26 15:12:49 +09:30
Eamon Walsh
97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Eric Anholt
b9f7aeb200 Merge remote branch 'origin/master' into paint-window
Conflicts:

	mi/miexpose.c
2007-09-13 00:15:45 +00:00
Eric Anholt
e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Keith Packard
06d27f8045 Try again to fix drawable and tile offsets in miPaintWindow
Many coordinate spaces are hard. Let's go drinking.
2007-09-12 23:57:30 +01:00
Keith Packard
dd3992eb86 miPaintWindow draw to window for background.
Instead of drawing to window pixmap for everything, draw to window for
background as that works for Xnest and Xdmx; draw to pixmap for borders
which neither of those X servers use.
2007-09-12 22:40:02 +01:00
Keith Packard
257c8ed17f Rewrite miPaintWindow to draw to window pixmap.
miPaintWindow was drawing to the root window, or (sometimes) drawing to the
window after smashing the window clip list. This is losing, and easily fixed
by just drawing to the window pixmap.
2007-09-12 12:12:22 +01:00
Eamon Walsh
47ab4d648b devPrivates rework: convert CursorRec and CursorBits over to new interface. 2007-08-30 11:40:39 -04:00
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
Eamon Walsh
8554707326 Merge branch 'master' into XACE-SELINUX
Conflicts:

	include/miscstruct.h
	mi/mibstore.c
	mi/midispcur.c
	os/Makefile.am
2007-08-28 07:25:21 -04:00
Adam Jackson
ae7f71a8b3 Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other.  Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested.  The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.

Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
2007-08-25 15:08:20 -04:00
Eric Anholt
d0dc9698ae Revert "Fix <pixman.h> include to <pixman/pixman.h>"
The pixman headers have been located under pixman-1/ instead of pixman/ since
around 2007-08-06, and pixman-1.pc has the updated include paths to account
for this.

This reverts commit feb1b3e455.
2007-08-22 09:00:45 -07:00
Alan Hourihane
feb1b3e455 Fix <pixman.h> include to <pixman/pixman.h> 2007-08-22 16:54:29 +01:00
Eamon Walsh
b82557c9fb xace: add hooks + new access codes: core protocol screensaver requests 2007-08-16 10:36:05 -04:00
Eamon Walsh
42d6112ec2 xace: add hooks + new access codes: core protocol GC requests 2007-08-14 13:09:38 -04:00
Peter Hutterer
f367285fd5 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
	dix/getevents.c
	include/dix.h
	mi/mieq.c
2007-08-12 15:31:10 +09:30
Søren Sandmann Pedersen
aa3c6aaaab Require pixman-1 0.9.4, update pixman includes to new scheme 2007-08-06 19:00:59 -04:00
Peter Hutterer
9eddede039 mieqEnqueue: Don't try to update the time for GenericEvents.
Doing so may overwrite the event's length field and cause havoc. Also check if
realloc'd memory did actually return valid pointer.
2007-08-06 15:48:22 +09:30
Eamon Walsh
d445d2f22b security: drop the "declare extension security" dix call. Use the
SecurityPolicy configuration file instead.
2007-08-03 10:56:18 -04:00
Eamon Walsh
e34fcd2bf4 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
	dix/property.c
	include/dix.h
2007-08-02 14:27:03 -04:00
Keith Packard
866f092ca0 Make Composite manual redirect windows not clip their parent.
This patch changes the semantics of manual redirect windows so that they no
longer affect the clip list of their parent. Doing this means the parent can
draw to the area covered by the child without using IncludeInferiors. More
importantly, this also means that the parent receives expose events when
that region is damaged by other actions.
2007-07-03 14:29:11 -07:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Peter Hutterer
49136d3e9f mieqEnqueue: use modulo for queue tail wrapping.
This was previously committed by Michael Daenzer, but was lost during a pull.
2007-06-27 11:58:12 +09:30
Peter Hutterer
1f97a76476 Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	hw/xfree86/common/xf86Xinput.c
	hw/xfree86/loader/xf86sym.c
	mi/mieq.c
2007-06-19 17:20:52 +09:30
Michel Dänzer
40f27a2df4 mieqEnqueue: Make local queue tail variables unsigned.
So the modulo arithmetic actually works as intended... thanks to Peter Hutterer
for pointing out the problem.
2007-06-19 09:11:16 +02:00
Eamon Walsh
e2a720c9a1 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dixutils.c
2007-06-11 15:29:11 -04:00
Michel Dänzer
30a3297fed mieq queue handling cleanups.
In particular, fix handling of wraparounds in mieqEnqueue.
2007-06-11 09:23:18 +02:00
Eamon Walsh
2a4aa63a23 Merge branch 'master' into XACE-SELINUX
Conflicts:

	include/miscstruct.h
2007-05-22 14:50:26 -04:00
Soren Sandmann Pedersen
1568b6b6a0 Port large amounts of the region code to pixman 2007-05-15 11:13:16 -04:00
Soren Sandmann Pedersen
dde0ceac4e Add new InitRegions() function called from dix/main 2007-05-15 11:13:15 -04:00
Adam Jackson
a277f04ab0 Remove mfb and cfb from include paths where they're not needed. 2007-05-11 11:43:19 -04:00
Adam Jackson
20c5250e48 Use system copy of cbrt() if available.
Also move the replacement inline into miarc.c, since that's the only user.
2007-05-11 11:43:19 -04:00
Adam Jackson
8dcc37520d Use _X_INLINE instead of ad-hoc #defines. 2007-05-11 11:43:19 -04:00
Adam Jackson
6ff239cb4e Make the use of ICEIL slightly less ugly. 2007-05-11 11:43:19 -04:00
Peter Hutterer
58c0fd2927 Adjust EQ to support long events.
Add RawDeviceEvent (pointers only for now).

This commit changes the event queue to use EventLists instead of xEvent
arrays. Only EQ is affected, event delivery still uses xEvent* (look for
comment in mieqProcessInputEvent).

RawDeviceEvents deliver driver information to the client, without clipping or
acceleration.
2007-05-02 13:50:09 +09:30
Peter Hutterer
5e43910929 Add GenericEvent extension to Xext.
This adds (unconditional) support for the GE extension. Anything from now on
that sends events in MPX will have to use the GE extension. No GE, no MPX
events. GE is not actually used yet from anywhere with this commit.

You will need to update x11proto, xextproto, libX11, libXext and xcb to the
matching xge branches. Things will _NOT_ work without the updated protocol
headers and libraries.
2007-04-30 12:57:42 +09:30
Peter Hutterer
f28eea0647 Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	dix/events.c
2007-04-27 16:34:36 +09:30
Peter Hutterer
cfc01115af Fix cursor rendering for multi-head.
Before putting anything on the screen, check if the GC was made for the
ScreenRec we want to render to. If not, toss the GC and create a new one. This
is not the best solution but it does the job for now. Same thing for ARGB
cursors except that it's even uglier.

Also remember the screen the cursor was rendered to and check for the right
screen in the BlockHandler, SourceValidate and a few others. Only remove or
restore the cursor if we are rendering to the same screen, otherwise we get
artefacts that are both funky and really annoying.
2007-04-26 22:18:35 +09:30
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
Keith Packard
806a537e64 Revert "Suppress software cursor removal during rotated shadow buffer drawing."
This reverts commit 999b681cf3.
Replacing this with simpler code that just disables SourceValidate
during rotation redisplay.
2007-04-19 17:49:34 -07:00
Eric Anholt
999b681cf3 Suppress software cursor removal during rotated shadow buffer drawing. 2007-04-18 14:33:27 -07:00
Eric Anholt
5d8e8a7f4b Remove libminimi build.
It appears to have been a leftover of a previous incarnation of the build
system that didn't handle miinitext.c well.
2007-04-18 13:22:26 -07:00
Eamon Walsh
1f06d32ef5 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/privates.c
2007-04-17 12:10:22 -04:00
Peter Hutterer
d4dad6f84f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/events.c
	hw/xfree86/common/xf86Xinput.c
2007-04-12 11:11:03 +09:30
Daniel Stone
e49f836d6f mieq: Use larger default queue size
Use a default queue size of 512 rather than 256, else Xephyr is too slow
without a host cursor, so events get stuck in the queue.
2007-04-10 23:58:20 +03:00
Stefan Huehner
1f6741db19 Bug #10560: Code-Cleanup: function declarations () -> (void)
X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560>
Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
2007-04-09 14:33:15 -07:00
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
5c4deb71a1 Synthesize WarpPointer events for the actual device rather than the VCP. 2007-04-05 14:21:46 +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
Eamon Walsh
0331c6a8fc Merge branch 'master' into XACE-SELINUX 2007-03-26 10:28:05 -04:00
Adam Jackson
af769892a9 Static and dead code cleanup from mi/ 2007-03-25 17:56:32 -04:00
Adam Jackson
9a0f25de7c Static cleanups, dead code deletion. 2007-03-25 12:27:01 -04:00
Peter Hutterer
5f9c10e8da Clean up DeviceIntPtr, prepare for Server 1.4 ABI. Move sprite-related
information into a new SpriteInfoRec, remove isMPDev flag.
2007-03-25 15:00:03 +09:30
Daniel Stone
80d29475b9 mieq: Allow event handlers for arbitrary events to be set
Allow arbitrary events to use mieq by letting custom handlers be set.
2007-03-21 00:10:38 +02:00
Peter Hutterer
015d728bcd Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	dix/events.c
	mi/misprite.c
2007-03-19 09:42:56 +10:30
Peter Hutterer
4054834965 mi: remove 'register' keywords. 2007-03-09 14:16:23 +10:30
Peter Hutterer
537bc2ead4 Xi: Don't deactivate core grabs from non-core button/key releases.
dix:    set coreGrab flag for grabs caused by GrabPointer and button presses.
        remove virtual core devices from device list, only real devices are in
        the list now.
        Auto-pair each keyboard with a real pointer if one is available,
          provides multiple keyboards automatically after startup if devices
          are configured.
        fix GuessFreePointerDevice() to do what it's supposed to do.

mi:     fix: call miPointerMove from miPointerWarpCursor.
        fix: remove unused id field from miCursorInfoRec
        don't update sprite for virtual core pointer.
2007-03-07 18:19:20 +10:30
Eamon Walsh
23fc429aad Merge branch 'master' into XACE-SELINUX 2007-03-05 12:18:54 -05:00
Peter Hutterer
1f0075786f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/getevents.c
	hw/xfree86/ramdac/xf86Cursor.c
	mi/mipointer.c
	xkb/xkbUtils.c
2007-03-05 12:37:17 +10:30
Ben Byer
d287b76471 cleaned up some linking ugliness in hw/darwin/quartz 2007-02-17 03:47:42 -08:00
Ben Byer
cf4994b0db dix mods for Darwin 2007-02-17 01:21:43 -08:00
Peter Hutterer
37fe4c49dc mi: Move WarpPointer event generation to miPointerMove to avoid duplicate
events, cache event array allocation.
2007-02-16 09:57:57 +10:30
Eamon Walsh
04632835b7 Merge branch 'master' into my-XACE-SELINUX 2007-02-15 09:27:05 -05:00
Peter Hutterer
d570ff7c81 fix: WarpCursor needs to send MotionNotify. 2007-02-15 10:28:55 +10:30
Peter Hutterer
33ef546b94 dix: Clean up GetPointerEvents. If pDev == inputInfo.pointer, assume that
we do not want Xi events.

mi:     Remove POINTER_CORE_ONLY flag.
2007-02-14 11:18:43 +10:30
Peter Hutterer
7cd73b00a2 dix: If POINTER_CORE_ONLY is set, GetPointerEvents() only creates a core event
mi:	fix: Create motion event in miPointerMoved
2007-02-05 14:48:48 +10:30
Peter Hutterer
a309c936bb xkb: Daniel's patch to stop evdev keyboard segfaults.
mi:	Remove quickfix from ba547d4f6a
2007-02-05 11:38:44 +10:30
Peter Hutterer
f3418b52dc mi: Fix cursor rendering issues. 2007-01-29 16:10:03 +10:30
Peter Hutterer
15a81b6325 Merge branch 'master' 2007-01-28 17:18:57 +10:30
Peter Hutterer
ba547d4f6a mi: Quick fix to stop segfault on non-core keyboards. 2007-01-12 14:42:02 +10:30
Peter Hutterer
5e2f8dee63 mi: remove core pointer special handling. No event has core pointer as
device now.

dix:    zero pSprite memory, stop segfaults on server restart.
2007-01-11 14:05:39 +10:30
Fredrik Höglund
3b5b7ef5c2 Move the code for resetting the DPMS mode in response to input events,
from WaitForSomething to mieqProcessInputEvents.

mieqProcessInputEvents already handles resetting the screen saver.
2007-01-03 21:05:35 +01: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
03c554283e mi: removing MPX ifdefs
global sprite renaming in mipointer and misprite
	fixed: multiple remove cursor call in miSpriteInstallColormap
	fixed: wrong core pointer usage in miSpriteStoreColors

dix:    bugfix in CheckCursorConfinement
	removing MPX ifdefs
	removing MPX event generation (using Xi solely now)
	bugfix GrabDevice: uninitialized field in grab struct caused segfault

xfree86: removing MPX fdefs

Xi:     removing MPX protocol events
2006-12-18 15:33:54 +10:30
Peter Hutterer
a96788058e mi: removing MPX ifdefs
global sprite renaming in mipointer and misprite
	fixed: multiple remove cursor call in miSpriteInstallColormap
	fixed: wrong core pointer usage in miSpriteStoreColors

dix:    bugfix in CheckCursorConfinement
	removing MPX ifdefs
	removing MPX event generation (using Xi solely now)
2006-12-14 10:50:18 +10:30
Eamon Walsh
a7f4bbea87 Add SELinux extension to the module/extension loader. 2006-12-12 13:27:02 -05:00
Peter Hutterer
afd6af6551 mpx: Infrastructure for MPX extension, GetExtensionVersion request works. 2006-11-29 17:55:15 +10:30
Peter Hutterer
bdf718907b dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX
mi:	missing include in misprite.c ifndef MPX
2006-11-28 18:06:34 +10:30
Peter Hutterer
e88bc0e55a mi: Bugfix: FreeCursor ignores negative refcounts.
mieq:   Bugfix: Motion notifies did overwrite DeviceMotionNotifies
2006-11-28 14:34:36 +10:30
Peter Hutterer
85ea408e38 mi: malloc checks for misprite and midispcur, code cleanup
removed IsMPDev()
2006-11-27 18:07:16 +10:30
Peter Hutterer
023da4e804 mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor()
instead of IsMPDev()
2006-11-27 15:54:33 +10:30
Peter Hutterer
a2340a7368 mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case
of errors.
	Some copyright notices.
	misprite.c passes DeviceIntPtr around and down to DC (previously
	miCursorInfoPtr and the plain device id).
	Large cleanup in misprite.c to avoid code duplication.
2006-11-27 14:47:23 +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
f52d53e060 dix: DeliverEventsToWindow adjusted for MPX
mi:     sprite debugging disabled
2006-11-22 17:58:57 +10:30
Peter Hutterer
70383105de mi: added DevToSprite() conversion function
fixed miSpriteRealize to use passed pDev argument instead of looping.

dix:    changed sprite dependency and added MPX functionality to parts of
        events.c (XineramaChangeToCursor, XineramaCheckPhysLimits,
        XineramaConstrainCursor)

Xi:	fix: accessing other->buttons for keyboard segfaulted the server
2006-11-22 15:27:16 +10:30
Peter Hutterer
efd4f3c6ff dix: WindowsRestructured() calls CheckMotion() on all devices
mi:	core pointer was checked twice in miSpriteReportDamage,
	miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas
	and miSpriteRealiseCursor
	using damage bug (see comment in file) to avoid artefacts
2006-11-21 20:31:30 +10:30
Peter Hutterer
9db851c22d dix: moved sprite from static to be pointer of type SpritePtr
added SpriteRecs for MPX devices
	changed sprite dependency and added MPX functionality to parts
	of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion,
	CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits,
	PointerConfinedToScreen)
	added DeviceIntRec param to GetSpritePosition(). This required some
	minor changes in ddx, xtest, xkb and xfixes.

mi:	changed miPointer to pointer instead of static struct.
2006-11-21 18:15:04 +10:30
Peter Hutterer
447efdc01d mi: constrain MPX cursors to screen 2006-11-21 14:46:00 +10:30
Peter Hutterer
1107d8bea2 mi: added device ID to miSpriteCursorFuncRec functions
added MPX code to midispcur.c

BUG:   Core pointer changes whenever MPX cursor changes shape.
2006-11-21 14:00:46 +10:30
Peter Hutterer
3bad452d12 mi: added MPX to miSpriteReportDamage
added id field to miCursorInfoPtr, required to pass through to miDC
        core pointer uses mpCursors array as well.
        added miDCBufferRec for future use with MPX

TAG: MPX_BEFORE_MIDC_API_BREAK
2006-11-21 11:26:21 +10:30
Peter Hutterer
b1bbdf464d mi: added MPX to miSprite functions.
NOTE: This version will render multiple cursors but with an artefact each time
when devices alternate.
2006-11-20 17:58:30 +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
Peter Hutterer
5388423eb0 mieq: EQ processing handles MP devices
global: MPX define added to xorg-server.h.in

xfree86/common: small fix to avoid byte overflow
2006-11-16 20:43:27 +10:30
Peter Hutterer
c957a16180 dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents()
mieq:   avoid merging events from different devices in mieqEnqueue()

xfree86/common
        isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent()
        and xf86PostButtonEvent()
2006-11-16 15:11:14 +10:30
Daniel Stone
c3ea1f7db4 dix/mi: still more warning fixes
Fix up prototypes for PrintChildren and PrintWindowTree in the dix.
Make miPrintRegion be unconditionally defined, and move the prototype into
regionstr.h.
Change a bunch of ScreenPtr pScreen = foo; to
ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable
references (as inline REGION_* doesn't reference pScreen).
2006-11-08 15:29:16 +02:00
Daniel Stone
c51fadc07d mieq: annotate with some more comments 2006-11-08 15:29:15 +02:00
Eamon Walsh
5e946dd853 Bug #8937: Extension setup functions not called on server resets 2006-11-07 13:50:19 -05:00
Daniel Stone
a5be654017 mieqEnqueue: only compare DEVICE_BITS of deviceid
Only compare DEVICE_BITS of the two deviceids, so we don't decide that
a valuator event isn't for us, because (id | MORE_EVENTS) != id.
2006-10-27 01:25:21 +03:00
Daniel Stone
3da918a16c mipointer: remember to update pointer location
Update pointer location so it doesn't get quickly reset by the next
pointer update.
2006-10-25 02:22:07 +03:00
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
4dd91c45ab miinitext: Xi and XKB are not hardware-only extensions
Xi is now a required extension, and XKB can be used without hardware,
so include them both when NO_HW_ONLY_EXTS is defined.
2006-10-23 02:50:03 +03:00
Daniel Stone
77e724585f minor formatting fixes 2006-10-22 11:45:12 +03:00
Daniel Stone
aeba855b07 move keymap copy to event processing, from enqueuing
Move the keymap copying to event processing time (in
ProcessInputEvents), instead of being at event enqueuing time.
Break SetCore{Pointer,Keyboard} out into separate functions.
Change mieqEnqueue to take a device pointer, that asks for the
_original_ device associated with this event.
2006-10-20 00:43:11 +03:00
Daniel Stone
335b503c5e Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-10-13 18:10:45 +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
Daniel Stone
2cf1098436 dix/events, mi/eq: remove utterly ridiculous debugging
Remove debugging which can cause long-lived Xorg logs to grow well above 1GB
if built with --enable-debug.
2006-09-30 17:05:46 +03:00
Eamon Walsh
49a70c8570 Merge branch 'master' into my-XACE-modular 2006-09-15 15:26:57 -04:00
Daniel Stone
5e9d33fe87 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-09-07 15:43:31 +03:00
Michel Dänzer
8356be492c Make sure _XSERVER64 is defined when it should be and gets tested. 2006-09-06 15:20:55 +02:00
Alan Coopersmith
c2535f6792 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular 2006-08-10 10:37:59 -07:00
Daniel Stone
5c7001fef8 memcpy() events in
memcpy events into our event structure instead of doing pointer assignment.
2006-08-07 16:51:09 +03:00
Daniel Stone
a406f6bfea mieq: don't leak events
free all events posted through mieqEnqueue.
2006-08-04 12:40:19 +03:00
Daniel Stone
7465010d59 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-07-21 19:05:41 -04:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00