Commit Graph

179 Commits

Author SHA1 Message Date
Adam Jackson
7c0709a736 requestingClient is an xprintism, hide it for other servers. 2008-02-14 07:11:52 +11:00
Adam Jackson
aa5216e897 Rip out useless indirection in the callback list management. 2008-02-14 07:02:13 +11: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
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
Peter Hutterer
f44d7dcb5f dix: change the filters to be per-device.
If we have one global filter, one pointer may change the filter value and
affect another pointer.

Reproduceable effect:
blackbox and xterm, start dragging xterm then click anywhere with the other
pointer (attached to different masterd device!).  The button release resets
the filter[Motion_Filter(button)] value, thus stopping dragging and no event
is sent to the client anymore.
Having the filters set per device gets around this.
2007-12-04 19:07:46 +10:30
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
Adam Jackson
20fd478324 Small static cleanups on dix/ 2007-11-15 17:01:33 -05:00
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
Eamon Walsh
825f09dffd xace: Still more changes to selection code. Removed the SelectionPtr from
the hook - the hook only needs the Atom to control access to the selection
object.  Upgraded the SelectionCallback to take a client argument and
additional type codes so that it can be used for redirection.
2007-10-23 17:12:57 -04:00
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04: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
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
Eamon Walsh
9bd04055a2 xace: change prototype of VALIDATE_DRAWABLE_AND_GC macro to allow access
mode to be passed to dixLookupDrawable.
2007-09-25 09:33:51 -04:00
Peter Hutterer
c4db4d1fcf include: remove register keywords. 2007-09-24 12:37:59 +09:30
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Eamon Walsh
42d6112ec2 xace: add hooks + new access codes: core protocol GC requests 2007-08-14 13:09:38 -04:00
Eamon Walsh
9a183d7ba5 dix: remove caching of drawables and graphics contexts. The security checks
simply bypass the cached values so they are unused.
2007-08-14 11:39:26 -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
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
Daniel Stone
62ec6d09b3 dix.h: Remove duplicate ffs() prototype. 2007-08-01 01:53:31 +03:00
Peter Hutterer
5ccc09b182 Use the same struct for generic event masks throughout the code.
Renaming those structs too.

Previously grabs were using a different struct than windows, which was
reasonably stupid.
2007-07-06 15:43:08 +09:30
Peter Hutterer
9e257029c7 Add implicitGrab field to GrabInfoRec.
Is set when passive grab is implicit as result of a ButtonPress event. If this
is the case, we need to store the XI mask as well as the core mask to ensure
delivery of XI events during the grab's lifetime.

Remove all core grabs on other devices when client issues a GrabPointer or
GrabKeyboard request. Let's assume that the client really only wants one
device to interact, so this seems like a reasonable solution.
2007-06-19 11:28:07 +09:30
Peter Hutterer
a8c56372ba Revert "Allow events to grabWindows event if the device is not grabbed."
This reverts commit 339b73e710.
Allowing those events can lead to race conditions.

Conflicts:

	dix/events.c
2007-05-15 10:24:22 +09:30
Peter Hutterer
81fc6a128b Add ungrab support to ExtendedGrabDeviceRequest handling.
Polish the code a bit.
2007-05-14 18:12:56 +09:30
Peter Hutterer
4dc973f08c Add ExtendedGrabDevice handling.
Add XGE handling in DeliverGrabbedEvent.

We can now grab something selecting XGE events, but the current code is a
bit messy and doesn't work too well yet.
2007-05-14 10:42:03 +09:30
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
339b73e710 Allow events to grabWindows event if the device is not grabbed.
This kinda makes popup windows useable if the WM doesn't set the
ClientPointer. Kinda.
2007-04-27 13:24:27 +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
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
Eamon Walsh
ed75b05651 dix: add new, combined resource lookup function. Move all dix lookup API
deprecated so far to a new file dix/deprecated.c.  Remove the deprecation
warnings for the time being.
2007-04-04 16:00:15 -04:00
Peter Hutterer
9b0b340668 Make GrabDevice differ between core grabs and device grabs. 2007-04-03 15:06:26 +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
Eamon Walsh
f7c5aa0dc0 Remove dead NEED_DBE_BUF_BITS code. 2007-03-26 10:21:44 -04:00
Adam Jackson
4b5802ddbd General DIX static and dead code cleanup. 2007-03-25 17:57:54 -04:00
Peter Hutterer
65b0eb60b0 Xi: move IsPointerDevice into dix.
dix:    IsPointerDevice and IsKeyboardDevice, use same ways to identify type
        of device as XI does for the XListInputDevices reply.
        Autopair each non-pointer device with VCP when activating, pair with
        real device after activation.
        Don't return non-keyboard devices when calling GetPairedKeyboard or
        PickKeyboard, otherwise we segfault for 'evdev brain'.
2007-03-16 15:52:24 +10:30
Peter Hutterer
577464af43 dix: restore commit b3b2a6a0d4 that for some
reason got wiped.
        fix ProcGrabKeyboard to use PickKeyboard
        fix PickKeyboard to actually work.
2007-03-09 17:13:05 +10:30
Peter Hutterer
07806f4081 Xi: Add SetClientPointer request handling. 2007-03-09 15:45:25 +10:30
Peter Hutterer
b3b2a6a0d4 dix: Check if client has a grab on any other device before mouse/kbd
event is delivered to the client. Client's don't cope well with
        receiving core events from other devices when having a grab on a
        pointer or keyboard.
