Commit graph

10397 commits

Author SHA1 Message Date
Jeremy Huddleston
d784fd09dc configure.ac: Bump version to 1.10.2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-28 16:59:05 -07:00
Jeremy Huddleston
398114c148 XQuartz: Don't crash if CG increases our display resolution
miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
sized for the old resolution.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 1fb501ad15)
2011-05-22 21:39:42 -07:00
Jeremy Huddleston
dc6efd9988 XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
If CG reports no displays when launching, we could crash in RandR.  Instead, just
provide a fake 800x600 display until we are notified about displays being attached.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 60af79e35e)
2011-05-22 21:39:37 -07:00
Jeremy Huddleston
1a665a8abd configure.ac: Bump version to 1.10.1.902 (1.10.2 RC2)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-20 22:59:27 -07:00
Jeremy Huddleston
52e27b446a XQuartz: Bump bundle version to 2.6.3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-16 21:07:37 -07:00
Jeremy Huddleston
b4cb37d725 XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 384eb45b94)
2011-05-16 18:47:27 -07:00
Jeremy Huddleston
69e3527e25 XQuartz: Don't call mieqEnqueue during server shutdown
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 25191648b8)
2011-05-16 18:47:20 -07:00
Alan Coopersmith
0a61aca1ed Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo
Use calloc to initialize pScrVisInfo array so we don't have to check
which ones were already initialized when freeing them all.

On failure, set rc if necessary, and jump to code at end that already
frees all the necessary allocations and return rc.

Fixes parfait reported error:
Error: Memory leak (CWE 401)
   Memory leak of pointer 'pScrVisInfo' allocated with malloc((count * 16))
        at line 724 of dbe/dbe.c in function 'ProcDbeGetVisualInfo'.
          'pScrVisInfo' allocated at line 693 with malloc((count * 16)).
          pScrVisInfo leaks when rc != 0 at line 710
              and j >= i at line 716.

[ This bug was found by the Parfait 0.3.7 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 043c175865)
2011-05-13 23:36:28 -07:00
Alan Coopersmith
5be7451367 Only free pContext once when AddResource fails in ProcRecordCreateContext
Since RecordDeleteContext frees its argument, don't fall through to free
it again.

Error: Double free (CWE 415)
   Double free of pointer 'malloc(1072)' defined by malloc
        at line 1964 of record/record.c in function 'ProcRecordCreateContext'.
          Previously freed at line 1960 with RecordDeleteContext.
          'malloc(1072)' was allocated at line 1926 with malloc.

[ This bug was found by the Parfait 0.3.7 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit dadb0791eb)
2011-05-13 23:35:43 -07:00
Alan Coopersmith
ee69c1aa7c Make xorg.conf.example rule compatible with Solaris make
Solaris make won't substitute $< in explicit rules, only implicit ones

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
(cherry picked from commit 8d229c4cf9)
2011-05-13 23:31:14 -07:00
Jeremy Huddleston
189d44e7d2 XQuartz: Don't call into CoreFoundation after fork() and before exec()
After fork()ing, we should just limit ourselves to setting up
the environment, file descriptors, and exec()ing.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit  c89a6f824e)
2011-05-13 23:30:01 -07:00
Jeremy Huddleston
277e188944 os: Silence warnings when building with clang
access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
        if ((host->family == FamilyServerInterpreted)) {
             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
        if ((host->family == FamilyServerInterpreted)) {
                          ^~
                          =
access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
        if ((host->family == FamilyServerInterpreted)) {
            ~             ^                         ~

In file included from xstrans.c:8:
In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
/usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
    ^

log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
        if (asprintf(&logFileName, fname, display) == -1)
                                   ^~~~~
log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
                if ((asprintf(&suffix, backup, display) == -1) ||
                                       ^~~~~~
log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
        LogVWrite(verb, tmpBuf, args);
                        ^~~~~~

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit c524f8bb76)
2011-05-11 12:26:53 -07:00
Jeremy Huddleston
164ef01bd5 configure.ac: Version bumped to 1.10.1.901
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-06 15:43:04 -07:00
Jeremy Huddleston
c52a93c539 XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4
Ok, this time for sure... how many brown bags can I fit over my face?

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 0fc7ec6dd5)
2011-05-04 18:39:04 -07:00
Adam Jackson
7688d6d317 glx: Make --disable-dri not disable AIGLX
Either the DRI1 or DRI2 loaders are sufficient.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 001b6b8b70)
2011-05-04 13:15:58 -04:00
Adam Jackson
e67afcdb9a glx: Use 0 rather than garbage for unknown INTEL_swap_event types
Otherwise the garbage you return could well be numerically identical to
one of the swap type tokens, and apps which rely on us to tell the truth
would be in trouble.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit f8540b9dcc)
2011-05-04 13:15:58 -04:00
Adam Jackson
b5093063b5 glx: Fix lifetime tracking for pixmaps
GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
IDs can be destroyed in either order with no error.  Only windows need
to be tracked under both XIDs.

