Commit Graph

431 Commits

Author SHA1 Message Date
Peter Hutterer
a88386ee27 Xi: only DeliverFocusedEvents if the event is not a pointer event.
A pointer device may have a focus class, but even if so, pointer events must
be delivered to the sprite window, not the focus window.
2008-04-10 14:42:26 +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
Thomas Jaeger
37b1258f0a XKB: Fix processInputProc wrapping
If input processing is frozen, only wrap realInputProc: don't smash
processInputProc as well.  When input processing is thawed, pIP will be
rewrapped correctly.

This supersedes the previous workaround in 50e80c9.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-01 15:31:50 +03:00
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
Matthieu Herrb
db248ffb84 test for the presence of pci_system_init_dev_mem() before calling it.
This avoids creating a dependency on -current libpciaccess for
BSD systems other than OpenBSD (which don't otherwise need it).
2008-03-16 18:46:11 +01:00
Kristian Høgsberg
c7536f4b87 Silence REGION_INIT() warning.
Evaluating the address of a BoxRec as a boolean gives this warning:

  i830_driver.c:2317: warning: the address of 'ScreenBox' will always
  evaluate as 'true'

which is pretty annoying.  This patch compares the address to NULL to
avoid the pointer->bool conversion and gets rid of the warning.  Seems
like a lame hack, but the warning is worse.
2008-03-11 13:18:01 -04:00
Kristian Høgsberg
cc05255191 Make WriteToClient take a const void * like any decent IO write function.
Enough with the casting.  Doesn't break API or even ABI, but does make
a lot of silly casts superfluos.
2008-03-11 00:56:17 -04:00
Adam Jackson
34b69e3bc0 Fix distcheck.
(cherry picked from commit 2a47accff8)
2008-03-05 23:57:15 -05: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
Eamon Walsh
34bf308a9e dix: Refactoring of selection code to allow for polyinstantiation.
Introduces dixLookupSelection() API.
Removes NumCurrentSelections from API.
2008-02-29 18:01:37 -05:00
Eamon Walsh
d5715f7bea dix: Refactoring of property code to allow for polyinstantiation.
Introduces dixLookupProperty() API.
2008-02-29 18:01:37 -05:00
Peter Hutterer
27b2127893 Xi: remove ungrab handling of ExtendedUngrabDevice request.
This can be done by UngrabDevice, no need for separate codepaths.
2008-02-25 17:00:42 +10:30
Eamon Walsh
f343265a28 XACE: Make the default window background state configurable per-window.
To recap: the original XC-SECURITY extension disallowed background "None" if
the window was untrusted.  XACE 1.0 preserved this check as a hook function.
XACE pre-2.0 removed the hook and first abolished background "None entirely,
then restored it as a global on/off switch in response to Bug #13683.
Now it's back to being per-window, via a flag instead of a hook function.
2008-02-20 15:59:40 -05:00
Eamon Walsh
7c2f0a8bef Remove COMPOSITE ifdefs around WindowRec bitfield as it has no ABI effect. 2008-02-20 15:59:39 -05:00
Peter Hutterer
74628d6397 dix: change GetEventList to return length of list and set parameter in place.
Changing DDXs to use new prototype too.
2008-02-19 16:53:15 +10:30
Peter Hutterer
77dba004a9 dix: add InputEventListLen and SetMinimumEventSize
The latter is used to increase the amount of allocated memory for the event
list. This will be needed for ClassesChangedEvents that can be of more or less
arbitrary size (larger than 32 anyway).
2008-02-19 15:52:35 +10:30
Peter Hutterer
3fe64d8d27 Move input event list initialisation and storage from DDX to DIX.
Rather than letting the DDX allocate the events, allocate them once in the DIX
and just pass it around when needed.

DDX should call GetEventList() to obtain this list and then pass it into
Get{Pointer|Keyboard}Events.
2008-02-18 18:46:01 +10:30
Daniel Stone
fbd7768946 XKB: Ditch XkbFileInfo
Sorry about the megacommit, but this touches on a lot of stuff.

Get rid of XkbFileInfo, which was pretty seriously redundant, and move the
only useful thing it had (defined) into XkbDescRec.  defined will be removed
pretty soon anyway.  Is the compat map pointer non-NULL? Then you have a
compat map, congratulations! Anyhow, I digress.

All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_
XkmReadFile, which returns an XkbDescPtr *, because people want to deal in
XkbDescPtrs, not XkbDescRecs.
2008-02-17 22:52:08 +02:00
Daniel Stone
ab79110a84 XKB: Remove support for pre-built keymaps
Don't load prebuilt keymaps anymore.
2008-02-17 22:52:07 +02:00
Daniel Stone
1332343910 XKB: Remove usage of client-side types
Since we're no longer sharing with Xlib, don't pass Displays and XPointers
everywhere.
2008-02-17 22:52:07 +02:00
Daniel Stone
0f12a448dc XKB: Deprecate XKBSRV_NEED_FILE_FUNCS
There's no point in having the function definitions be conditional, so
whatever.
2008-02-17 22:52:07 +02:00
Daniel Stone
68bd7ac193 XKB: Move headers into the server tree
We need to start breaking the XKB API to enforce sanity, so drag whichever
headers we need to do so into the server tree, as the client API is set in
stone, being part of Xlib.
2008-02-17 22:52:07 +02:00
Daniel Stone
e4eb7e5842 XKB: Delete xkberrs.c
Get rid of the XKB errors code to save a bunch of space.
2008-02-17 22:52:06 +02:00
Kristian Høgsberg
b71dc54352 Add DRI2 module. 2008-02-14 19:53:49 -05:00
Adam Jackson
238b816469 X.Org Group -> X.Org Foundation 2008-02-14 07:51:19 +11:00
Adam Jackson
7c0709a736 requestingClient is an xprintism, hide it for other servers. 2008-02-14 07:11:52 +11:00
Adam Jackson
eb8dc11d19 Remove some MAX* #defines that never get used. 2008-02-14 07:11:07 +11:00
Adam Jackson
aa5216e897 Rip out useless indirection in the callback list management. 2008-02-14 07:02:13 +11:00
Peter Hutterer
ba315ae5dd Xi: add XACE hooks for device creation (ChangeDeviceHierarchy)
AddInputDevice checks for permissions already, so all we do is modify a few
callers to let AID sort it out.
2008-01-21 23:44:07 +10:30
Peter Hutterer
8949d81a3c include: mark CoreProcessPointerEvent, CoreProcessKeyboardEvent as deprecated.
ProcessOtherEvent does all the work now.
2008-01-18 19:45:54 +10:30
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
4e85c7c322 Xi: keep a counter of buttons down to avoid duplicate press/release events.
If two devices are attached to the same master device, pressing button 1 on
each of them leads to two button presses from the same device. Some apps
really don't like that.

So we just put a counter in place and only send the first press and the last
release.
2008-01-09 17:36:39 +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
50e80c3987 include: never overwrite realInputProc with enqueueInputProc. Bug #13511
In some cases (triggered by a key repeat during a sync grab) XKB unwrapping
can overwrite the device's realInputProc with the enqueueInputProc. When the
grab is released and the events are replayed, we end up in an infinite loop.
Each event is replayed and in replaying pushed to the end of the queue again.

This fix is a hack only. It ensures that the realInputProc is never
overwritten with the enqueueInputProc.

This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511)
(cherry picked from commit eace88989c)
2007-12-19 19:10:08 +10:30
Peter Hutterer
eace88989c include: never overwrite realInputProc with enqueueInputProc. Bug #13511
In some cases (triggered by a key repeat during a sync grab) XKB unwrapping
can overwrite the device's realInputProc with the enqueueInputProc. When the
grab is released and the events are replayed, we end up in an infinite loop.
Each event is replayed and in replaying pushed to the end of the queue again.