2007-03-08 22:16:17 +10:30
Peter Hutterer
ceca5670fe dix: Each device needs to differ between a core grab and an XI grab,
otherwise a Xi grab may overwrite or release a core grab.
        Replace grab and associates with coreGrab and deviceGrab structures,
        adjust rest of dix/Xi/etc to compile.

xfree86: Don't check for core devices, we'll have the virtual ones anyway.
         If we check, the first mouse device is duplicated and sends
         double events.
2007-03-08 17:17:23 +10:30
Eamon Walsh
aaef4d6a41 devPrivates rework: move reset functions into a single call. 2007-03-07 09:57:02 -05:00
Peter Hutterer
e43b8a4e40 dix: Add ClientPointer to client, used for picking which pointer to use in
ambiguious request. PickPointer and PickKeyboard are used for getting
        the appropriate pointer when situation is unclear.
        Fix some issues with InitializeSprite.

dix, xfree86: Remove last traces of InitSprite.
2007-03-02 15:21:46 +10:30
Peter Hutterer
f6c3b9fa97 xfree86: mouse and keyboard hotplugging support. New mouse devices will get
new cursors,  keyboard devices use VCP's focus until paired.
2007-02-15 13:51:20 +10:30
Peter Hutterer
202b46eb6b xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default
to MP devices.

Xi:	Adding QueryDevicePointer request/reply
	Adding WarpDevicePointer request/reply
2006-12-20 13:05:53 +10:30
Peter Hutterer
2d0a63126b Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver 2006-12-19 10:31:40 +10:30
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
Eamon Walsh
ab1d5b0c31 Convert callers of LookupClient() to dixLookupClient(). 2006-12-15 17:26:58 -05:00
Eamon Walsh
9e32bf98bc Remove now-unused macro definitions from dix.h. 2006-12-14 19:31:58 -05:00
Eamon Walsh
00f0705b3b Remove instances of macros SECURITY_VERIFY_GEOMETRABLE and SECURITY_VERIFY_GC. 2006-12-14 19:15:21 -05:00
Eamon Walsh
60cdc592fe Add new, combined dix lookup functions. 2006-12-14 14:46:03 -05:00
Eamon Walsh
6c46645cfc Naming change: Security*Access -> Dix*Access 2006-12-14 14:45:42 -05:00
Peter Hutterer
ae3c24da34 dix: Moving SpriteRec into DeviceIntRec
removing global sprite structure
	beginning to remove MPX ifdefs

xnest:  Fix to make xnest compile again
2006-12-11 18:09:59 +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
8c16f21d5d dix GetSpriteWindow() adjusted for MPX
added device dependency for MPX to DoEnterLeaveEvents,
	EnterLeaveEvents, EnterNotifies, LeaveNotifies and
	FixUpEventFromWindow.
2006-11-22 17:06:47 +10:30
Jurij Smakov
acb5ff4c73 ffs: handle 0 argument (bug #8968)
Handle an argument of 0 in ffs(), instead of looping indefinitely.
Add an ffs prototype to dix.h, and add includes to ffs.c.
(cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit)
2006-11-11 14:13:56 +02:00
Daniel Stone
3a9b964258 dix: add missing prototypes
Add missing prototype for ffs, and include headers from ffs.c.
Move PostSyntheticMotion prototype to input.h.
2006-11-08 15:29:16 +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
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Tilman Sauerbeck
63f13e01ee Bug #7097: do case-insensitive comparison for some hotkeys.
xkb's strcasecmp implementation has been moved to the dix so it's now
safe to just use strcasecmp().
2006-07-08 11:33:44 +02:00
Eamon Walsh
37f0ae0245 Replace XC-SECURITY code with XACE security hooks
(cherry picked from 8526cd6395 commit)
2006-06-19 17:09:37 -07:00
Greg Kroah-Hartman
494895e0fb Properly define dispatchExceptionAtReset to fix compiler warnings 2006-06-08 09:43:44 -07:00
Greg Kroah-Hartman
78f4ab6b89 Fix compiler warning about undefined ReinitializeRootWindow function 2006-06-07 14:12:40 -07:00
Greg Kroah-Hartman
cc465800dd Fix compiler warnings about SetVendorRelease and SetVendorString 2006-06-07 14:03:35 -07:00
Daniel Stone
a9ed5a8790 Kill LBX, too. 2006-06-01 22:06:41 +00:00
Daniel Stone
825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +00:00
Daniel Stone
e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Harold L Hunt II
6700847458 Fix comments for pointers in parameter lists to work with fussy compilers 2005-05-02 22:01:08 +00:00
Kevin E Martin
813d75f9d3 Use LibraryTargetName when not building a loadable server
Move extern function declarations to window.h
Cleaned up code since client's saveSet is no longer defined as a pointer*
Added externs back in
Change #if to #ifdef to fix compiler warning
Add function declarations that were inadvertently removed by previous check
    in
Disable extensions that are not (yet) supported by DMX
2004-07-29 23:43:40 +00:00
Stuart Kreitman
e1281790bb Integration of DAMAGE-XFIXES branch to trunk
https://freedesktop.org/bugzilla/show_bug.cgi?id=859
Modified Files: cursorstr.h dix.h dixstruct.h regionstr.h window.h
2004-07-29 18:16:56 +00:00
Alexander Gottwald
ed7f92e791 Bug 778: add ddxBeforeReset 2004-06-21 13:44:14 +00:00
Egbert Eich
2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
d568221710 XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
Kaleb Keithley
ded6147bfb R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00