summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-24configure: don't check xfont always for each serverHEADmasterTiago Vignatti1-4/+4
It's already defined inside REQUIRED_LIBS and all DDX are getting it already. No semantical changes. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-24dix: use one single function to register fpe fontsTiago Vignatti3-11/+6
X server doesn't need to understand fpe internals, so use register_fpe_functions from libXfont. It's required to get new version of libXfont, therefore adjust it to be passed to autoconf. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22Bump to 1.8.99.903 -- 1.9 RC3xorg-server-1.8.99.903Keith Packard1-1/+1
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22list.h: Fix list_for_each_entry_safe()Kristian Høgsberg1-3/+3
Can't use next as a macro argument since we're accessing the .next field of struct list. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22Revert "mi: Remove unused overlay support"Keith Packard5-2/+2010
This reverts commit 9120e58556014e514eef9dfe43cdea4b74dc66ae. Whoops, please revert this patch -- overlay is in use in nvidia drivers, and it's too late in release cycle to remove it. I feel really sorry that I kept this patch in my tree. I will submit another one, removing only XAA overlay hooks which are not used at all.
2010-06-22Bump to 1.8.99.902 -- 1.9 RC2xorg-server-1.8.99.902Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22record: Prevent a crash on recording client disconnect.Rami Ylimäki1-5/+17
Execute the following steps to reproduce the issue. 1. Run at least two recording clients simultaneously. $ cnee --record --request-range 1-127 & $ cnee --record --request-range 1-127 & 2. Kill the recording clients. $ killall cnee 3. Give X server something to do so that the clients are closed. $ xinput list $ xinput list As a result RecordUninstallHooks accesses NullClient, because RecordAClientStateChange doesn't clean the recording clients up properly. Fix RecordUninstallHooks to fail locally on an assertion instead of much later in privates code, if NullClient is still accessed because of some other bug. Fix RecordAClientStateChange to iterate through all contexts so that modifications of the iterated array during iteration don't cause contexts to be skipped. Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22Don't crash when asked if a client that has disconnected was localSimon Farnsworth1-0/+5
ProcDRI2Dispatch uses LocalClient to determine if it's safe to respond to a client that has made DRI2 requests which aren't sensible for remote clients (anything but version). When the client has disappeared mid-request stream (e.g. as a result of a kill -9, or a client-side bug), LocalClient causes the X server to follow suit, as ((OsCommPtr)client->osPrivate)->trans_conn is NULL at this point. The simple and obvious fix is to just return "not local" when trans_conn is NULL, which fixes the crash I was seeing; however Keith Packard pointed out that just checking trans_conn isn't enough; quoting Keith: "This looks almost right to me -- I reviewed the os code to see when _XSERVTransClose is called (which is what frees the trans_conn data) and found that every place which called that immediately set trans_conn to NULL, except for the call in CloseDownFileDescriptor which is only called from CloseDownConnection and which is immediately followed by freeing the OsCommRec and setting client->osPrivate to NULL. So, I'd suggest checking client->osPrivate in addition to the above check." Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345)Dave Airlie3-10/+87
The fixes for the composite reallocation failure, were freeing the oldpixmap straight after reallocating the new one, however this led to some wierd effects in e16 compositing, and I think in a few other places. This patch moves the freeing of the pixmap into the post wrapped stage. I'm not sure if we are actually better off breaking ABI and adding another callback from the ConfigureWindow to composite to make sure the old pixmap is always freed, but this should be satisfactory as we should always hit one of the freeing paths or else its a bug in the DIX. bug: https://bugs.freedesktop.org/show_bug.cgi?id=28435 Reported-by: Andrew Randrianasulu <randrik@mail.ru> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22dri2: avoid crash with old dri drivers.Dave Airlie1-1/+2
I built latest server and copied over a mesa 7.8 dri2 driver to use with it, and it crashed in here starting compiz. Looks like we need to validate the flush extension is registered before calling invalidate. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22rotation: fix cursor and overlap of one pixel.Dave Airlie2-17/+20
Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix a cursor off by one on Intel hw, however it also move the whole crtc into an off by one position and you could see gnom-eshell overlapping. This commit reverts that and instead fixes the cursor hotspot translation to work like pixman does. We add 0.5 to the cursor vector before translating, and floor the value afterwards. Thanks to Soeren (ssp) for pointing out where the real problem was after explaning how pixman translates points. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22config: declare xserver private dependencies in xorg-server.pcGaetan Nadon2-2/+10
Any module (drivers) depending on xserver also depends on some of the server private dependencies. Any driver including xf86.h depends on xext, kbproto, inputproto and randr. These dependencies are in separate packages, so anything can happen, removal, wrong version, etc... and the driver fails during compilation. Having the private dependencies declared will ensure all packages the server depends on are present and at the correct version. Currently each module attempts to check for server dependencies with various degrees of accuracy. With this patch, the driver will only need to check for its own explicit dependencies. Now that xproto is included in Requires.private it is removed from Requires. All the cflags from both Requires and Requires.private are returned to caller to pkg-config. Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22XWin: Fixes for devPrivates API changeColin Harrison3-11/+18
Fix some typos in devPrivates API changes in XWin code. Move allocation of private keys as it's no longer valid to do them during OsVendorInit() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-21xv: Don't send port notify when SetPortAttribute failsVille Syrjälä1-3/+4
Currently a port notify event is sent even if SetPortAttribute fails. Furthermore the value field in the event will contain the value that was specified in the failed request. So any client interested in the actual value of the attribute will have to double check the current value with GetPortAttribute after receiving a port notify event. Fix the problem by sending port notifications only when SetPortAttribute succeeds. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-20os: Remove unused dev_tty_from_init variableMikhail Gusarov1-4/+1
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-20os: Remove unused pread/pwrite/lockit functionsMikhail Gusarov1-50/+0
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-20mi: Remove unused overlay supportMikhail Gusarov5-2010/+2
The only reference to it in server and drivers is in XAA overlay code which would segfault as no miInitOverlay is called ever. No segfaults were observed "in wild", so XAA overlay is probably also unused. XAA code is modified to act as if miOverlayCopyUnderlay always returned false, because XAACopyWindow8_32 could only set doUnderlay to true if it's called from miOverlayMoveWindow or miOverlayResizeWindow, which can only be called if miInitOverlay has hooked those functions, and no driver (on fd.o) or server code calls that. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-20mi: do not use X11/extensions/shape.h header from libXextMikhail Gusarov1-1/+1
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Tested-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-18Don't coredump on "X -showopts" (bug 25874)Alan Coopersmith1-0/+7
Don't try walking the xf86ConfigLayout.screens table if it's empty https://bugs.freedesktop.org/show_bug.cgi?id=25874 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-18record: Register client private to prevent crash.Rami Ylimäki1-0/+3
Running the following command causes an assertion to fail: cnee --record --request-range 1-127 3 in dixGetPrivateAddr at ../../include/privates.h:122 4 in dixGetPrivate at ../../include/privates.h:137 5 in dixLookupPrivate at ../../include/privates.h:167 6 in RecordInstallHooks at ../../record/record.c:911 7 in ProcRecordEnableContext at ../../record/record.c:2377 8 in ProcRecordDispatch at ../../record/record.c:2571 9 in Dispatch at ../../dix/dispatch.c:432 10 in main at ../../dix/main.c:289 Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-17DRI2/xserver: Don't hang in glXSwapBuffers if drawable moves between crtc's ↵Mario Kleiner1-0/+15
(bug 28383) Detect if a drawable has been moved from an original crtc to a new crtc with a lower current vblank count than the original crtc inbetween glXSwapBuffers() calls. Reinitialize drawable's last_swap_target before scheduling next swap if such a move has taken place. last_swap_target defines the baseline for scheduling the next swap. If a movement between crtc's is not taken into account, the swap may schedule for a vblank count on the new crtc far in the future, resulting in a apparent "hang" of the drawable for a long time. Fixes Bugzilla bug #28383. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-16dix: the default axis mode is Relative, not "0".Peter Hutterer1-1/+1
Yay for readability. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
2010-06-16Re-enabled Xnest fix for focus in + modifier bug.Xiaoyang Yu (Max)1-62/+45
* See https://bugs.freedesktop.org/show_bug.cgi?id=3030 Signed-off-by: Xiaoyang Yu (Max) <max.a.yu@intel.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> This takes the xnest way of working around this (see 5904ef2ccd6056b187ca76f104c21e2d686bfc1d "xnest: restore xnestUpdateModifierState") and copies it to Xephyr. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-15In DRI2Connect, check to see if DRI2 has been initialized (bug 28424)Keith Packard1-1/+5
This prevents DRI2GetScreen from being invoked with an uninitialized private key which would cause an assert failure. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: David Ronis <David.Ronis@McGill.CA>
2010-06-15Clean up RandR12 bits on screen close (bug 27114)Keith Packard3-1/+28
When resetting the server, pScrn->EnterVT must be unwrapped or the next server generation will end up wrapping the wrapper and causing an infinite recursion on EnterVT. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Michael Stapelberg <michael+freedesktop@stapelberg.de>
2010-06-15Bump to 1.8.99.901 -- 1.9 RC1xorg-server-1.8.99.901Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-11Merge remote branch 'dottedmag/for-keithp'Keith Packard30-151/+119
2010-06-11exa: fix ExaCheckCopyNtoN for exa_classic when source = destÉric Piel1-1/+2
In case you want to copy a region with source = dest, you have the same pixmap as source and dest. At the end of exaPixmapIsOffscreen_classic() the devPrivate.ptr is reset to NULL (look at the sources). Now this is what happens in ExaCheckCopyNtoN: exaPrepareAccess( pDst ); Calls IsOffscreen() sets devPrivate.ptr to NULL sets up devPrivate.ptr to real pointer Everything OK exaPrepareAccess( pSrc ); Calls IsOffscreen() sets devPrivate.ptr to NULL BAILS OUT CAUSE OF NESTED OPERATION SINCE DST EQUALS SRC We end up with devPrivate.ptr as NULL, and that is clearly wrong. In particular this fixes a segfault when using the psb driver (bug 28077) Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-11Remove more superfluous if(p) checks around free(p)Matt Turner11-84/+47
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-11record: move free() to after last use of pContextMatt Turner1-2/+2
No functional change, since free doesn't change the value of the pointer passed to it, but it makes this code less confusing. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-11xkb: replace xstrdup with strdup in Win32SystemMikhail Gusarov1-1/+6
The only caller of Win32System is XkbDDXCompileKeymapByNames. Add allocation check there to avoid passing NULL pointers to various functions down the code. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11config: Replace xstrdup with strdup in add_option()Mikhail Gusarov1-1/+1
All callers of add_option pass string literal as "key" argument except one, where non-NULL condition is guarded by if(). Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11xfree86: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov3-14/+14
ditto for XFree86 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11xquartz: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-6/+6
ditto for XQuartz Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11xwin: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov3-8/+8
ditto for XWin Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11kdrive: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-6/+6
ditto for Kdrive Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11dmx: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov2-3/+3
ditto for DMX Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov8-26/+26
Replace xstrdup with strdup when either constant string is being duplicated or argument is guarded by conditionals and obviously can't be NULL Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-10Merge remote branch 'alanc/master'Keith Packard5-9/+20
2010-06-10Ignore RandR timestamps harderKeith Packard1-33/+0
Checking timestamps in post 1.1 randr requests was never a good idea, let's ignore them and just make the configuration changes. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Chase Douglas <chase.douglas@canonical.com>
2010-06-10Fix a couple more possible errors with input-only windowsKeith Packard3-4/+4
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-10Solaris: avoid memory leak if AGPIOC_INFO ioctl failsAlan Coopersmith1-5/+5
Move malloc after ioctl, so we don't have to worry about free'ing the memory if the ioctl fails. [ This bug was found by the Parfait bug checking tool. For more information see http://research.sun.com/projects/parfait ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-10Record some additional library dependencies in xf86 modulesAlan Coopersmith3-1/+10
Helps with symbol resolution when building with -z defs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-10SecurityResource should not segfault when client owning resource has exitedSam Lau1-3/+5
Fixes OpenSolaris bug 6949754: Xorg crashes when the magnifier is enabled at gdm login greeter window. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2010-06-10Merge remote branch 'whot/for-keith'Keith Packard16-138/+713
2010-06-11Xi: don't copy the modifier key count when copying device classes (#25480)Peter Hutterer1-4/+0
The modifier key count is maintained by the XKB layer and increased/decreased for all modifiers that set state. Test case, MD/SD modifier key count in comment: 1. keyboard 1: press and hold Shift_L # SD:1 MD:1 2. keyboard 2: press and release Shift_L # SD:1,0 MD:1,0 <class copy happens> # SD:1 MD:1 3. keyboard 1: release Shift_L # SD:0 MD:1 4. keyboard 1: press and release Shift_L # SD:1,0 MD:2,1 The modifier is now logically down on the MD but not on keyboard 1 or keyboard 2. XKB is layered in before the DIX, it increases/decreases the modifier key count accordingly. In the above example, during (2), the MD gets the key release and thus clears the modifier bit. (3) doesn't forward the release to the MD because it is already cleared. The copy of modifierKeysDown when the lastSlave changes however increases the counter for the held key. On (4), the press and release are both forwarded to the MD, causing a offset by 1 and thus do not clear the logical modifier state. X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org>
2010-06-11config: remove redundant DBUS API define, require dbus-1 >= 1.0Peter Hutterer2-2/+2
It's still being pulled in by the HAL CFLAGS but the requirement to define this was dropped from DBus pre 1.0 (November 2006). This means we require dbus 1.0 now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-11xfree86: Match devices based on current driver settingDan Nicholson5-22/+57
Often we want to apply a driver specific option to a set of devices and don't care how the driver was selected for that device. The MatchDriver entry can be used to match the current driver string: MatchDriver "evdev|mouse" Option "Emulate3Buttons" "yes" The driver string is a case sensitive match. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11xfree86: Allow multiple InputClass Match* entries for && matchingDan Nicholson4-109/+179
Currently when there multiple InputClass entries of the same type, only the last entry is used and the previous ones are ignored. Instead, multiple entries are used to create multiple matching conditions. For instance, an InputClass with MatchProduct "foo" MatchProduct "bar" will require that the device's product name contain both foo and bar. This provides a complement to the || style matching when an entry is split using the "|" token. The xorg.conf man page has added an example to hopefully clarify the two types of compound matches. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-11config: Script to convert HAL fdi settings to InputClass sectionsDan Nicholson2-1/+203
In the new world of udev and InputClass, x11_* settings from HAL fdi files will not be honored. This script converts those settings into valid InputClass sections that can be dropped into xorg.conf.d. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>