Commit graph

5808 commits

Author SHA1 Message Date
Jeremy Huddleston Sequoia
01aac1f533 XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2
<rdar://problem/12338921>
http://bugs.winehq.org/show_bug.cgi?id=31751

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 25d26875bc)
2012-10-14 17:42:25 -07:00
Peter Hutterer
9422321b37 xfree86: add xf86UpdateDesktopDimensions()
This call is required for external drivers (specifically NVIDIA) that do
not share the xfree86 infrastructure to update the desktop dimensions.
Without it, the driver would update the ScreenRecs but not update the total
dimensions the input code relies on for transformation.

This call is a thin wrapper around the already-existing internal call and
should be backported to all stable series servers, with the minor ABI bump.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
CC: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit 0a75bd640b)

Conflicts:
	hw/xfree86/common/xf86.h
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86Module.h
2012-10-12 10:46:07 +10:00
Jeremy Huddleston Sequoia
8995fcf260 XQuartz: Bump version to 2.7.3
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-26 22:09:49 -07:00
Jeremy Huddleston Sequoia
0754f74a53 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
We forgot to multiply by sizeof(), so it wasn't fully zeroed out.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 7c3d2e4828)
2012-08-19 08:52:06 -07:00
Jeremy Huddleston Sequoia
2141f21d51 XQuartz: console_redirect: Set the correct location for reading into the buffer
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>
(cherry picked from commit a32e01802f)
2012-08-19 08:51:49 -07:00
Alan Coopersmith
b6be94d89c Fix up formatting of initializers for arrays of structs
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>
(cherry picked from commit 9f7ef7f7f0)
2012-08-19 08:45:55 -07:00
Adam Jackson
afe8ef9043 randr: Fix up yet another corner case in preferred mode selection
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>
(cherry picked from commit ff56f88616)
2012-08-19 08:42:22 -07:00
Dave Airlie
af8ffefc07 kinput: allocate enough space for null character.
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>
(cherry picked from commit 531785dd74)
2012-08-19 08:41:37 -07:00
Vic Lee
3a2b67577c ephyr: Resize screen automatically when parent window is resized
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>
(cherry picked from commit 8843aed82e)
2012-08-19 08:41:15 -07:00
Adam Jackson
7749c58134 ephyr: Fix up some bizarre formatting
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b46bbafae6)
2012-08-19 08:40:20 -07:00
Jeremy Huddleston Sequoia
631715e129 XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 884f51e977)
2012-08-03 10:16:28 -07:00
Jon TURNEY
e2df31de39 hw/xquartz: Various fixes for pseudoramiX.c
Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c:
 Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize

These fixes seem to be necessary in order to compile pseudoramiX.c with gcc

pseudoramiX.c: In function 'ProcPseudoramiXGetState':
pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount':
pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize':
pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 067931ccce)
2012-08-03 10:16:21 -07:00
Jeremy Huddleston
dfc943609a XQuartz: Call xp_window_bring_all_to_front if available in libXplugin
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit fd228d3184)
2012-08-01 18:13:37 -07:00
Jeremy Huddleston
bfcc45861c XQuartz: Fix incorrect PseudoramiXExtensionInit prototype
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 1a64d3cc9c)
2012-08-01 18:11:53 -07:00
Jeremy Huddleston
cb8fbccba7 XQuartz: Silence an unused-variable warning
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 228f8bfe81)
2012-08-01 18:10:46 -07:00
Daniel Stone
fc13888f19 Xinerama: Fix ExtensionInit prototype
Huh, so I guess INITARGS used to be int argc, char *argv then.  Either
way, it's now void, so fix that ...

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
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>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit bddb8c6cbe)
2012-08-01 18:04:37 -07:00
Daniel Stone
ce106ae299 Xorg: Link XKB DDX library after core server libs
libxorgxkb.a contains a number of libraries which are used by XKB action
code to call back into the DDX, e.g. for VT switching, termination, grab
breaking, et al.  Make sure libxkb.a comes first in the link order, so
it can mark XkbDDX* as used in order for the linker to not discard them.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 67953d6975)
2012-08-01 18:02:49 -07:00
Alan Coopersmith
eeefadf95e Use calloc to zero fill buffers being allocated for replies & events
Ensures padding bytes are zero-filled

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit cdf5bcd420)
2012-08-01 17:59:23 -07:00
Alan Coopersmith
8cefa9bf07 xf86dga2.c & xf86vmode.c: Move REQUEST_SIZE_MATCH checks before using stuff
Seems silly waiting to check if the client failed to send us enough bytes
until after we've already tried using them.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit ef0f701c92)
2012-08-01 17:59:07 -07:00
Dave Airlie
4060ebfea0 xf86: cursor code got mangled by indenting
This fixes some really ugly code that got mangled by the indenting.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 2c52d776a4)
2012-08-01 17:51:49 -07:00
Michal Srb
7197c1c571 Look for ModuleData only in appropriate library
LoaderSymbol calls dlsym with RTLD_DEFAULT pseudo handle making it search in
every loaded library. In addition glibc adds NODELETE flag to the library
containing the symbol.

