Commit Graph

90 Commits

Author SHA1 Message Date
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
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
Benjamin Close
660739c6bc dix: Handle the case where a device cursor was removed correctly
In the case that the device cursor was the first in the list of cursors
the window knew about, unsetting the cursor could lead to a segfault
due to pPrev being NULL. Instead catch the condition and correctly remove
the node from the list. Since there is no cursor now set on the device,
we simply return success as the parent windows cursor will propogate
down later.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-18 16:39:19 +10:30
Adam Jackson
b740b865e4 Silence an error message in ConfigureWindow that never happens. 2008-02-14 07:51:33 +11:00
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Kristian Høgsberg
a6a7fadbb0 Don't break grab and focus state for a window when redirecting it.
Composite uses an unmap/map cycle to trigger backing pixmap allocation
and cliprect recomputation when a window is redirected or unredirected.
To avoid protocol visible side effects, map and unmap events are
disabled temporarily.  However, when a window is unmapped it is also
removed from grabs and loses focus, but these state changes are not
disabled.

This change supresses the unmap side effects during the composite
unmap/map cycle and fixes this bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=488264

where compiz would cause gnome-screensaver to lose its grab when
compiz unredirects the fullscreen lock window.
2008-01-16 21:56:08 -05: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
97c82ce051 XACE: Restore the old background None behavior in response to bug #13683.
From the X11 protocol spec:

"If background None is specified, the window has no defined background."

This means that toolkits and apps cannot rely on the "transparent" nature
of the current implementation!  At some point before the next release,
XACE will switch back to a solid background as the default.
2007-12-17 23:12:01 -05: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
09c0c1a3cc dix: remove #ifdef XINPUT.
No escaping XINPUT anymore.
2007-12-04 16:51:52 +10:30
Adam Jackson
fa47910045 Clean up many #if 0. 2007-12-02 12:40:25 -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
Peter Hutterer
cb75f09146 dix: calloc root window's Generic Event mask, stops segfaults. 2007-11-09 14:31:41 +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
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
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
Eamon Walsh
e3a8cbe523 xace: add creation/labeling hook to CreateRootWindow(). 2007-10-17 13:48:44 -04:00
Peter Hutterer
8b508f5d6b dix: unify ErrorFs. prepend all with [dix]. 2007-09-26 15:19:53 +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
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
Eamon Walsh
0003ccfcdf xace: add new fields to resource access hook to allow parent resource objects
to be passed in at create time.  Also added a missing devPrivates initializer.
2007-09-05 11:18:36 -04:00
Eamon Walsh
1005b29cc6 xace: Correct some access modes. 2007-08-30 14:48:24 -04:00
Eamon Walsh
e39694789e xace: drop map-window checking hook, add new hooks for controlling the
delivery of events to windows and clients.

This is tentative.  It's likely that an additional last-resort hook will
be necessary for code that calls TryClientEvents or WriteEventsToClient
directly.  It's also possible that new xace machinery will be necessary
to classify events and pull useful resource ID's out of them.

The failure case also needs some thinking through.  Should event delivery
"succeed" or should it report undeliverable?

Finally, XKB appears to call WriteToClient to pass events.  Sigh.
2007-08-29 14:16:46 -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
Eamon Walsh
b82557c9fb xace: add hooks + new access codes: core protocol screensaver requests 2007-08-16 10:36:05 -04:00
Eamon Walsh
dc84bb3418 xace: add hooks + new access codes: core protocol cursor requests 2007-08-15 14:13:53 -04:00
Eamon Walsh
2763056ab5 xace: add hooks + new access codes: core protocol window requests 2007-08-13 13:44:33 -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
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
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
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
Eamon Walsh
9cee4ec5e6 xace: change the semantics of the return value of XACE hooks to allow
arbitrary X status codes instead of just TRUE/FALSE.

The dix layer in most cases still does not propagate the return value of
XACE hooks back to the client, however.  There is more error propagation
work to do.
2007-04-17 16:01:56 -04:00
Peter Hutterer
b6aec7f6f9 Change FocusIn/Out semantics to match Enter/Leave semantics. 2007-04-17 16:51:16 +09:30
Peter Hutterer
e7b47b1758 Change core enter/leave semantics for multiple pointers.
Send EnterNotify when first device enters the window, LeaveNotify when the
last device leaves the window. Additional devices will not cause additional
Enter/LeaveNotifies.
2007-04-12 16:24:42 +09:30
Eamon Walsh
63e46e4fc3 devPrivates rework: properly free devPrivates on compatibility structures,
excluding pixmap.
2007-04-04 15:59:51 -04:00
Eamon Walsh
14aea12cad xace: forgot one of the hook call arguments. Add it. 2007-04-03 15:23:56 -04:00
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
299ff4c829 xace: provide creation-time resource hook call in CreateWindow(). 2007-03-28 12:57:11 -04:00
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
Eamon Walsh
2945deba1d xace: drop XACE_WINDOW_INIT hook, it has been superseded by ResourceStateCallback. 2007-03-19 17:09:10 -04: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
456f429ad6 dix: fix: don't return when device is same as argument.
fix: set access default rule to 0 on init.
2007-03-15 21:48:19 +10:30
Peter Hutterer
c3eb248cf9 dix: fix: don't skip first item in list when seeking for a device cursor. 2007-03-14 13:21:33 +10:30
Peter Hutterer
63169ce52d dix: remove 'register' keyword for all variables. 2007-03-08 17:50:25 +10:30