Commit Graph

12430 Commits

Author SHA1 Message Date
Aaron Plattner
5047810a4c fb: Rename wfbDestroyGlyphCache
Renaming this function was missed in commit
9cbcb5bd6a, so both libfb.so and libwfb.so define
functions named fbDestroyGlyphCache.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Søren Sandmann <ssp@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-07 18:20:18 -08:00
Keith Packard
103b77c59e Version bumped to 1.14
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-05 22:31:17 -08:00
Aaron Plattner
6238bd68bd DPMS: include GPU screens in DPMS code
Otherwise, displays driven by GPU screens remain on all the time.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-05 13:55:49 -08:00
Peter Hutterer
dd4ab8b572 Xi: force dtime to 0 on the first BarrierHit
dtime to the previous event is 0 on the first BarrierHit event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-04 21:10:22 -08:00
Keith Packard
604169af8b Merge commit '6ea59dc2d8887102bfd8d7c838d2e7ab17645aec' 2013-03-04 21:09:59 -08:00
Jasper St. Pierre
6ea59dc2d8 xibarriers: Remove accidental use of the comma operator
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-04 20:17:02 +10:00
Dave Airlie
8f4640bdb9 randr: cleanup provider properly
So in the cold plug server shutdown case, we reap the resources
before we call CloseScreen handlers, so the config->randr_provider
is a dangling pointer when the xf86CrtcCloseScreen handler is called,

however in the hot screen unplug case, we can't rely on automatically
reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen
case.

This patch provides a cleanup callback from the randr provider removal
into the DDX so it can cleanup properly, this then gets called by the automatic
code for cold plug, or if hot unplug it gets called explicitly.

Fixes a number of random server crashes on shutdown
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-03-01 18:14:28 +10:00
Dave Airlie
3ec35c45ca xf86: actually set the compat output in the failure case
The previous fix for the previous fix, didn't fully work,

If we don't set compat_output we end up doing derferences
of arrays with -1, leading to valgrind warnings.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-03-01 18:14:28 +10:00
Dave Airlie
da8ee26023 xfree86/hotplug: cleanup properly if the screen fails to initialise
Due to another bug, the modesetting/udl driver would fail to init properly
on hotplug, when it did the code didn't clean up properly, and on removing
the device the server could crash.

Found in F18 testing.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2013-03-01 18:14:27 +10:00
Keith Packard
90642948cc Merge remote-tracking branch 'jeremyhu/master' 2013-02-14 11:05:48 -08:00
Peter Hutterer
9a35d4240e os: fix pnprintf OOB buffer read for unterminated length modifiers
Format strings with length modifiers but missing format specifier like "%0"
will read one byte past the array size.

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>
2013-02-14 11:01:21 -08:00
Jeremy Huddleston Sequoia
eda7dbff5a XORG_TLS: Pick the first option that works (ie: prefer __thread)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-02-14 09:20:47 -08:00
Jeremy Huddleston Sequoia
5da82f872d os: Ensure <dix-config.h> is included in strndup.c
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-14 09:20:46 -08:00
Jeremy Huddleston Sequoia
67eaf4b46f XQuartz: Ensure <dix-config.h> is included in capabilities.c
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-14 09:20:46 -08:00
Keith Packard
955d434f4d Update to version 1.3.99.902 (1.14 RC2)
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-13 21:39:37 -08:00
Aaron Plattner
7115f6c709 randr: unref the provider shared pixmap the appropriate number of times
When an RandR shared pixmap is created in rrCreateSharedPixmap, it has a refcnt
of 1.  Then, PixmapShareToSlave bumps the refcnt to 2.  However, there's no
corresponding PixmapUnshareFromSlave where the refcnt can be decreased again,
and there's no convenient common place where the refcnt can be decremented when
the slave pixmap is destroyed.

Fix this by just unreffing the pixmap twice in RRCrtcDetachScanoutPixmap.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-11 22:28:24 -08:00
Aaron Plattner
da92690107 xf86: use nt_list_for_each_entry_safe to walk InputHandlers in xf86Wakeup
This is necessary when the input handler deletes itself from the
list. Bug found by Maarten Lankhorst, this patch uses the list macros
instead of open-coding the fix.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-11 20:25:32 -08:00
Bryce Harrington
d0a1487787 xfree86: Man page shouldn't say Device is mandatory anymore
man xorg.conf states that the 'Device' identifier is required in the
'Screen' section, yet current xserver defaults properly and boots up
fine without it.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20742
Signed-off-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-11 13:49:51 -08:00
Bryce Harrington
5e91054aa0 xfree86: Use fbdev/vesa driver on Oaktrail, Medfield, CDV rather than -intel
Instead of defaulting to -intel for Oaktrail, Medfield, and CDV chips,
default to -fbdev.  For Poulsbo (only), attempt to use -psb if it's
installed, and fallback to fbdev otherwise.  All other Intel chips
should use -intel.