Fixes piglit/glx-pixmap-life.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 6a433b67ca)
2011-05-04 13:15:58 -04:00
Adam Jackson
618dc75a05 glx: Reimplement context tags
This would let you do a constant-time context lookup, but if that's your
performance problem you have two problems.  Just use the context's XID
as the tag value instead.

In order to do this, we have to defer destroying a context until it
actually goes unreferenced, as you're allowed to mention a context tag
after you've (ostensibly) destroyed the context, as long as it's still
your current context.  Thus, change DestroyContext to merely mark the
context as dead if it's a current context, and call down to actual
resource destruction (and XID reclamation) in StopUsingContext.

Also, stop trying to delete context state from DrawableGone.  This was
always broken, as GLX does not say that contexts are destroyed when
their drawables are destroyed.  But with the above change to defer
context destruction, this would trigger a server crash on client exit as
we'd free the context state twice.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit a48dadc98a)
2011-05-04 13:15:58 -04:00
Adam Jackson
c7d9a07d52 glx: Fix _glapi_add_dispatch
We never need to generate stubs, because those conditions can't happen
in the server.  Yank that code out, but keep the bookkeeping for which
extension functions are registered so the DRI driver doesn't get
confused.

As a pleasant bonus, we're now friendlier for environments like selinux
that make runtime code generation difficult, and we're portable to more
arches since we don't have to port the assembly stubs.

Fixes the following clutter conformance tests (indirect rendering,
llvmpipe driver):

    test-cogl-backface-culling
    test-cogl-materials
    test-cogl-readpixels
    test-cogl-texture-mipmaps
    test-cogl-texture-get-set-data
    test-cogl-viewport
    test-cogl-offscreen

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 30d6947cee)
2011-05-04 13:15:58 -04:00
Adam Jackson
888a29674c glx: Lobotomize _glapi_get_proc_address
This isn't a meaningful thing in the indirect glx loader, so just warn
if it ever happens and move on.

But also, mark it PUBLIC, so if the driver does ever call it we merely
warn instead of aborting because ld.so can't find the symbol.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 17d9e37472)
2011-05-04 13:15:58 -04:00
Adam Jackson
00d1569918 glx: Remove noop dispatch table
We can never hit this, because the indirect GLX dispatch code always
forces a current context and checks that it's non-NULL before calling
into the dispatch table.  If it's _not_ null, then _glapi_set_context
will call into the driver, which is responsible for calling
_glapi_set_dispatch to make sure the dispatch table is non-NULL.

Also remove _glapi_set_warning_func and friends, since we can no longer
call them even from dead code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit b0c665ac0f)
2011-05-04 13:15:58 -04:00
Adam Jackson
522443dbf9 glx: Add texbuffer2 support to swrast
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 1ad9f01c31)
2011-05-04 13:15:58 -04:00
Adam Jackson
353ccf4d8e glx: Remove unused _glapi_get_proc_name
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit b73ebe65cd)
2011-05-04 13:15:58 -04:00
Adam Jackson
1c7afece23 glx: Simplify _glapi_check_multithread
We can guarantee that the X server does not call DRI driver services
from multiple threads, so _glapi_check_multithread need never do
anything special.  As a result, ThreadSafe is always false, so remove it
and simplify expressions where it appeared to match.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 4377288abd)
2011-05-04 13:15:57 -04:00
Adam Jackson
5285e71fc5 glx: Remove unused _glapi_get_proc_offset and friends
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit a5fdd1aa06)
2011-05-04 13:15:57 -04:00
Peter Hutterer
be3f41d1ec dix: fix typo in direction calculation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
(cherry picked from commit 8c528c667d)
2011-05-04 10:14:10 +10:00
Peter Hutterer
d2c9f331d2 Xi: don't swap the status byte in the XIPassiveGrab replies
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 60b08e013d)
2011-05-04 10:14:10 +10:00
Peter Hutterer
0de1802c99 Xi: exit with error value if CheckGrabValues failed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit a3f37f3698)
2011-05-04 10:14:10 +10:00
Peter Hutterer
e3887c8fa3 Xi: fix reply swapping function check for XIPassiveGrabDevice
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit f4d9ff73b1)
2011-05-04 10:14:10 +10:00
Peter Hutterer
ea55d0d504 Xi: return the bad device ID if a passive grab fails with BadDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 2a49ffa3c9)
2011-05-04 10:14:09 +10:00
Peter Hutterer
d6328c6bfe Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)
commit 678f5396c9 only fixed the
initialization, not the copy. After a slave device change, the valuator
were out of alignment again.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 419a27b521)
2011-05-04 09:32:36 +10:00
Jeremy Huddleston
b4455b119c XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4
This fixes a regression introduced by d79cc14a51

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 0f284f0f42)
2011-04-28 13:36:23 -07:00
Emanuele Giaquinta
11847e2ab4 XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4
http://xquartz.macosforge.org/trac/ticket/476

Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 72ed7551f4)
2011-04-27 18:57:56 -07:00
Jeremy Huddleston
3319b415f7 XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4
xprAppleWM.c:143: warning: initialization from incompatible pointer type
xprAppleWM.c:144: warning: initialization from incompatible pointer type

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit d79cc14a51)
2011-04-27 18:57:21 -07:00
Jeremy Huddleston
1939043a34 rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value
Found by clang static analyzer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4944de2484)
2011-04-27 18:57:06 -07:00
Jeremy Huddleston
5db125883f XQuartz: Fix prototypes for thread functions
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 3960115dbc)
2011-04-27 18:56:01 -07:00
Jeremy Huddleston
f3e33fb1ed XQuartz: Make the DarwinProcessFDAdditionQueue_thread wait 3 seconds to allow xinitrc to catch up
Previously, we weren't always waiting the full three seconds.  This should
be better, but is still sub-optimal.  We really want to start processing
these once a WM has been started.

