summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-16XQuartz: Use asl_log_descriptor on Mountain LionJeremy Huddleston Sequoia1-0/+17
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()Jeremy Huddleston Sequoia1-2/+2
We forgot to multiply by sizeof(), so it wasn't fully zeroed out. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16XQuartz: console_redirect: Set the correct location for reading into the bufferJeremy Huddleston Sequoia1-9/+15
Prior to this change, it was possible that a large message would have some of its data prepended to subsequent messages due to our not incorrectly setting the location to write into the buffer. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-15Merge remote-tracking branch 'jeremyhu/master'Keith Packard1-0/+1
2012-08-15glx: Skip multisampled configs when matching pre-existing X visuals.Paul Berry1-0/+3
In __glXScreenInit() we generate the set of GLX visuals in two steps: first we match each pre-existing X visual with a corresponding FBConfig, then we generate a new X visual to correspond to all the remaining FBConfigs. The first step is used for the two default 24-bit visuals (true color and direct color) and for the 32-bit visual. If windowsystem multisampling is enabled in Mesa, we need to ensure that none of these three visuals gets matched to a multisampled config. Fixes a bug with windowsystem multisampling in gnome-shell. If the X server happens to match up a multisampled FBConfig to the 32-bit visual, gnome-shell will try to use it to read pixels from alpha-blended windows (such as gnome-terminal), resulting in no window appearing on screen. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-15XQuartz: Fix build regression for GlxExtensionInitJeremy Huddleston1-0/+1
quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue] {GlxExtensionInit, "GLX", &noGlxExtension}, Regression-from: aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-08-14Kludge -- Call RandR screen before cleaning up xf86 crtcsKeith Packard1-4/+7
The core RandR screen cleanup now involves cleaning up any GPU screen associations, and those call down into DDX to clean up the driver. If the pointers from the xf86 structures back to the core randr structures are set to NULL at that point, bad things happen. This patch "knows" that the core RandR close screen is underneath the xf86 randr close screen function, and so makes sure it gets called first. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14Close GPU screens before core screensKeith Packard1-9/+9
This should make cleaning up the GPU screens easier as the core screens they are associated with will still be around. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14Only free Render filter names on last screen closeKeith Packard1-1/+4
Hotplugging screens causes the render filter names to get freed while still in use; wait for the last core screen to be closed before freeing them. That only happens at server reset, when we want them to be freed. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14fb: reorder Bresenham error correction to avoid overshoot.Simon Schubert1-9/+9
When fbBresSolid draws a line, it can happen that after the last pixel, the Bresenham error term overflows, and fbBresSolid paints another pixel before adjusting the error term. However, if this happens on the last pixel (len=0), this extra pixel might overshoot the boundary, and, in rare cases, lead to a segfault. Fix this issue by adjusting for the Bresenham error term before drawing the main pixel, not after. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274 Signed-off-by: Simon Schubert <2@0x2c.or> Tested-by: Mitch Davis <mjd+freedesktop.org@afork.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-07Release 1.12.99.904xorg-server-1.12.99.904Keith Packard1-2/+3
Closing the non-critical bug window for 1.13 Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-07Distribute include/glx_extinit.hKeith Packard1-0/+1
This changed should have been in aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-07Bump glproto requirement to 1.4.16Julien Cristau1-1/+1
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06Merge remote-tracking branch 'whot/for-keith'Keith Packard3-8/+43
2012-08-06Merge remote-tracking branch 'airlied/for-keithp'Keith Packard2-1/+11
2012-08-06Merge remote-tracking branch 'alanc/master'Keith Packard18-809/+967
2012-08-07os: don't unconditionally unblock SIGIO in OsReleaseSignals()Peter Hutterer2-8/+41
Calling OsReleaseSignal() inside the signal handler releases SIGIO, causing the signal handler to be called again from within the handler. Practical use-case: when synaptics calls TimerSet in the signal handler, this causes the signals to be released, eventually hanging the server. Regression introduced in 08962951de. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-08-07dix: make sure the mask is set for emulated scroll events (#52508)Peter Hutterer1-0/+2
If a device has smooth scrolling axes, but submits scroll button events, we convert those to motion events and update the valuators. For legacy button events, the valuator mask is likely unset though, causing add_to_scroll_valuator() to return early, leaving us with an empty mask. That again skipped the rest of the code and no events were generated. Fix it by making sure that the scroll valuator in the mask is at least initialized to 0. Broke evdev wheel emulation, introduced by 54476b5e4461ff523e935961affabcf0de12c556. X.Org Bug 52508 <http://bugs.freedesktop.org/show_bug.cgi?id=52508> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-06sync: Fix logic error from b55bf248581dc66321b24b29f199f6dc8d02db1bAdam Jackson1-12/+12
That commit adds two hunks, and I _think_ they're backwards. It adds code to modify bracket_greater on NegativeTransition triggers, and bracket_less on PositiveTransition triggers. That breaks symmetry with the surrounding code; the code as of this commit could probably be simplified further. I can't keep the sync trigger rules in my head for more than about five minutes at a time, so I'm sending this on for more eyes. RHEL 6.3's xserver is shipping with b55bf248 reverted: https://bugzilla.redhat.com/show_bug.cgi?id=748704#c33 And there appear to be some upstream reports of the same issue: https://bugzilla.gnome.org/show_bug.cgi?id=658955 So I'd like to get this sorted out. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06randr: fix xinerama output for output slavesDave Airlie1-1/+19
This fixes the xinerama geometry when output slaves are enabled. Tested with xdpyinfo -ext XINERAMA before after slave added. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-07dri2: fix master pixmap free and reset pointerDave Airlie1-1/+2
These are two minor changes, one to reset the pointer to NULL, after freeing the pixmaps, one to make sure we use the right API for the master pixmap, though I doubt it'll ever really matter. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-07dri2: free slave pixmap on app exitDave Airlie1-0/+5
When the drawable disappears we need to free the prime master/slave combos. This fixes a leak after a prime app is run. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-07pixmap: have slave pixmap take a reference on master pixmapDave Airlie1-0/+4
Since the free routines free the master pixmap then the slave, we should be taking a reference when we bind them together. Fixes a use-after-free when resizing a primed gears. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-06Make indentation of dix/tables.c much more consistent and readableAlan Coopersmith1-395/+560
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Daniel Stone <daniel@fooishbar.org>
2012-08-06Fix up formatting of initializers for arrays of structsAlan Coopersmith14-409/+384
The indenter seems to have gotten confused by initializing arrays of structs with the struct defined inline - for predefined structs it did a better job, so match that. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-06RRModeCreate: plug memory leak of newModes if AddResource failsAlan Coopersmith1-1/+3
Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8)) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)). Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with malloc(8) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 84 with malloc(8). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-06rrproperty.c: free newly allocated prop in more error pathsAlan Coopersmith1-2/+10
Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 220 of randr/rrproperty.c in function 'RRChangeOutputProperty'. 'prop' allocated at line 154 with RRCreateOutputProperty(property). prop leaks when pending != 0 at line 160. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 346 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). at line 350 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-06rrproviderproperty.c: free newly allocated prop in more error pathsAlan Coopersmith1-2/+10
Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'. 'prop' allocated at line 155 with RRCreateProviderProperty(property). prop leaks when pending != 0 at line 161. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-06Merge remote-tracking branch 'whot/for-keith'Keith Packard3-2/+8
2012-08-06Merge remote-tracking branch 'jturney/master'Keith Packard16-406/+462
2012-08-06Merge remote-tracking branch 'jeremyhu/master'Keith Packard3-44/+65
2012-08-06xfree86: When xf86CrtcCloseScreen is called, the randr CRTCs are goneKeith Packard1-3/+0
The RandR CRTC structures are freed when their resource IDs are destroyed during server shut down, which is before the screen is closed. Calling back into RandR with stale pointers just segfaults the server. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Knut Petersen <knut_petersen@t-online.de>
2012-08-06xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabledRui Matos1-4/+34
Panning is at odds with CRTC cursor confinement. This disables CRTC cursor confinement as long as panning is enabled. Fixes regression introduced in 56c90e29f04727c903bd0f084d23bf44eb1a0a11. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Rui Matos <tiagomatos@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06randr: Fix up yet another corner case in preferred mode selectionAdam Jackson1-2/+6
Let's say - purely for the sake of argument, mind you - that you had a server GPU with anemic memory bandwidth, and you walked up to it and plugged in a monitor that was 1920x1080 because that's what happened to be on the crash cart. Say the memory bandwidth is such that anything larger than 1280x1024 gets filtered away. Now you're in trouble, because the established timings section includes a 720x400 mode because that's what DOS 80x25 is, and that happens to just about match the physical aspect ratio. Instead let's reuse the logic from the existing aspect-match path: pick the larger mode of either the physical aspect ratio or 4:3. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06kinput: allocate enough space for null character.Dave Airlie1-1/+1
This code wasn't allocating enough space and was assigning the NULL one past the end. Pointed out by coverity. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06ephyr: Resize screen automatically when parent window is resizedVic Lee3-8/+82
Bugzilla: https://bugs.freedesktop.org/25804 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Vic Lee <llyzs@163.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06ephyr: Fix up some bizarre formattingAdam Jackson1-1/+4
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-05XIChangeDeviceProperty: free newly allocated prop when SetProperty failsAlan Coopersmith1-0/+2
Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with XICreateDeviceProperty(property) at line 774 of Xi/xiproperty.c in function 'XIChangeDeviceProperty'. 'prop' allocated at line 700 with XICreateDeviceProperty(property). prop leaks when handler != NULL at line 768 and handler->SetProperty != NULL at line 769 and checkonly != 0 at line 772 and rc != 0 at line 772. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-08-05Do sent TouchEnd to listeners that don't own an accepted touchDaniel d'Andrada1-0/+6
When the owner of a touch accepts it, the other listeners must receive a TouchEnd. Even though there's code implementing the logic above in ProcessTouchOwnershipEvent(), DeliverTouchEndEvent() was refusing to send those TouchEnd events in this situatuation. Signed-off-by: Daniel d'Andrada <daniel.dandrada@canonical.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-08-05test: always add DIX_LIB and OS_LIB on XORG buildsPeter Hutterer1-2/+0
With --disable-xorg, We also disabled a bunch of tests because of their perceived reliance on a DDX. The cause was libtool missing some object files that never ended up in libxservertest.la. Only the xfree86 test has a true dependency on XORG. DIX_LIB was pointing to dix.O (instead of libdix.la) when DTRACE_SPECIAL_OBJECTS was defined. libdix.la should be part of XSERVER_LIBS but dix.O is not a recognised libtool object, so it got skipped for libxservertest.a. Only in the XORG case would we add DIX_LIB and OS_LIB manually, thus forcing linkage with the dtrace-generated objects. Fixing this by packaging up the dtrace-generated files as part of libdix.la/libos.la doesn't work for Solaris (and possible others), so simply always force linkage against the DIX_LIB/OS_LIB in the case of dtrace objects. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-03glx: Do not report the GLX_INTEL_swap_event extension for indirect swrastJon TURNEY1-1/+1
Commit 84956ca4 bogusly adds GLX_INTEL_swap_event to the extensions reported by swrast. "DRI2 supports this now - and already enables it explicitly - but drisw does not and should not. Otherwise toolkits like clutter will only ever SwapBuffers once and wait forever for an event that's not coming." (A similar bug for direct swrast is already fixed in mesa commit 25620eb1) (Note that this may be papering over the cracks somewhat, as if we do report GLX_INTEL_swap_event, some clutter apps fail with GLXBadDrawable calling GLXChangeDrawableAttributes to change the setting of GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK in the GLX_EVENT_MASK, apparently after the drawable is destroyed, which suggests a bug with GLXDrawable lifetimes) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-03glx: Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't.Jon TURNEY1-1/+1
Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. (This data is not currently used in the server) (A similar change is made in mesa commit d3f7597bc9f6d5) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-03os: Fix TMP fall-back in Win32TempDir()Colin Harrison1-1/+1
Fix Win32TempDir() in the case where we fell back to checking the TMP environment variable. It looks like this has been wrong since forever. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-08-03hw/xwin: Fixes to pixelFormat <-> fbConfig conversion in WGL modeMarc Haesen1-27/+43
Fix FIXME in fbConfigToPixelFormat() to correctly populate RGBA-mask shift parameters. Also request colourindex pixelFormats correctly. Now that they are requested correctly, don't skip colorindex visuals when converting pixelFormats to fbConfigs. Populate transparent colour information when converting pixelFormat from DescribePixelFormats() to a fbConfig. Signed-off-by: Marc Haesen <marha@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Introduce winProcessXEventsTimeout() to the concept of fractions of ↵Jon TURNEY1-7/+22
a second Oh this is terrible. Currently we only compute the select timeout in whole seconds. This means if we have less than 1 second remaining, we select with a timeout of 0 (i.e. poll) which causes the task to spin, burning 100% CPU for the remaining timeout (and possibly preventing the process we are waiting for from running :S) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Fix winUpdateWindowPosition() not to assume WS_EX_APPWINDOW styleJon TURNEY1-9/+5
Also improve it's debug output a bit Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Make winOverrideIcon() thread-safe for icon data accessJon TURNEY11-299/+307
winOverrideIcon() is called from the internal WM client thread. Accessing server-internal data structures to get icon data or window hints is not safe, as there is no lock to ensure we do not collide with these data structures being updated in the server thread. Rewrite so the internal client thread uses X client calls to obtain this data safely We used to also set the icon inside the server when the window was initially created. For simplicity, we simply send a message to the internal WM to update the icon when the window is created (rather than writing different icon update code which can work in the server thread for that one case...) extwm mode used to do the icon update in the server. I'm not sure that actually made much sense. Let's assume the external WM client can do it instead... v2 Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows v3 Reinstate check that native window actually has expected properties for an X window before trying to update it's icon; some auxiliary windows owned by the XWin process don't, which would cause a crash v4 Various fixes to pixmap icon conversion: - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out - properly check that XGetWindowProperty(NET_WM_ICON) returned some data - don't try to retrieve WM_HINTS icon_mask if it isn't set - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap - make sure imageMask is zero-initalized before we use it to mask the DDBitmap v5 Remove a left-over unused variable v6 Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Also update icon when _NET_WM_ICON property changesJon TURNEY1-17/+19
_NET_WM_ICON property is also considered to decide on the window icon, so also send a WM_WM_ICON_EVENT message to the WM if the PropertyNotify event is for _NET_WM_ICON property Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Rename WM_WM_HINTS_EVENT to WM_WM_ICON_EVENTJon TURNEY2-3/+3
WM_WM_HINTS_EVENT only updates the icon, so rename it to WM_WM_ICON_EVENT Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Refactor Xutf8TextPropertyToString() from GetWindowName() as a ↵Jon TURNEY1-43/+62
separate utility function Simplify GetWindowName() by moving UTF-8 to wchar conversion out to it's call site. This allows us to do extra processing on the window name in future. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>