Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
We forgot to multiply by sizeof(), so it wasn't fully zeroed out.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Closing the non-critical bug window for 1.13
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This changed should have been in aad428b8e21c77397c623b78706eb64b1fea77c9
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
_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>
|
|
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>
|
|
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>
|