It's used in doLoadModule to locate <modulename>ModuleData symbol, the
module's library gets the flag and is kept in memory even after it is
unloaded.

This patch adds LoaderSymbolFromModule function that looks for symbol only in
library specified by handle. That way the NODELETE flag isn't added.

This glibc behavior doesn't seem to be documented, but even if other
implementations differ, there is no reason to search ModuleData symbol outside
the module's library.

Signed-off-by: Michal Srb <msrb@suse.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>

v2: Switch LoaderSymbolFromModule arguments order.
    Correct description.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 258abbf823)
2012-08-01 17:40:41 -07:00
Alan Coopersmith
b348cfd4b8 Remove obsolete tab stop comments from hw/xfree86/parser/*.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ff541e0a1f)
2012-08-01 17:15:46 -07:00
Julien Cristau
e08f1c261c Bump video ABI version to 12.1
Track the addition of DRI2CreateDrawable2.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2012-07-30 19:26:26 +02:00
Michel Dänzer
60da502963 dri2: Add DRI2CreateDrawable2.
Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the
DRI2 drawable reference to the base drawable.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 8a87acc9e5)

Signed-off-by: Julien Cristau <jcristau@debian.org>
2012-07-30 19:26:15 +02:00
Daniel Stone
cdeb178cd0 DRI2: Remove prototype for DRI2DestroyDrawable
DRI2DestroyDrawable() was still being _X_EXPORTed, but hasn't existed
since 1da1f33f last year.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b8a3267c36)

Signed-off-by: Julien Cristau <jcristau@debian.org>
2012-07-30 19:26:08 +02:00
Torsten Kaiser
738e55ebbd xfree86: EDID Est III parsing skips some modes
This loop needs to count from 7 to 0, not only from 7 to 1.
The current code always skips the modes {1152, 864, 75, 0}, {1280, 1024, 85, 0},
{1400, 1050, 75, 0}, {1600, 1200, 70, 0} and {1920, 1200, 60, 0}.

Signed-off-by: Torsten Kaiser <x11@ariolc.dyndns.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7c9d8cbd36)
2012-07-09 10:39:29 +10:00
Torsten Kaiser
f27fcb81c4 xfree86: EDID Est III parsing can walk off end of array
Using -O3 gcc notes that m could reach beyound the end of the EstIIIModes array,
if the last bits of the 11s byte where set.
Fix this, by extending the array to cover all possible bits from est.

https://bugs.freedesktop.org/show_bug.cgi?id=45623

Signed-off-by: Torsten Kaiser <x11@ariolc.dyndns.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 0b3abacb64)
2012-07-09 10:39:24 +10:00
Peter Hutterer
e4497cd002 xfree86: always enable SIGIO on OsVendorInit (#50957)
Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That
function does not actually enable the signal if it was blocked to begin
with. As a result, if one vt-switches away from the server (SIGIO is
blocked) and then triggers a server regeneration, the signal remains
blocked and input devices are dead.

Avoid this by always unblocking SIGIO when we start the server.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9f1edced9a)
2012-07-09 10:39:03 +10:00
Peter Hutterer
c4d28c40bf xfree86: fix use-after-free issue in checkInput
*dev is the condition of the while loop we're in, reset to NULL after
freeing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e3f47be9fb)
2012-07-09 10:39:02 +10:00
Marcin Slusarz
f4a1ecb928 xfree86: fix mouse wheel support for DGA clients
xf86-input-evdev (since "smooth scrolling" support was added) can send mouse
motion and wheel events in one batch, so we need to handle it properly.
Otherwise mouse wheel events which come with motion events are lost
and separate mouse wheel events are handled through non-DGA path.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2d4fda4b09)
2012-06-05 12:10:29 +10:00
Alan Coopersmith
97cae5e07a Convert sbusPaletteKey to latest DevPrivate API
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 96e0ab5496)
2012-05-29 13:19:08 -07:00
Alan Coopersmith
3484ef2de5 cvt man page should use Hz, not kHz, for vertical refresh rate
https://bugs.freedesktop.org/show_bug.cgi?id=48311

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit c3180a74a4)
2012-05-29 13:18:59 -07:00
Alan Coopersmith
a5808eae02 Undocument Font Module loading
Code was deleted in commit affec10635

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 5a3a98fcb7)
2012-05-29 13:18:41 -07:00
Alan Coopersmith
9a4e2d80a5 Undocument mandatory loadable modules
The code to implement was deleted when BaseModules[] was emptied by
the replacement of the "pcidata" module with libpciaccess calls
in commit 46f55f5dea.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit afcb7ba24e)
2012-05-29 13:18:27 -07:00
Jeremy Huddleston
19126c0b36 XQuartz: Avoid a race in initialization of darwinPointer
http://xquartz.macosforge.org/trac/ticket/579

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit acdc4f54ee)
2012-05-29 13:17:03 -07:00
Jeremy Huddleston
198a876e34 XQuartz: Provide fls implementation for Tiger
Regression-from: 30623d6ff7
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit f5fc533411)
2012-05-29 13:17:03 -07:00
Jeremy Huddleston
300970f8f8 XQuartz: Tiger build fix
http://trac.macports.org/ticket/34364

Regression-from: 662d41acdd

Reported-by: Peter Dyballa <Peter_Dyballa@Freenet.DE>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit e0097ce971)
2012-05-29 13:17:02 -07:00
Jeremy Huddleston
21956e2f8e XQuartz: Workaround an SDK bug on Leopard/x86_64
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4acbaa3027)
2012-05-29 13:17:02 -07:00
Michal Suchanek
f012f0c48d dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN
and fix resulting printf warning in dmxLogVisual

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d662fa2450)
2012-05-10 00:50:35 -07:00
Keith Packard
3ad72a8008 hw/xfree86: Re-indent xf86vmode.c
This is the result of re-running the 'x-indent.sh' script over
xf86vmode.c to clean up the disaster caused by broken syntax in the
file.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9779b904c7)
2012-05-10 00:50:34 -07:00
Keith Packard
b5bf0ac540 hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly
Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the
function definition for xf86VidModeNotifyEvent had an extra ');'
before the prototype argument declarations. This was harmless for the
compiler as the code never gets used, but completely messed up the
file re-indentation. This patch removes the spurious characters in
preparation for re-indenting the file.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 592bd0ae2b)
2012-05-10 00:50:34 -07:00
Jeremy Huddleston
22a1953c4a XQuartz: Make sure we tell startx the correct server binary to use in our fallback path
With multiple servers installed, we can't be certain if X is Xorg or Xquartz

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 93d6ba5b71)
2012-05-02 21:03:28 -07:00
Michal Suchanek
ed33772a0d xfree86: workaround crash on close
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Knut Petersen <Knut_Petersen@t-online.de>
(cherry picked from commit fa6dddc6ce)
2012-04-26 21:07:09 -07:00
Jeremy Huddleston
6b45dff024 XQuartz: darwinPointer now sends both absolute and relative motion
This should hopefully help out wine clients that were continuing to
have issues after the earlier changes.

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

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit e34519e525)
2012-04-26 21:07:09 -07:00
Jeremy Huddleston
0d13e62da2 XQuartz: Add a hack to better handle clicky wheel scroll mice
We loose information from AppKit being in our way.  Before adopting
smooth scrolling, we always rounded-up the number of scroll button
clicks per NSEvent.  Now, the scroll value is accumulated in the
dix, and clicky scroll wheels with legacy X11 clients are seeing
an accumulation of error due to so many translations (button press
to smooth scrolling value in AppKit, passed to the dix, and then
synthesized into a button press).  This attempts to make the
situation better.

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

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 662d41acdd)
2012-04-26 21:07:09 -07:00
Jeremy Huddleston
287f8271a3 XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit eda85290ae)
2012-04-26 21:07:09 -07:00
Jeremy Huddleston
67cc65ba3c XQuartz: Separate out tablet and mouse event delivery into separate functions
This should have no immediate impact aside from fake mouse buttons no longer
working with tablets (where they aren't needed or desired anyways).  This
prepares us for future changes.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit b99586c908)
2012-04-26 21:07:08 -07:00
Jeremy Huddleston
72226dc434 XQuartz: Correct calculation of the size of our file descriptor array in console_redirect
Reported-by: Joe Rohde <joer@valvesoftware.com>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 30623d6ff7)
2012-04-26 21:07:08 -07:00
Jeremy Huddleston
8a48d44574 XQuartz: Fix a deadlock in pre-dispatch code
The fact that this has been in place so long makes me really wonder if
anybody cares about this running in Tiger or Leopard.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit b4c4c65a35)
2012-04-26 21:07:08 -07:00
Jeremy Huddleston
ad89533327 Revert "xfree86: workaround crash on close"
This reverts commit b704d91463.

This was causing some regressions.  Reverting as discussed on xorg-devel.
2012-04-09 19:36:38 -07:00