http://xquartz.macosforge.org/trac/ticket/416

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 7524dbd061)
2011-04-27 18:55:55 -07:00
Jeremy Huddleston
a73311f830 configure.ac: Bump verison to 1.10.1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-15 17:58:57 -07:00
Jeremy Huddleston
55f85d6cc2 Revert "dix: release all buttons and keys before reattaching a device (#34182)"
This patch introduced a regression, reverting for the 1.10.1 release. See
https://bugs.freedesktop.org/show_bug.cgi?id=36146

This reverts commit 81fbb96c54.
2011-04-14 15:24:07 -07:00
Jeremy Huddleston
ec6e1e4562 configure.ac: Version bumped to 1.10.0.902 (1.10.1 RC2)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-08 16:36:32 -07:00
Chase Douglas
7379f7a771 Fix unset valuator handling for XI 1.x valuator events again
Set the valuator values for unset masked absolute valuators in the
internal device event. This ensures the values will always be correct in
getValuatorEvents even if the device has been removed.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b28a1af55c)
2011-04-08 09:55:38 -04:00
Chase Douglas
89142b356b Don't report old relative values in getValuatorEvents
Relative valuator values should not be reported in any future events. If
a relative valuator value is not set in an internal event, set the value
to 0 for XI 1.x valuator events sent over the wire.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f40103cee1)
2011-04-08 09:55:19 -04:00
Chase Douglas
f1a8f8afc7 Handle non continuous valuator data in getValuatorEvents
This allows for masked valuators to be handled properly in XI 1.x
events. Any unset valuators in the device event are set to the last
known value when transmitted on the wire through XI 1.x valuator events.

Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8199eac443)
2011-04-08 09:55:19 -04:00
Chase Douglas
a9c90ebe33 Clean up getValuatorEvents using array loop logic
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ac00ab77d5)
2011-04-08 09:55:18 -04:00
Matthieu Herrb
1f51fe4f74 Xi: fix querydevice request swapping
WriteReplyToClient() swaps rep.length, so it can't be used
on return of WriteReplyToClient(). So save it's value for later
use.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 266ea63bc3)
2011-04-07 08:36:59 +10:00
Matthieu Herrb
2f12adb2c9 Xext: fix test on extension number for the swapped case.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 552c78592c)
2011-04-07 08:36:59 +10:00
Matthieu Herrb
e08a7df54d Xi: add XI_Focus{In,Out} to swapped events.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit a074e6b675)
2011-04-07 08:36:59 +10:00
Matthieu Herrb
69ee0f68b7 Xi: take XI2 requests into account also for the swapping case.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 81257377a2)
2011-04-07 08:36:59 +10:00
Peter Hutterer
0a54ec5099 man: list the drivers that are ignored when hotplugging (#35209)
X.Org Bug 35209 <http://bugs.freedesktop.org/show_bug.cgi?id=35209>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 6f46ae3c69)
2011-04-07 08:36:58 +10:00
Daniel Stone
e9ba0539de Input: Don't freeze unrelated devices in DeliverGrabbedEvent
When delivering an event to a device grabbed with SyncBoth,
DeliverGrabbedEvent walks the device tree looking for associated devices
to freeze them.  Unfortunately, it froze all devices instead of just the
paired device, and the previous fix in 4fbadc8b17 would still break
if the same client had a non-SyncBoth grab on another unrelated master
device.

Fix this by completely ignoring devices that aren't our paired device.

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>
(cherry picked from commit b636893137)
2011-04-07 08:36:58 +10:00