Commit Graph

131 Commits

Author SHA1 Message Date
Peter Hutterer
993ca5acbd dix: when unsetting a cursor, update the sprite immediately (#23608)
Removing the device cursor while the cursor was within the window did not
update the visible sprite until the next enter/leave event.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-03 08:39:27 +10:00
Jeremy Huddleston
0f613007cd CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT
If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then
we will SEGFAULT.  This can happen in XQuartz because ReparentWindow will call
pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then
ReparentWindow will call it again later indiscriminantly.
(cherry picked from commit b608c864cc)
2009-08-25 20:16:20 -07:00
Richard Hughes
6b5978dcf1 Do not reset lastDeviceEventTime when we do dixSaveScreens
When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the
event time else session clients using IDLETIME will be reset.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-18 10:51:31 +10:00
Peter Hutterer
2d35ea8d95 dix: switch to byte-counting functions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 10:05:54 +10: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
Adam Jackson
c66cf7b64c Update several of my and/or Red Hat's licenses to standard form. 2009-05-14 07:02:44 -04: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
6c3b633299 Merge branch 'master' into xi2 2009-04-07 19:36:27 +10:00
Tomas Carnecky
62183a06e5 Remove two unused defines in C files
These two defines were defined in C files but not used anywhere:

  dix/window.c      #define DeviceEventMasks (KeyPressMask | [...]
  os/connection.c   #define MAXFD 500

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-23 16:06:34 +10:00
Peter Hutterer
445daa62e7 Xext: purge XGE event masks.
The masks were originally designed to generically handle event masks for
extensions. Since all that is in-server anyway, it's much better writing
custom event masks for those extensions that need it and not providing a
unified mechanism.
XI2 needs more than the current implementation, which is already too complex
for most other extensions. good riddance.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Keith Packard
f8dd80d13b Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
2009-03-09 13:08:09 -07: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
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
Adam Jackson
20d2117eb8 Move CreateUnclippedWinSize to mbuf
It's the only user, so.
2009-01-20 00:18:02 -05:00
Julien Cristau
a2a760e33c dix: don't mix declarations and code 2009-01-11 08:54:10 +01:00
Peter Hutterer
eb2d7b3d70 dix: move focus handling into enterleave.c.
This commit moves the focus handling from events.c into enterleave.c and
implements a model similar to the core enter/leave model.
For a full description of the model, see:
http://lists.freedesktop.org/archives/xorg/2008-December/041740.html

This commit also gets rid of the focusinout array in the WindowRec, ditching
it in favour of a local array that keeps the current focus window for each
device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
38b28dcadd dix: reduce FirstPointerChild complexity
Instead of keeping a flag on each window for the devices that are in this
window, keep a local array that holds the current pointer window for each
device. Benefit: searching for the first descendant of a pointer is a simple
run through the array.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08 11:45:22 +10:00
Peter Hutterer
b36c398b11 dix: purge dead device-based window access code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10 12:42:45 +10: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
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
Michael Vogt
c8472a7444 Do not send VisibilityNotify events when MapUnmapEvents are disabled
This prevents a protocol visible side-effect (XVisibilityEvent) on
XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow().

The problem shows up in gnome-screensaver with compiz and "unredirect
fullscreen windows" enable. A VisibilityNotify event is generated (first
with obscured and than with unobscured) when the window swithces from
redirected to unredirected.

https://bugs.freedesktop.org/show_bug.cgi?id=18133
http://launchpad.net/bugs/278112
2008-11-25 22:35:47 +02:00
Peter Hutterer
f5841e9648 dix: don't store enter/leave and focus semaphores in a devPrivate.
We need them for each window, every time a window is allocated. Storing them
in a devPrivate is the wrong thing to do.

This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-11-13 17:06:32 +10:00
Julien Cristau
add946daed Nuke unused variables 2008-10-26 11:44:10 +01:00
Adam Jackson
c6d6d3e87a Loader: Unexport a handful of consumerless symbols from dixsym. 2008-10-06 16:18:21 -04:00
Adam Jackson
991ed2949b Rename SaveSetMap() to SaveSetShouldMap().
Avoids preprocessor collision with xfixeswire.h
2008-09-23 10:22:22 -04:00
Owen Taylor
ca9fae0079 Change 'remap' to 'map' in saveset functions/macros
Now that the code has been fixed so that Unmap means unmap and not "don't
remap", 'remap' was confusing to have in the function names/parameters, so
change it to simple 'map'.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-22 12:43:30 -07:00
Owen W. Taylor
722c51960d Don't remap windows for SaveSetUnmap
Since ReparentWindow() does a unmap/map pair for windows that are already
mapped, for saveset windows with SaveSetUnmap, we must unmap the window
before calling ReparentWindow() to avoid the generation of MapRequest
events, and so forth.
2008-09-22 11:04:26 -04:00
Adam Jackson
0bb317a78b Default to -br. Add -retro option for the nostalgic.
-retro also reverts to the classic cursor display behavior, meaning,
the cursor will be visible before anyone calls XDefineCursor().
2008-09-22 10:51:51 -04:00
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
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
d6228cb22a Shape extension is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Peter Hutterer
db86b8839f dix: free GenericMask allocations when destroying window. 2008-07-10 16:02:54 +09:30
Eamon Walsh
7ddfb2f158 Fix a leak of window devPrivates in window.c/CrushTree(). 2008-06-27 23:10:12 -04:00
Ben Gamari
a4cb25f8c8 dix: free FocusPrivates when deleting a window. #16493
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>

X.Org Bug 16493 <http://bugs.freedesktop.org/show_bug.cgi?id=16493>
2008-06-25 09:59:46 +09:30
Peter Hutterer
89add4ee98 dix: remove obsolete InitWindowPrivates(). 2008-04-25 14:30:26 +09:30
Peter Hutterer
dcdc66fcfc dix: add mi.h include to stop compiler warning 2008-04-25 14:30:06 +09:30
Peter Hutterer
97552413d2 dix: remove "unused variable" compiler warning. 2008-04-25 14:29:46 +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
Adam Jackson
eafaf40fb3 Death to APPGROUP. 2008-04-18 18:50:05 -04:00
Peter Hutterer
04dff74ffd dix: Rework Enter/Leave semaphore system.
Instead of a simple counter, use bits to keep track of which device is where
etc. When device enters a window (or sets focus), the bit matching the device
is set, when it leaves again, it is unset. If there are 0 bits set, then
Leave/Enter/Focus events may be sent to the client.

Same theory as before, but this should get around the insanity with
Grab/Ungrab special cases. Those cases are basically untested though.
2008-04-10 19:22:59 +09:30
Jeremy Huddleston
3f51f493b6 XQuartz: Fix issue where clicking on an X11 window might send that event to an X11 window in another space.
(cherry picked from commit df21312c8b)
(cherry picked from commit 2d4194a8d1)
2008-04-08 17:03:18 -07: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
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