This fix is a hack only. It ensures that the realInputProc is never
overwritten with the enqueueInputProc.

This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511)
2007-12-19 16:20:36 +10:30
Otavio Salvador
ff5abc72fc registry: XREGISTRY_UNKNOWN needs to be defined even if XREGISTRY isn't enabled
In case XREGISTRY isn't enabled, XREGISTRY_UNKNOWN is used but it's
not being available. It's now always available.
2007-12-14 23:10:13 -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
Jeremy Huddleston
0ad1c359c5 Darwin: Use __APPLE__ instead of __DARWIN__
(cherry picked from commit 54654815fa)
2007-12-07 18:54:58 -08:00
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
Peter Hutterer
004876355b dix: Remove RegisterPairingClient and UnregisterPairingClient. 2007-12-03 14:32:23 +10:30
Adam Jackson
fa47910045 Clean up many #if 0. 2007-12-02 12:40:25 -05:00
Eamon Walsh
996b621bec registry: swap out the DTRACE XErrorDB stuff for the new registry call. 2007-11-26 15:59:44 -05:00
Eamon Walsh
54cb729ecc registry: Add a call for DTRACE compatibility. 2007-11-26 15:59:01 -05:00
Eamon Walsh
decd5a7c60 registry: Rebase registry to use the server config file of protocol names. 2007-11-26 15:26:49 -05:00
Eamon Walsh
c0f9e204ba registry: rename the SERVERCONFIGdir and relocate it to /usr/lib/xorg
by default.
2007-11-26 15:24:15 -05:00
Peter Hutterer
f9269bebae DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec.
We free the ValuatorClassRec quite regularly. If a SIGIO is handled while
we're swapping device classes, we can bring the server down when we try to
access lastx/lasty of the master device.
2007-11-22 17:30:14 +10:30
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