This fixed an issue where -intel would load on these chips and cause a
boot failure.  Newer -intel drivers avoid the boot hang, but it's still
the wrong driver to load, so why take chances.

The patch was originally created by Stefan Dirsch for OpenSUSE.  We have
included it in our stable release (Ubuntu "quantal" 12.10) since
December.

ref:  https://bugzilla.novell.com/show_bug.cgi?id=772279
ref:  https://bugs.launchpad.net/ubuntu/+bug/1069031
Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=60514
Signed-off-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-11 13:49:45 -08:00
Dave Airlie
c1602d1c17 randr: bump advertised RandR version to 1.4
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-08 09:09:54 -08:00
Peter Hutterer
9f79e93b6b Short-cut the input device cleanup process during AbortServer()
If we're about to abort, we're already in the signal handler and cannot call
down to the default device cleanup routines (which reset, free, alloc, and
do a bunch of other things).

Add a new DEVICE_ABORT mode to signal a driver's DeviceProc that it must
reset the hardware if needed but do nothing else. An actual HW reset is only
required for some drivers dealing with the HW directly.

This is largely backwards-compatible, hence the input ABI minor bump only.

Drivers we care about either return BadValue on a mode that's not
DEVICE_{INIT|ON|OFF|CLOSE} or print an error and return BadValue. Exception
here is vmmouse, which currently ignores it and would not reset anything.
This should be fixed if the reset is required.

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>
2013-02-08 09:06:14 -08:00
Peter Hutterer
b58221f9da dix: support the transformation matrix for relative devices.
The transformation matrix we previously stored was a scaled matrix based on
the axis ranges of the device. For relative movements, the scaling is not
required (or desired).

Store two separate matrices, one as requested by the client, one as the
product of [scale . matrix . inv_scale]. Depending on the type of movement,
apply the respective matrix.

For relative movements, also drop the translation component since it doesn't
really make sense to use that bit.

Input ABI 19

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>
2013-02-08 09:02:57 -08:00
Keith Packard
b173eb2ae3 os: Round fraction in pnprintf %f format
Truncating the fraction part leads to a test failure where -1203.30 is
printed as -1203.29. Round this to the nearest value instead by adding
0.5 before converting to an integer

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-08 08:57:43 -08:00
Carlos Garnacho
509b3c3dc8 dix: Set focus field on XI2 crossing events
Set on DeviceEnterLeaveEvent() the xXIEnterEvent->focus field
similarly to how the CoreEnterLeaveEvent() function above does
for core events.

This fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=677329
reported to GTK+, where focus handling on window managers with
sloppy focus or no window manager present was broken due to this
field being always set to FALSE.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08 16:09:27 +10:00
Peter Hutterer
3e4be4033a dix: when shutting down slave devices, shut down xtest devices last
XTest devices are the first ones in the list, being initialised together
with the master devices. If we disable the devices in-order and a device has
a button down when being disabled, the XTest device is checked for a
required button release (xkbAccessX.c's ProcessPointerEvent). This fails if
the device is already NULL.

Instead of putting the check there, disable the devices in the reverse order
they are initialised. Disable physical slaves first, then xtest devices,
then the master devices.

Testcase: shut down server with a button still held down on a physical
device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:12:56 +10:00
Peter Hutterer
0d5bb88260 Merge branch 'ptraccel-fixes' into for-keith 2013-02-08 14:10:52 +10:00
Peter Hutterer
61a99aff9d dix: pre-scale relative events from abs devices to desktop ratio (#31636)
Absolute devices may send relative events depending on the mode (synaptics
by default, wacom per option). The relative events are added to the previous
position, converted into device coordinates and then scaled into desktop
coordinates for pointer movement.

Because the device range must be mapped into the desktop coordinate range,
this results in uneven scaling depending dimensions, e.g. on a setup with
width == 2 * height, a relative movement of 10/10 in device coordinates
results in a cursor movement of 20/10 (+ acceleration)

Other commonly user-visible results:
* the touchpad changing acceleration once an external monitor as added.
* drawing a circle on a wacom tablet in relative mode gives an ellipsis in
  the same ratio as the desktop dimensions.

Solution: pre-scale the incoming relative x/y coordinates by width/height
ratio of the total desktop size. Then add them to the previous
coordinates and scale back with the previous mapping, which will undo the
pre-scaling and give us the right movement.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:00:57 +10:00
Peter Hutterer
a6ba2b79ae dix: unify prefix for ptraccel debugging in DebugAccelF macro
If we're already using our own custom macro, might as well use it properly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:00:56 +10:00
Peter Hutterer
0d7d794060 dix: use BUG_RETURN_VAL for an error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:00:56 +10:00
Peter Hutterer
a0c38ea6cb dix: add some more info to a ptraccel debug msg
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:00:56 +10:00
Peter Hutterer
95125a7c0c dix: fix ptraccel debugging printfs
This is mostly sigsafe code, so use sigsave printf. And update some fields
to double that used to be int.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 14:00:53 +10:00
Andreas Wettstein
b33fcb1497 xkb: Fix repeat behaviour of redirect and message actions
The redirect and the message action filter functions implicitly assumed that
when they receive an event for the same keycode they were activated for, that
this is the a release of the key that activated the filter.  This is not true
if the key autorepeats.  Due to the incorrect assumption, the effective key
repeat rate was effectively halved.

Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08 13:54:09 +10:00
Peter Hutterer
8571c648a7 Xext: if a root window is given in XTestFakeInput, move to that
For absolute events, if the client specifies a screen number offset the
coordinates by that. And add a new flag so we know when _not_ to add the
screen offset in GPE.

Without this offset and the flag, GPE would simply add the offset of the
current screen if POINTER_SCREEN is set.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 13:49:49 +10:00
Peter Hutterer
9fd6cb8953 Xext: pass the current screen to miProcessDeviceEvent() from xtest calls
Not passing in a screen means we skip the screen crossing updates, so a
xtest event that changes between ScreenRecs won't do so until the next
physical event comes in or never, whichever comes earlier.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 13:47:24 +10:00
Sybren van Elderen
a191dbfe85 dix: when scaling from desktop coord, take the total desktop size (#51904)
Scaled is already in desktop coordinates, take the total width into account,
not just the current screen's width.

Fixes Xdmx pointer position calculation.

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

Signed-off-by: Sybren van Elderen <sowmestno@msn.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08 13:47:24 +10:00
Peter Hutterer
1cb19803f0 include: fix typo in list description
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08 13:47:24 +10:00
Ted Felix
3d35dfcf5b xfree86: bail on misformed acpi strings (#73227)
If acpid sends a string in a format that we can't parse, bail out instead of
potentially dereferencing a NULL-pointer.

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

Signed-off-by: Ted Felix <ted@tedfelix.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08 13:47:23 +10:00
Peter Hutterer
fdc4515888 Xi: limit valuator copy to valuator array size (#59939)
mask[(MAX_VALUATORS + 7)/8] is larger than data[MAX_VALUATORS], so static
code checkers think we may be running OOB on the data array. Mask is
initialized to 0, so this should not happen, but change it anyway to shut up
code analyzer noise.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-08 13:47:23 +10:00
Alan Coopersmith
48bc30c541 Xext: avoid null-pointer dereference in XTestFakeInput (#59937)
dv is still NULL at this point, so return firstValuator instead (which is
the same value dv->firstValuator would be once initialized)

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

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>
2013-02-08 13:47:23 +10:00
Peter Hutterer
1058fcf57f dmx: don't include dmx-config.h from xdmxconfig (#37502)
dmx-config.h is a server header which includes dix-config.h. That again
defines a bunch of server-specifics, including setting the size of XID to
32 bit.

libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being
16 bytes smaller in xdmxconfig than in the library, causing garbage to be
sent to the server.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 13:47:17 +10:00
Jasper St. Pierre
7fe5e6dfa5 protocol-versions: Bump minor version of XI
This was accidentally excluded when we added barriers.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-23 19:05:31 -08:00
Aaron Plattner
70b127c9f1 config/udev: fix "removing GPU device" format string mistake
udev.c: In function 'device_removed':
 udev.c:270:9: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat]

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-21 19:41:09 -08:00
Dave Airlie
605dfc6804 xserver: fix build regression since 91ab237358
inputstr, double defines TouchListener typedef, maybe some gcc handles it,
but not all.

fixes tinderbox

Reported-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-21 14:24:08 -08:00
Keith Packard
069d8ed3eb Merge remote-tracking branch 'jturney/xserver-next' 2013-01-20 15:58:38 -08:00
Keith Packard
591c06277b Merge remote-tracking branch 'whot/for-keith' 2013-01-20 15:52:26 -08:00
Peter Hutterer
cde7cbe967 os: add support for %f to pnprintf
This is the lazy man's %f support. Print the decimal part of the number,
then append a decimal point, then print the first two digits of the
fractional part. So %f in sigsafe printing is really %.2f.

No boundary checks in place here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-17 17:17:41 +10:00
Peter Hutterer
20def57632 os: silently ignore length modifiers in pnprintf
Until we have support for them, ignore any length modifiers so we don't need
to update all callers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-17 17:17:38 +10:00
Peter Hutterer
f53b2012f3 test/signal-logging: simplify tests using sprintf
Ever looked at your own code and thought 'WTF was I thinking?'. yeah, that.

Instead of passing in the expected string just use sprintf to print the
number for us and compare. In the end we're just trying to emulate printf
behaviour anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-17 16:21:29 +10:00
Jon TURNEY
d6dcde7a03 hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16 16:50:39 +00:00
Jon TURNEY
56e94403f8 hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is updated correctly
Use ITaskBarList interface to ensure that the taskbar notices if the window has
changed it's style in a way which affects if the taskbar shows it or not.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16 16:50:26 +00:00