summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-21common: xf86Configure: alloc_strlen: Allocated memory does not have space ↵Oliver McFadden1-1/+1
for the terminating NUL of the string buffer_alloc: Called allocating function "realloc" which allocated memory dictated by parameter "len + strlen(displaySize_string)" alloc_strlen: Allocated memory does not have space for the terminating NUL of the string var_assign: Assigned "ptr->mon_comment" to storage allocated by "realloc(ptr->mon_comment, len + strlen(displaySize_string))" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-21fb: fbFinishScreenInit: leaked_storage: Variable "(visuals|depths)" goes out ↵Oliver McFadden1-0/+4
of scope Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-21exa: exaFinishAccess: Overrun of static array "pExaScr->access" of size 6 at ↵Oliver McFadden1-2/+2
position 6 with index variable "i" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-16Cygwin/X: Allow the default log location to be configurableYaakov Selkowitz7-15/+22
Allow the default log location to be configurable (e.g. /var/log), and use separate logs for each display instance (e.g. XWin.0.log). Make the type of g_pszLogFile const char*, per os/log.c:LogInit(). Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-03-16Xming: Warning fixesColin Harrison5-5/+5
Fix warnings due to prototypes not specifying function arguments Fix warning with RegQueryValueEx() Tidy up an include Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-03-16Xming: Dead code removalColin Harrison5-239/+0
Remove some dead code, mostly code made obsolete by mandatory XKB Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-03-16Cygwin/X: Tidy up some cosmetic issues in log stringsJon TURNEY6-9/+9
Tidy up some cosmetic issues in log strings: - Add missing '\n' - Fix some strings starting with '\n' - Remove '\f' from some log strings These all just look daft in a log with timestamps. Also clarify log message about screen origin coordinates Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-03-16Cygwin/X: Fix thinko in mount option checkingJon TURNEY1-3/+4
Fix a thinko in mount option checking. Use symbolic names for values assigned to binary flag for clarity. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-03-16dri2: No need to blit from front on DRI2GetBuffers if they're just being reused.Francisco Jerez1-19/+23
It can be quite an expensive operation, so we're better off not doing it unless it's totally required. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-03-16Import linked list helpers from the intel DDX.Francisco Jerez2-0/+98
Borrowed from i830.h, except for list_for_each_entry(). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-03-16Add a ConfigNotify hook.Francisco Jerez2-0/+13
Executed from the ConfigureWindow request, right before sending ConfigureNotify to the clients. This commit breaks the ScreenRec ABI. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-03-15hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functionsRoland Scheidegger1-0/+6
The problem is that the xf86_use_hw_cursor(_argb) functions may get this correctly now, some drivers will replace these generic versions with their own functions. It is pretty insane to expect them to do reference counting of the cursor (as an example, look at driver/xf86-video-vmware to see how that looks like as a workaround). There are even places in xserver itself which replace these two functions. The segfaults if no reference counting is done are caused because the reference count of the cursor reached zero, hence the cursor was freed, however xf86CursorEnableDisableFBAccess() brought it back to life from the dead (from the SavedCursor). This patch hence adds reference counting in xf86CursorSetCursor. As per Michel Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. In theory with this it should be possible to remove the reference counting in the UseHwCursor functions I think, though it should also be safe to keep them. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-15hw/xfree86: fix refcounting in xf86_use_hw_cursorRoland Scheidegger1-2/+2
This is the same fix as was done in fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 for xf86_use_hw_cursor_argb. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-15Merge remote branch 'jeremyhu/master'Keith Packard4-12/+16
2010-03-15XQuartz: remove undefined XSERVER_CFLAGS variableGaetan Nadon4-5/+5
This is a variable local to configure.ac which is not AC_SUBST() It is undefined in any generated Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-11XQuartz: Use an empty xkb keymap by defaultJeremy Huddleston2-11/+11
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11XQuartz: Include os.h for OsAbort()Jeremy Huddleston1-0/+4
Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11XQuartz: GLX: Fix prototype for swapBuffersJeremy Huddleston1-1/+1
This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-12Xext: Link to external libraries when necessary.Eamon Walsh2-1/+5
Although the DDX should be linked to the necessary libraries, we may also need to pull them in directly to the module to ensure the symbols are resolved at runtime. Should fix this bug with XSELINUX: /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol: is_selinux_enabled -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from XSERVER_SYS_LIBS as it should only be needed in extmod. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-12Record: Avoid duplicates from replaying frozen eventsDaniel Stone3-28/+32
Reintroduce a check which used to be there in the old ProcessKeyboardEvent/ProcessPointerEvent codepath, which avoids us recording events subject to a grab twice: once when it's first processed in EnqueueEvent, and then again when it's thawed and being replayed. This required a tiny amount of code motion to expose syncEvents. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-11Revert "dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)"Peter Hutterer1-1/+62
Several users have pointed out that this commit introduces regressions, most notably perhaps fluxbox which essentially stops working after a few clicks. This reverts commit cf72b5437d2d620521279077a29c5df6d0fbb576. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-11xfree86: fix xf86Config.c build error in --enable-debug mode. (#26971)Peter Hutterer1-1/+1
xf86Config.c: In function 'configInputDevices': xf86Config.c:1514: error: request for member 'lay_identifier' in something not a structure or union make[5]: *** [xf86Config.lo] Error 1 Introduced with e1165632bdfbd720889ed1adf5f7ab338032c0ee. X.Org Bug 26971 <http://bugs.freedesktop.org/show_bug.cgi?id=26971> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-11xfree86: don't warn about nonexisting core pointer/keyboard in config.Peter Hutterer1-16/+8
In the vast majority of cases there is no xorg.conf that specifies a core pointer/keyboard. Skip this warning, since we'll get another notification about how the server relies on the config backend for input devices anyway. Leave the warning in for the error case (AEI off). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-11os: remove INTERNAL_MALLOC define.Peter Hutterer1-3/+0
There doesn't seem to be anything that defines it and given that the counterpart (the X internal malloc) was removed in 01cfba75229f4b9bf1e4fe80814931acdacde14c it's unlikely to work anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-10dix: Clip only into axis ranges if we're in absolute mode. (#26543)Peter Hutterer1-2/+3
An absolute device in relative mode may provide valuators outside of the axis range. Clipping back into the range prevents screen crossings in a multi-screen (Xinerama) setup as the required screen edge for crossing is never met: miPointerSetPosition crosses the screen conditional to the X coordinate being equal to the screen width or _less than_ 0. While the former can be met when clipping into the coordinate range and scaling, the latter cannot, resulting in a mouse pointer that gets stuck on the rightmost screen. This patch only applies axis clipping for valuators in mode Absolute. If relative, we allow the values to get above/below the axis ranges. Doesn't matter, miPointerSetPosition will reset the values to the allowed range even if no screen was crossed. This leads to interesting values provided to clients, the valuator range of the device resets once a screen is crossed and essentially reflects the position of the cursor on the screen - scaled into the valuator range. The values themselves are valid given the range though. In theory, the XI1 specs require that a relative device has a min/max range of 0/0. This doesn't really go well with devices that actually can switch mode between relative and absolute since they would have to reset their axis range when switching. If multiple XI clients are in use, we have no method of notifying them about the changes, so other clients may continue to use the wrong axis ranges (note: XI1 wasn't really designed to have multiple clients use a device). Expecting all relative devices to have this min/max of 0 is unrealistic at this point. So pick what is possibly the lesser of all evils, pass the beer and despair. X.Org Bug 26543 <http://bugs.freedesktop.org/show_bug.cgi?id=26543> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-03-03Replace assembly with generic unaligned access codeMatt Turner1-162/+74
Removes Alpha assembly, and probably works around unaligned accesses on other sensitive platforms. Signed-off-by: Matt Turner <mattst88@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Compiled-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-03configure: move SELINUX_LIBS to XSERVER_SYS_LIBSPeter Hutterer1-2/+2
All ddxs require linking against selinux if enabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-03configure: move libselinux requirement up to the common section.Peter Hutterer1-1/+2
Let's have all version-specific requirements in one block. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-03dmx: fix OsAbort()-related build error in examples/xinput.cPeter Hutterer1-1/+1
5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd changed the server to use OsAbort() instead of abort(). xinput in dmx is a client program though and fails to link if it tries to use OsAbort(). Switch it back to using abort(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-03dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)Peter Hutterer1-62/+1
A client requesting a GrabModeSync button grab, owner-events true, with only the ButtonRelease mask set would never receive the press event even if the grab window had the ButtonPress mask set. The protocol requires that if owner-events is true, then the delivery mask is the combination of the grab mask + the window event mask. DeliverGrabbedEvents does this already for us, checking first the delivery based on owner_events and then based on the grab mask. AFAICT, the device cannot enter the states FREEZE_BOTH_NEXT_EVENT or FREEZE_NEXT_EVENT that would be handled by DGE in any possible path here. Bonus point - CheckPassiveGrabsOnWindows suddenly becomes a lot lesss complicated. X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25Allow for missing or disabled compat_outputKeith Packard4-17/+46
When the compat output is missing (I don't think this is actually possible), or is disabled (and hence has no crtc), we would like to avoid dereferencing NULL pointers. This patch creates inline functions to extract the current compat output, crtc or associated RandR crtc structure, carefully checking for NULL pointers everywhere. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25Share enum definition for det_monrec_parameter sync_sourceKeith Packard1-2/+6
There were two separate enum definitions, one inside det_monrec_parameter struct and one for a local variable (which was then stored inside the struct). Sharing a single definition makes the code more obviously correct while making the compiler happier. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25DRI2: initialize event->drawable in DRI2SwapEventRobert Bragg1-0/+2
We weren't initialising the drawable in the event structure so the client side DRI2WireToEvent used for translating the event into a GLX event wouldn't be able to lookup up the corresponding GLXDrawable before passing the event on. Signed-off-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-24Merge remote branch 'whot/for-keith'Keith Packard2-13/+0
2010-02-24glx: Compile fix to let server compile with new and old mesaKristian Høgsberg1-0/+7
We broke the __DRI2_FLUSH API since it was never released, but since it's taking a little longer than expected to get the X server side of the changes ready, fix things up so it compiles. 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-02-23dix: try to ring the bell even if the current device doesn't have one. (#24503)Peter Hutterer1-8/+0
Evdev devices do not have the bell proc set, but XTEST devices do. By exiting early, the bell only rings if the last keyboard used was the XTEST keyboard and hence the bell proc is still set on the master but not if an evdev keyboard was used last. The better approach here is to try to ring the bell on all devices attached to this master device in case one or more actually do produce an audible sound. That's also XKB's behaviour if XkbUseCoreKbd is specified as device identifier. X.Org Bug 24503 <http://bugs.freedesktop.org/show_bug.cgi?id=24503> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-02-23dix: remove now-erroneous comment about frozen slave devices.Peter Hutterer1-5/+0
A direct grab on a slave device through XI2 detaches it, regardless of whether the grab is sync or async. So this comment doesn't apply to XI2 anyway. For XI1, aside from your life being miserable already, it doesn't matter as XI1 does not have a concept of attachment. You can freeze a device and if you don't freeze _all_ other devices at the same time, the master device can still happily send events to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com>
2010-02-22xselinux: Bump extension minor version.Eamon Walsh1-1/+1
Changes introduced in this version: - 3 window-related requests now handle pixmaps also. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Rename window-related requests that now support pixmaps.Eamon Walsh2-14/+14
Renamed requests: SetWindowCreateContext -> SetDrawableCreateContext GetWindowCreateContext -> GetDrawableCreateContext GetWindowContext -> GetDrawableContext Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Allow GetWindowContext to be used for pixmaps as well.Eamon Walsh1-3/+11
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Remove reference counting calls for SID objects.Eamon Walsh3-73/+20
Starting with libselinux 2.0.86, SID objects are no longer reference counted and the sidput() and sidget() calls are no-ops. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Don't print a failure message when XACE denies an input event delivery.Eamon Walsh1-25/+25
A denial is normal and the behavior should be to drop the event. Having the log message creates excessive log spam. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Revert "Remove some debug messages that trigger on XACE event delivery failure."Eamon Walsh1-3/+9
The log messages still need to be there for non-XACE failures. This reverts commit 4be354c4c2da5168b302601b91bd80cfaca7e193. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22libselinux now has a pkgconfig file. Use it.Eamon Walsh3-16/+3
Also remove HAVE_NETLINK_AVC_ACQUIRE_FD tests, because we now require a version of libselinux that has it. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Allow SetWindowCreateContext to be used for pixmaps as well.Eamon Walsh1-1/+1
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Always enable outputs that have been forced on in the configuration fileSimon Farnsworth1-1/+2
If the user has gone to the effort of manually enabling an output in the configuration file assume that they know what they're doing. X.org Bug 14611 <http://bugs.freedesktop.org/show_bug.cgi?id=14611> Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-22Merge remote branch 'whot/for-keith'Keith Packard5-72/+91
2010-02-22Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode.Peter Hutterer1-0/+10
The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-22Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode.Peter Hutterer1-0/+10
The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-22Re-enable RECORD extension.Chris Dekter5-72/+91
RECORD was disabled during the switch to internal events. This patch modifies the record callback to work with internal events instead of xEvents. The InternalEvents are converted to core/Xi events as needed. Since record is a loadable extension, the EventTo* calls must be externed. Signed-off-by: Chris Dekter <cdekter@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>