platform/upstream/xorg-server.git
12 years agoconfigure.ac: Bump to 1.11.1.902 (1.11.2 RC2) xorg-server-1.11.1.902
Jeremy Huddleston [Sat, 29 Oct 2011 01:32:28 +0000 (18:32 -0700)]
configure.ac: Bump to 1.11.1.902 (1.11.2 RC2)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoXWin: windowswm: Correct byte swapping in event notifications
Jeremy Huddleston [Wed, 26 Oct 2011 06:53:43 +0000 (23:53 -0700)]
XWin: windowswm: Correct byte swapping in event notifications

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit 286fa9bf9b4ffb0f9dbd3f1cae46ddcb27ee9318)

12 years agoXQuartz: appledri: Correct byte swapping in event notifications
Jeremy Huddleston [Wed, 26 Oct 2011 06:49:33 +0000 (23:49 -0700)]
XQuartz: appledri: Correct byte swapping in event notifications

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit dc054fefc586c5b404fe0f949dbd456e5267c647)

12 years agoXQuartz: applewm: Correct byte swapping in event notifications
Jeremy Huddleston [Wed, 26 Oct 2011 06:48:16 +0000 (23:48 -0700)]
XQuartz: applewm: Correct byte swapping in event notifications

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit d5fee2b638fabeb8bec31a24e57d5c2a232d0893)

12 years agoXQuartz: appledri: Allow byte swapped requests
Jeremy Huddleston [Fri, 21 Oct 2011 17:27:16 +0000 (10:27 -0700)]
XQuartz: appledri: Allow byte swapped requests

Even though it's only valid when local, it is possible for a local
client and the server to not match endianness, such as when running
a ppc application under Rosetta.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 1c8bda798b4480bab0f0da6f531e4770c7a1f771)

12 years agoXQuartz: appledri: Fix byte swapping in replies
Jeremy Huddleston [Fri, 21 Oct 2011 05:34:44 +0000 (22:34 -0700)]
XQuartz: appledri: Fix byte swapping in replies

Even though it's only valid when local, it is possible for a local
client and the server to not match endianness, such as when running
a ppc application under Rosetta.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit 14205ade0c750191bf43fba8bd55c65dba912cf4)

Conflicts:

hw/xquartz/xpr/appledri.c

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoXQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmap
Jeremy Huddleston [Fri, 21 Oct 2011 05:23:07 +0000 (22:23 -0700)]
XQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmap

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

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit 2ba0ac202ad64eb4a555715980ba538de19c9fd7)

12 years agoXnest: Match the host's keymap
Jeremy Huddleston [Sun, 16 Oct 2011 09:12:38 +0000 (02:12 -0700)]
Xnest: Match the host's keymap

This was a regression.

Introduced by: 08363c5830bdea34012dcd954b45ccfdc79a3a7e and
               32db27a7f867b503c2840ca7b815e96d10be9210
Masked by: 1e69fd4a60147287b31e53bfc61543fb17bb82c8

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit 83fef4235db86343477b4ec9858c6ba35e1aa7d9)

12 years agoFix drain_console unregistration
Tomáš Trnka [Tue, 11 Oct 2011 07:11:18 +0000 (09:11 +0200)]
Fix drain_console unregistration

Bug introduced by 9dca441670d261a9a9fb6108960ed48f3d58fb7f
xfree86: add a hook to replace the new console handler.

console_handler was not being set, making the server eat up CPU spinning
in WaitForSomething selecting consoleFd over and over again, every time
trying to unregister drain_console without success due to
console_handler being NULL.

Let's just fix the unregistration in xf86SetConsoleHandler() and use that.

But wait, there could be a catch: If some driver replaced the handler using
xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister
that one. I don't understand Xorg well enough to know whether this poses a
problem (could mess up driver deinit somehow or something like that). As it is,
xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which
handler is currently registered).

I had been using it for two days on my machine that previously hit 100% CPU
several times a day. That has now gone away without any new problems appearing.

Signed-off-by: Tomas Trnka <tomastrnka@gmx.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 323869f3298cbbfe864af9404a8aed1bf7995d79)

12 years agocrtc: match full preferred modes if possible when choosing an initial config
Jesse Barnes [Thu, 13 Oct 2011 19:01:10 +0000 (12:01 -0700)]
crtc: match full preferred modes if possible when choosing an initial config

It's fairly common to have multiple, identical monitors plugged in.  In
that case, it's preferable to run the monitor's preferred mode on each
output, rather than just matching the width & height and end up with
different timings or refresh rates.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 3e145d3d67b472cb5d74cb8078b614160c4722b7)

12 years agocomposite: Update borderClip in compAllocPixmap()
Ville Syrjala [Sat, 8 Oct 2011 22:11:04 +0000 (01:11 +0300)]
composite: Update borderClip in compAllocPixmap()

Previously the parent constrained borderClip was copied over
when compRedirectWindow() is called. That is insufficient eg. in
case the window was already redirected, but not yet realized. So
copy the borderClip over in compAllocPixmap() instead.

Example:
Window 1 is below an automatically redirect window 2. Window 2 is
unmapped and moved outside the extents of window 1. Window 2 is
then mapped again, and MarkOverlappedWindows() uses the up to
date borderSize of window 2 to mark windows, which leaves
window 1 unmarked. Then exposures are calculated using the stale
borderClip of window 2, which causes the window below window 2,
to be exposed through an apparent hole in window 1.

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

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a5266dcb3a60587e1877f90c18552baf60b597a0)

12 years agoFix CVE-2011-4029: File permission change vulnerability.
Matthieu Herrb [Mon, 17 Oct 2011 20:27:35 +0000 (22:27 +0200)]
Fix CVE-2011-4029: File permission change vulnerability.

Use fchmod() to change permissions of the lock file instead
of chmod(), thus avoid the race that can be exploited to set
a symbolic link to any file or directory in the system.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit b67581cf825940fdf52bf2e0af4330e695d724a4)

12 years agoFix CVE-2011-4028: File disclosure vulnerability.
Matthieu Herrb [Mon, 17 Oct 2011 20:26:12 +0000 (22:26 +0200)]
Fix CVE-2011-4028: File disclosure vulnerability.

use O_NOFOLLOW to open the existing lock file, so symbolic links
aren't followed, thus avoid revealing if it point to an existing
file.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 6ba44b91e37622ef8c146d8f2ac92d708a18ed34)

12 years agoconfigure.ac: Bump to 1.11.1.901 (1.11.2 RC1) xorg-server-1.11.1.901
Jeremy Huddleston [Fri, 14 Oct 2011 23:29:54 +0000 (16:29 -0700)]
configure.ac: Bump to 1.11.1.901 (1.11.2 RC1)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agodix: don't XWarpPointer through the last slave anymore (#38313)
Peter Hutterer [Fri, 29 Jul 2011 06:33:54 +0000 (16:33 +1000)]
dix: don't XWarpPointer through the last slave anymore (#38313)

This line was introduced pre-1.6 to fix Bug 19297. The effect of warping
through the VCP then was that if a device had custom valuator ranges, the
warp position would be wrong. The better device for this effect is the the
XTest device.

This fixes a server crash where the lastSlave is a pointer device without
valuators (Bug 38313#0).

And while we're at it, make sure the Xinerama code-path does the same.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 2bfb802839688ecf328119c4c6979390fc60348d)

12 years agoDisable check of double-aligned in test/input.c on Renesas SH
Nobuhiro Iwamatsu [Tue, 9 Aug 2011 02:00:34 +0000 (11:00 +0900)]
Disable check of double-aligned in test/input.c on Renesas SH

Renesas SH is not aligned at size of double.
When structure has double value, It is aligned in 4byte (long).

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b29ce0726d55ec41cfbce0814e21b0217ef64efe)

12 years agodix: don't use the pointer as modifier device in UngrabKey.
Peter Hutterer [Mon, 1 Aug 2011 04:12:41 +0000 (14:12 +1000)]
dix: don't use the pointer as modifier device in UngrabKey.

Modifier device is always the keyboard.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 8c5a4d6fbecf79f2dc4f2d836d741203b2d5e856)

12 years agodix: ignore devices when adding passive core grabs to list (#39545)
Peter Hutterer [Thu, 28 Jul 2011 05:56:08 +0000 (15:56 +1000)]
dix: ignore devices when adding passive core grabs to list (#39545)

Passive core grabs are mostly device-independent. In an MPX scenario, they
may change to reflect whichever master pair activated the grab last. For
adding new grabs to the list, ignore the device for core grabs to return
failures when trying to set the same grab combo twice on a window.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 09496996accfdaf7bc01097a25db400912004d97)

12 years agodix: avoid using the VCP as modifier device
Peter Hutterer [Thu, 28 Jul 2011 05:43:10 +0000 (15:43 +1000)]
dix: avoid using the VCP as modifier device

Core grabs may change device when they're activated to reflect the master
they apply to. If the device is a keyboard, modifierDevice is erroneously
set to the Virtual Core Pointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 80c37048539daa1d257d127d66502bde45c97c85)

12 years agoconfig: fix a log message
Peter Hutterer [Wed, 20 Jul 2011 06:21:28 +0000 (16:21 +1000)]
config: fix a log message

PRODUCT was taken from the parent, hence ppath.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit e684e816acb617b4dc66a68e2b0ba8f80399170a)

12 years agoxkb: add missing swaps for xkbGetDeviceInfoReply
Peter Harris [Fri, 2 Sep 2011 22:45:16 +0000 (18:45 -0400)]
xkb: add missing swaps for xkbGetDeviceInfoReply

Caught during review of e095369bf.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit c90903b4f7a826ae6826a8dd0a901c8362500e46)

Conflicts:

xkb/xkb.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXQuartz: pbproxy: Add missing AM_OBJCFLAGS
Jeremy Huddleston [Wed, 5 Oct 2011 04:40:03 +0000 (21:40 -0700)]
XQuartz: pbproxy: Add missing AM_OBJCFLAGS

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit fae7ed62ad476114bd37b566202cf6b6546c0a1f)

13 years agoFix a rare memory leak
vdb@picaros.org [Sat, 17 Sep 2011 16:55:47 +0000 (18:55 +0200)]
Fix a rare memory leak

Signed-off-by: Servaas Vandenberghe <vdb@picaros.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit e4cddf509e1729e8ff40354275b65455111ad2bd)

13 years agoFix server crash due to invalid images
Kirill Elagin [Tue, 4 Oct 2011 19:02:20 +0000 (23:02 +0400)]
Fix server crash due to invalid images

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

Signed-off-by: Kirill Elagin <kirelagin@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 53611213396479abfdce0f7752681572e0d26d78)

13 years agodixfonts: Don't overwrite local c variable until new_closure is safely initialized.
Alan Hourihane [Wed, 5 Oct 2011 02:42:46 +0000 (19:42 -0700)]
dixfonts: Don't overwrite local c variable until new_closure is safely initialized.

Signed-off-by: Alan Hourihane <alanh@vmware.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 7a33c5b934382b5554f41ab1502514e91c9bc52e)

13 years agoRemove the SendEvent bit (0x80) before doing range checks on event type.
Sam Spilsbury [Wed, 14 Sep 2011 01:58:34 +0000 (09:58 +0800)]
Remove the SendEvent bit (0x80) before doing range checks on event type.

Some extension libraries may set this bit before converting the event to
wire protocol and as such range checking the event will cause an invalid
BadValue error to result. As the documentation suggests the the bit
should be "forced on", remove it before doing range checks and continue
to force it on in the server.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39)

13 years agoXi: Fix passive XI2 ungrabs on XIAll[Master]Devices
Carlos Garnacho [Tue, 30 Aug 2011 22:46:52 +0000 (00:46 +0200)]
Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices

The corresponding DeviceIntPtr wasn't being gotten properly,
resulting in BadDevice from dixLookupDevice().

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>
(cherry picked from commit f52d5cd374563544dafe29587411f345e31bbdf8)

13 years agoXQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we...
Jeremy Huddleston [Wed, 21 Sep 2011 03:39:06 +0000 (20:39 -0700)]
XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 38e9e28ba2fbffee52ad9889ef6d4e94c7af3e10)

13 years agoFix pixmap double-frees on error paths.
Jamey Sharp [Wed, 15 Sep 2010 01:35:21 +0000 (18:35 -0700)]
Fix pixmap double-frees on error paths.

If AddResource fails, it will automatically free the object that was
passed to it by calling the appropriate deleteFunc; and of course
FreeResource also calls the deleteFunc. In both cases it's wrong to call
the destroy hook manually.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit 0f380a5005f800572773cd4667ce43c7459cc467)

13 years agoconfigure.ac: Version bumped to 1.11.1 xorg-server-1.11.1
Jeremy Huddleston [Sat, 24 Sep 2011 07:06:32 +0000 (00:06 -0700)]
configure.ac: Version bumped to 1.11.1

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agofb: Rename wfbTriangles and wfbTrapezoids
Aaron Plattner [Wed, 14 Sep 2011 22:25:06 +0000 (15:25 -0700)]
fb: Rename wfbTriangles and wfbTrapezoids

These symbols were not renamed when they were added to libfb:

 # nm -D libwfb.so | grep ' fb'
 0000000000028d00 T fbTrapezoids
 0000000000028d60 T fbTriangles

This causes corruption and/or crashes on wfb-ful drivers like nvidia:

 Program received signal SIGABRT, Aborted.
 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
     in ../nptl/sysdeps/unix/sysv/linux/raise.c
 (gdb) bt
 #0  0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 #1  0x00007fd67f3a3680 in *__GI_abort () at abort.c:92
 #2  0x00007fd67f3995b1 in *__GI___assert_fail (assertion=0x7fd679ecb804 "key->initialized", file=<optimized out>, line=116, function=0x7fd679ecbbc0 "dixGetPrivateAddr")
     at assert.c:81
 #3  0x00007fd679ec55b6 in ?? () from /usr/lib/xorg/modules/libfb.so
 #4  0x00007fd679eca9ef in ?? () from /usr/lib/xorg/modules/libfb.so
 #5  0x00007fd679ecae20 in fbTriangles () from /usr/lib/xorg/modules/libfb.so
 #6  0x00007fd67a58fc55 in ?? () from /usr/lib/xorg/modules/drivers/nvidia_drv.so
 #7  0x00000000004f38d1 in ?? ()
 #8  0x0000000000437ae9 in ?? ()
 #9  0x0000000000426eaa in ?? ()
 #10 0x00007fd67f38cead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>,
     rtld_fini=<optimized out>, stack_end=0x7fff99860d78) at libc-start.c:228
 #11 0x000000000042719d in _start ()

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 03d032991da21bf866ca30dcbb6b7f9f99df441a)

13 years agoxfree86: Bump extension ABI version to 6.0
Aaron Plattner [Tue, 30 Aug 2011 03:44:18 +0000 (20:44 -0700)]
xfree86: Bump extension ABI version to 6.0

The video driver ABI was bumped to 11.0 in commit
0de7cec90738a7a5020150309866bb0e23b6f479 because of a change to the
size of ATOM in commit 51f353d0a0d116af16d7d9590cadef6c56328746.  This
also affects extension modules, so the extension ABI version should
have been bumped too.

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>
13 years agoVersion bumped to 1.11 xorg-server-1.11.0
Keith Packard [Fri, 26 Aug 2011 23:46:13 +0000 (16:46 -0700)]
Version bumped to 1.11

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agofb: Fix memcpy abuse
Adam Jackson [Thu, 21 Apr 2011 20:37:11 +0000 (16:37 -0400)]
fb: Fix memcpy abuse

The memcpy fast path implicitly assumes that the copy walks
left-to-right.  That's not something memcpy guarantees, and newer glibc
on some processors will indeed break that assumption.  Since we walk a
line at a time, check the source and destination against the width of
the blit to determine whether we can be sloppy enough to allow memcpy.
(Having done this, we can remove the check for !reverse as well.)

On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in
NoAccel, the broken code and various fixes for -copywinwin{10,100,500}
gives (edited to fit in 80 columns):

1: Disable the fastpath entirely
2: Replace memcpy with memmove
3: This fix
4: The code before this fix

  1            2                 3                 4           Operation
------   ---------------   ---------------   ---------------   ------------
258000   269000 (  1.04)   544000 (  2.11)   552000 (  2.14)   Copy 10x10
 21300    23000 (  1.08)    43700 (  2.05)    47100 (  2.21)   Copy 100x100
   960      962 (  1.00)     1990 (  2.09)     1990 (  2.07)   Copy 500x500

So it's a modest performance hit, but correctness demands it, and it's
probably worth keeping the 2x speedup from having the fast path in the
first place.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoXQuartz: Initialize darwin pointer valuators
Pelle Johansson [Mon, 15 Aug 2011 00:44:40 +0000 (17:44 -0700)]
XQuartz: Initialize darwin pointer valuators

This fixes a regression introduced by: 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde

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

Signed-off-by: Pelle Johansson <pelle@morth.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoEXA/mixed: Update sys_pitch in MPH even when there's no system memory copy.
Michel Dänzer [Wed, 10 Aug 2011 09:36:16 +0000 (11:36 +0200)]
EXA/mixed: Update sys_pitch in MPH even when there's no system memory copy.

Otherwise sys_pitch will be stale when a system memory copy is allocated.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38322 and a crash when
unlocking the screen with xscreensaver, reported by Janne Huttunen.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Janne Huttunen <jahuttun@gmail.com>
Tested-by: Jan Kriho <Erbureth@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoXephyr/dri: register screen and window privates on init
Julien Cristau [Thu, 7 Jul 2011 17:18:03 +0000 (19:18 +0200)]
Xephyr/dri: register screen and window privates on init

Fixes assertion failure when calling dixSetPrivate
Debian bug#632549 <http://bugs.debian.org/632549>

Reported-and-tested-by: Mohammed Sameer <msameer@foolab.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoVersion bumped to 1.10.99.902 (1.11 RC2) xorg-server-1.10.99.902
Keith Packard [Thu, 4 Aug 2011 03:57:03 +0000 (20:57 -0700)]
Version bumped to 1.10.99.902 (1.11 RC2)

At the close of the 1.11 non-critical fixes window.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agocomposite: Inhibit window background paint with manual subwindow redirection
Ville Syrjälä [Fri, 6 May 2011 15:19:34 +0000 (18:19 +0300)]
composite: Inhibit window background paint with manual subwindow redirection

The composite extension spec says that window background painting
should be inhibited when the subwindow redirection mode is set to
manual.

This eliminates the ugly flashing effect when compiz unredirects a
fullscreen window.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Owen Taylor <otaylor@fishsoup.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoRevert "composite: Don't backfill non-MapWindow allocations"
Pierre-Loup A. Griffais [Thu, 28 Jul 2011 22:17:59 +0000 (15:17 -0700)]
Revert "composite: Don't backfill non-MapWindow allocations"

This reverts commit db8840600e8e21356241eb87395031388d9b54d2.

It was an optimization for the resize case, but 193ecc8b453b22 made
it so that no backfilling takes place on resize if left in.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Conflicts:

composite/compalloc.c
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoXquartz: include new localization files in the tarball
Julien Cristau [Sun, 31 Jul 2011 19:14:59 +0000 (21:14 +0200)]
Xquartz: include new localization files in the tarball

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: xpr: Don't FatalError if xp_unlock_window fails
Jeremy Huddleston [Thu, 21 Jul 2011 17:33:58 +0000 (10:33 -0700)]
XQuartz: xpr: Don't FatalError if xp_unlock_window fails

We added the FatalError in 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 but
it caused a regression http://xquartz.macosforge.org/trac/ticket/482

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Use CFSTR to avoid implicit cast warning of NSString * to CFStringRef
Jeremy Huddleston [Wed, 20 Jul 2011 07:16:42 +0000 (00:16 -0700)]
XQuartz: Use CFSTR to avoid implicit cast warning of NSString * to CFStringRef

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agorandr: Compare all the bytes in RRPostPendingProperties
Aaron Plattner [Fri, 29 Jul 2011 23:12:06 +0000 (16:12 -0700)]
randr: Compare all the bytes in RRPostPendingProperties

RRPostPendingProperties tries to compare the pending and current
property values to decide whether they're actually changing.  However,
it does this using a memcmp that passes in pending_value->size as the
number of bytes.  This is actually the number of elements, where each
element is (pending_value->format / 8) bytes long.  This causes the
pending value to not be propagated if the first pending_value->size
bytes are the same and only the end of it is changing.

Fix this by computing the total number of bytes to compare in the
memcmp.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Fri, 29 Jul 2011 21:58:58 +0000 (14:58 -0700)]
Merge remote-tracking branch 'whot/for-keith'

13 years agoTerminate the log with one last message.
Peter Hutterer [Wed, 20 Jul 2011 03:09:05 +0000 (13:09 +1000)]
Terminate the log with one last message.

Instead of just closing the log when everything is done, put one more
message in stating that we're actually terminating. Users or scripts that
look at the Xorg.log will then know that a) the server has terminated
properly and b) why the server terminated (to some degree, given that most
real-world errors will be caused by AbortServer()).

Acked-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoconfigure: set default xkb rules to evdev on Linux
Julien Cristau [Tue, 26 Jul 2011 18:40:38 +0000 (20:40 +0200)]
configure: set default xkb rules to evdev on Linux

If config/udev was enabled, this would default to base, which means that
after regen the devices would get the wrong rules, and hilarity would
ensue.

It's probably safe to default to evdev unconditionally on Linux by now.

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoInitialize the fd to -1 for xorg.conf input devices.
Peter Hutterer [Tue, 19 Jul 2011 23:00:18 +0000 (09:00 +1000)]
Initialize the fd to -1 for xorg.conf input devices.

For hotplugged devices, xf86AllocateInput does that for us but the xorg.conf
path is different. Since not all drivers reset the fd during PreInit but may
still call close(pInfo->fd) in all cases, this can terminate the logging
early.

Reproducible: add a wacom driver InputDevice section with no Option Device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoxfree86: NULL option values are technically valid, don't strdup them
Peter Hutterer [Mon, 4 Jul 2011 02:34:32 +0000 (12:34 +1000)]
xfree86: NULL option values are technically valid, don't strdup them

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoxfree86: duplicate xorg.conf device information before xf86NewInputDevice
Peter Hutterer [Mon, 4 Jul 2011 04:14:39 +0000 (14:14 +1000)]
xfree86: duplicate xorg.conf device information before xf86NewInputDevice

xf86ConfigLayout.inputs contains the information from the xorg.conf
file. Passing this into xf86NewInputDevice means the device will get
cleaned up on exit and the pointers in xf86ConfigLayout.inputs are left
dangling. In the second server generation, this results in a server
crash.

Also, rename pDev to pInfo. pDev is pretty much reserved for DeviceIntPtr
types.

Reproducible: AutoAddDevices off and xorg.conf input sections, trigger
server regeneration.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoxfree86: Remove devices that failed to enable on startup
Peter Hutterer [Mon, 27 Jun 2011 06:30:28 +0000 (16:30 +1000)]
xfree86: Remove devices that failed to enable on startup

Devices that succeeded during PreInit and DEVICE_INIT but failed in
DEVICE_ON would be deleted through xf86DeleteInput but not removed from the
list of input devices (and not turned off). The result was a double free on
server shutdown.

Fix this by calling RemoveDevice if EnableDevice fails.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoconfig: don't fail if a device vanished by the time we managed to look at it
Lennart Poettering [Mon, 18 Jul 2011 19:18:27 +0000 (21:18 +0200)]
config: don't fail if a device vanished by the time we managed to look at it

The nature of hotplug is that a device we enumerated might already be
gone by the time we look at it, so don't assume otherwise.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoconfig: limit the kernel subsystems we look for devices in
Lennart Poettering [Mon, 18 Jul 2011 19:17:49 +0000 (21:17 +0200)]
config: limit the kernel subsystems we look for devices in

Don't enumerate/monitor all devices of the system (since that can be
quite a few), but limit our search to devices from the "input"
subsystem, as well as the "tty" subsystem (to cover Wacom tablets).

This should make X start up a bit faster and reduce the number of
unnecessary wake-ups of the X server.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoconfig: process udev "changed" and "add" events in the same code paths
Lennart Poettering [Mon, 18 Jul 2011 19:17:10 +0000 (21:17 +0200)]
config: process udev "changed" and "add" events in the same code paths

udev gives no guarantee that before each "changed" event for a device
there's an "add" event, or that before each "remove" is an "add", or
that before each "add" there was no "add" already and so on. Users can
trigger these events at any time with "udevadm trigger", and netlink is
a lossy transport, hence the events can come in unexpected ordering.

With other words: regardless which event is generated, the X server must
not choke on it and make the best of it, hence make sure that if we get
an "add" event for an existing device we don't add the device a second
time.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoRemove hw/xwin/xlaunch
Jon TURNEY [Sat, 9 Jul 2011 12:21:04 +0000 (13:21 +0100)]
Remove hw/xwin/xlaunch

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
13 years agoXQuartz: Localization updates
Jeremy Huddleston [Wed, 20 Jul 2011 03:03:48 +0000 (20:03 -0700)]
XQuartz: Localization updates

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add english NIB changes for scroll_in_device_direction
Jeremy Huddleston [Wed, 20 Jul 2011 03:02:33 +0000 (20:02 -0700)]
XQuartz: Add english NIB changes for scroll_in_device_direction

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add GUI controls to toggle scroll_in_device_direction
Jeremy Huddleston [Wed, 20 Jul 2011 03:01:11 +0000 (20:01 -0700)]
XQuartz: Add GUI controls to toggle scroll_in_device_direction

Also cleaned up the wording for fullscreen_menu.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add a scroll_in_device_direction preference
Jeremy Huddleston [Wed, 20 Jul 2011 03:00:27 +0000 (20:00 -0700)]
XQuartz: Add a scroll_in_device_direction preference

This preference allows users to override the related option in Mac OS X's
Mouse/Trackpad preferences.  This effectively lets the user determine
which "context" all of X11 fits into for context-based scrolling until
such API exists within X11 itself to pass along to X11 clients.

This is applicable to Mav OS X 10.7+

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add diagnostic error checking to xp_destroy_surface.
George Staplin [Wed, 4 Mar 2009 09:03:52 +0000 (02:03 -0700)]
XQuartz: Add diagnostic error checking to xp_destroy_surface.

This occurred to me in hindsight after the last commit.  If the
original developer had done this, we would have noticed the
problem sooner.
(cherry picked from commit aa0a57996f3e7d16238f69976958c2526821388b)

13 years agoXQuartz: Fix a memory leak with surfaces that a new test found.
George Staplin [Wed, 4 Mar 2009 08:39:58 +0000 (01:39 -0700)]
XQuartz: Fix a memory leak with surfaces that a new test found.

xp_destroy_surface was called with a surface id of 0, due to some
premature cleanup that set it to 0.  This means the surfaces
weren't being destroyed until the window was.

The code that did that was: pDRIDrawablePriv->sid = 0;

In long running applications this leak may or may not have been
harmful.  With the old libGL the surfaces weren't destroyed until
the context was destroyed or a new context created.  In the new
libGL they are reference counted, and released much sooner, so we
ran into a resource leak more noticeably with some tests.

Make the Apple DRI code dispatch events to the client(s) for
destroyed surfaces, when a resource is destroyed.  This seems to
work in my tests, however this clearly wasn't working for a while,
so bugs may result in the future if it enables some new (unexpected)
side effects.

Also add a few helpful comments to aid in understanding the code
in the future.

Tested with the test suite, Pymol, and various Mesa demos.
(cherry picked from commit bede83eb19a1629396fcd5a46441f8476a8fcd1b)

13 years agoXQuartz: DRI: Dead code removal
Jeremy Huddleston [Wed, 20 Jul 2011 02:42:44 +0000 (19:42 -0700)]
XQuartz: DRI: Dead code removal

Also add some comments that weren't merged in from server-1.4-apple's
99babae1326485c27eb9253db83afdd6aef9e362

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add some sanity checking and a fallback for the bundle id.
Jeremy Huddleston [Tue, 19 Jul 2011 05:54:21 +0000 (22:54 -0700)]
XQuartz: Add some sanity checking and a fallback for the bundle id.

This way we'll print an error and still mostly work rather than crashing if
someone installs XQuartz.app incorrectly or tries running the server within
the build system rather than the installed system.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: DarwinEQFini doesn't return Bool
Jeremy Huddleston [Fri, 15 Jul 2011 17:39:39 +0000 (10:39 -0700)]
XQuartz: DarwinEQFini doesn't return Bool

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXKB: Work around broken interps from old xkbcomp
Daniel Stone [Wed, 13 Jul 2011 11:08:04 +0000 (12:08 +0100)]
XKB: Work around broken interps from old xkbcomp

Bugfix for broken xkbcomp: if we encounter an XFree86Private action with
Any+AnyOfOrNone(All), then we skip the interp as broken.  Versions of
xkbcomp below 1.2.2 had a bug where they would interpret a symbol that
couldn't be found in an interpret as Any.  So, an
XF86LogWindowTree+AnyOfOrNone(All) interp that triggered the PrWins
action would make every key without an action trigger PrWins if libX11
didn't yet know about the XF86LogWindowTree keysym.  None too useful.

We only do this for XFree86 actions, as the current XKB dataset relies
on Any+AnyOfOrNone(All) -> SetMods for Ctrl in particular.

See xkbcomp commits 2a473b906943ffd807ad81960c47530ee7ae9a60 and
3caab5aa37decb7b5dc1642a0452efc3e1f5100e for more details.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoFix non-Composite builds in PrintWindowTree
Daniel Stone [Wed, 13 Jul 2011 11:08:03 +0000 (12:08 +0100)]
Fix non-Composite builds in PrintWindowTree

The previous patch accidentally introduced a hard dependency on
Composite.  Sorry, OS X.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoMerge remote-tracking branch 'jturney/master'
Keith Packard [Wed, 13 Jul 2011 18:44:15 +0000 (11:44 -0700)]
Merge remote-tracking branch 'jturney/master'

13 years agoXWinrc: replace hard coded section number with __filemansuffix__
Gaetan Nadon [Tue, 12 Jul 2011 23:50:05 +0000 (19:50 -0400)]
XWinrc: replace hard coded section number with __filemansuffix__

Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoXWinrc: replace hard coded section number with __filemansuffix__
Gaetan Nadon [Thu, 23 Jun 2011 11:45:13 +0000 (07:45 -0400)]
XWinrc: replace hard coded section number with __filemansuffix__

Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agoglx: Remove a few lingering traces of __GLXscreen.GLXVersion
Jon TURNEY [Mon, 24 Jan 2011 18:29:41 +0000 (18:29 +0000)]
glx: Remove a few lingering traces of __GLXscreen.GLXVersion

The GLXversion member of the __GLXscreen struct
is just cruft since commit ad5c0d9efa47476ed5cf75c82265c73919e468b4,
when we started returning the minimum GLX version supported by all
of the screens on the display, rather than the maximum version supported
by the server.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin: Add -wgl option to XWin manpage
Jon TURNEY [Thu, 20 Jan 2011 16:21:04 +0000 (16:21 +0000)]
hw/xwin: Add -wgl option to XWin manpage

Document the -[no]wgl options in the XWin manpage

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin: Add items to WGL AIGLX todo
Jon TURNEY [Tue, 2 Nov 2010 11:38:53 +0000 (11:38 +0000)]
hw/xwin: Add items to WGL AIGLX todo

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin: Report Window XIDs in Window debug messages
Jon TURNEY [Mon, 11 Oct 2010 15:22:49 +0000 (16:22 +0100)]
hw/xwin: Report Window XIDs in Window debug messages

Report Window XIDs in Window create/destroy/reparent debug messages

It's actually quite useful if you are trying to corrolate those events
with what a client is doing...

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin: Add a flag to track which windows have been drawn to using WGL.
Jon TURNEY [Mon, 11 Oct 2010 15:25:03 +0000 (16:25 +0100)]
hw/xwin: Add a flag to track which windows have been drawn to using WGL.

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Fix some warnings in generated wrapper code
Colin Harrison [Thu, 24 Mar 2011 20:39:51 +0000 (20:39 +0000)]
hw/xwin/glx: Fix some warnings in generated wrapper code

Add a suitable cast to the generated code for glWinSetupDispatchTable()
so it doesn't generate screeds of warnings

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Handle failure to get any fbconfigs more gracefully.
Jon TURNEY [Mon, 24 Jan 2011 18:41:05 +0000 (18:41 +0000)]
hw/xwin/glx: Handle failure to get any fbconfigs more gracefully.

Handle failure to get any useful pixel formats for GLX fbconfigs
more gracefully:  If we didn't get any useful pixel formats from
wglGetPixelFormatAttribivARB(), fall back to using DescribePixelFormat().
If that doesn't give us any useful pixel formats, fallback to software
rendering.

This works around a problem with Intel 845G drivers, where
wglGetPixelFormatAttribivARB() doesn't seem to work as we expect it to...

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Don't spam log with wglwrap symbol resolution status at startup
Jon TURNEY [Mon, 1 Nov 2010 19:53:42 +0000 (19:53 +0000)]
hw/xwin/glx: Don't spam log with wglwrap symbol resolution status at startup

... instead just log if an attempt is made to call a wrapper for
a function which didn't resolve

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Better handling of SetPixelFormat() failure
Jon TURNEY [Sat, 30 Oct 2010 16:23:52 +0000 (17:23 +0100)]
hw/xwin/glx: Better handling of SetPixelFormat() failure

Propagate and report the failure if SetPixelFormat() fails

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Improvements to glxWinErrorMessage() reporting in WGL GLX provider
Jon TURNEY [Sat, 30 Oct 2010 16:22:33 +0000 (17:22 +0100)]
hw/xwin/glx: Improvements to glxWinErrorMessage() reporting in WGL GLX provider

Request the message using languageID 0 (best effort), rather than only using language neutral messages
Always report the numeric error code.
Trim any trailing \r from FormatMessage() output

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agohw/xwin/glx: Fix fbconfig dumper formatting for 3 digit index numbers
Jon TURNEY [Mon, 11 Oct 2010 15:21:40 +0000 (16:21 +0100)]
hw/xwin/glx: Fix fbconfig dumper formatting for 3 digit index numbers

Some graphics hardware supports hundreds of pixel formats, so adjust
formatting in fbconfig dumper for 3 digit index numbers

Also report the PFD_SUPPORT_DIRECTDRAW, PFD_DIRECT3D_ACCELERATED and
PFD_SUPPORT_COMPOSITION flags introduced with aero

Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
13 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Fri, 1 Jul 2011 22:45:45 +0000 (15:45 -0700)]
Merge remote-tracking branch 'whot/for-keith'

13 years agoinput: free the EQ allocated memory on shutdown (#38634)
Peter Hutterer [Sun, 26 Jun 2011 23:10:42 +0000 (09:10 +1000)]
input: free the EQ allocated memory on shutdown (#38634)

mieqFini() already does the right thing, but it needs to be called by the
various DDXs and the XTest Extension.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoInput: Reset SD remainder when copying co-ords from MD
Daniel Stone [Wed, 2 Mar 2011 14:52:42 +0000 (14:52 +0000)]
Input: Reset SD remainder when copying co-ords from MD

In updateSlaveDeviceCoords, pDev->last.valuators was being copied from
the master, but pDev->last.remainder wasn't.  Make sure we copy both, to
avoid minor inconsistencies.

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>
13 years agoinput: add POINTER_NORAW to avoid generation of raw events (#30068)
Peter Hutterer [Fri, 24 Jun 2011 01:02:23 +0000 (11:02 +1000)]
input: add POINTER_NORAW to avoid generation of raw events (#30068)

RawEvents are supposed to be events coming from the driver. When warping the
pointer, this should not generate a raw event.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoTest: Input: Only ever set up to MAX_VALUATORS valuators
Daniel Stone [Tue, 1 Mar 2011 11:11:22 +0000 (11:11 +0000)]
Test: Input: Only ever set up to MAX_VALUATORS valuators

Previously, the input tests were working up to sizeof(mask) * 8, which
could be more than the arrays; the latter only being sized as
MAX_VALUATORS.

Hypothetically, if you were switching the stored valuator values to
double instead of uint32_t, and you attempted to set the 39th member of
a MAX_VALUATORS-sized (36) array, you'd probably end up smashing
ev->key_repeat into oblivion and then tripping the check for invalid
flags because you haven't yet put XIPointerEmulated into the valid flags
for XI_Motion.  Probably.

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>
13 years agoTest: Ensure libxservertest gets relinked when necessary
Daniel Stone [Fri, 17 Jun 2011 15:28:05 +0000 (16:28 +0100)]
Test: Ensure libxservertest gets relinked when necessary

Similar to how we link Xorg, make sure that whenever any of the
component libraries changes, we relink libxservertest and the tests.
Not much use testing anything other than the actual source in your tree.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoKDrive: Remove useless miPointerUpdateSprite call
Daniel Stone [Fri, 17 Jun 2011 12:20:19 +0000 (13:20 +0100)]
KDrive: Remove useless miPointerUpdateSprite call

miPointerUpdateSprite is already called from mieqProcessInputEvents, so
calling it by hand immediately after isn't massively helpful.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoDMX: Remove useless miPointerUpdateSprite call
Daniel Stone [Fri, 17 Jun 2011 12:19:46 +0000 (13:19 +0100)]
DMX: Remove useless miPointerUpdateSprite call

miPointerUpdateSprite is already called from mieqProcessInputEvents, so
calling it by hand immediately after isn't massively helpful.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXWin: Remove executable bit from headers
Daniel Stone [Fri, 17 Jun 2011 14:29:44 +0000 (15:29 +0100)]
XWin: Remove executable bit from headers

Headers don't really need to be mode 0755.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Add debug key actions for grabs & window tree
Daniel Stone [Wed, 29 Dec 2010 12:03:01 +0000 (12:03 +0000)]
XKB: Add debug key actions for grabs & window tree

Add four new private XKB actions for debugging:
    * PrGrbs: print active grabs to the log file
    * Ungrab: ungrab all currently active grabs
    * ClsGrb: kill clients with active grabs
    * PrWins: dump the current window tree to the log file

To use these, you need to modify your XKB maps, e.g. the following to
have Ctrl+Alt+(F9-F12) mapped to the above:
 - compat/xfree86:
    interpret XF86LogGrabInfo {
        action = Private(type=0x86, data="PrGrbs");
    };
    interpret XF86Ungrab {
        action = Private(type=0x86, data="Ungrab");
    }
    interpret XF86ClearGrab {
        action = Private(type=0x86, data="ClsGrb");
    }
    interpret XF86LogWindowTree {
        action = Private(type=0x86, data="PrWins");
    }

 - symbols/pc:
    key <FK09> {        type="CTRL+ALT", [ Return, XF86LogGrabInfo      ]   };
    key <FK10> {        type="CTRL+ALT", [ Return, XF86Ungrab           ]   };
    key <FK11> {        type="CTRL+ALT", [ Return, XF86ClearGrab        ]   };
    key <FK12> {        type="CTRL+ALT", [ Return, XF86LogWindowTree    ]   };

At the moment, this only works if the grabbing client continues to call
AllowEvents, as the server does no event processing at all when a device
is frozen.

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>
13 years agoDIX: Make PrintWindowTree actually useful
Daniel Stone [Tue, 13 Oct 2009 08:56:57 +0000 (19:56 +1100)]
DIX: Make PrintWindowTree actually useful

Rewrite PrintWindowTree to make it actually tell you what you want to
know.

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>
13 years agoFix UTF-8 encoding
Matěj Cepl [Fri, 17 Jun 2011 14:26:17 +0000 (15:26 +0100)]
Fix UTF-8 encoding

Report to find out all non-UTF-8 files created by

cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do
    if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then
        /bin/true
    else
        echo $FILE
    fi
done >>report

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
[Daniel: git am failed for me, so I redid it.  The method listed in the
         commit message also failed, so I just used file/grep/iconv.  The
         results are the same though.]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agodix: avoid calling deleted block and wakeup handlers
Scott James Remnant [Tue, 14 Jun 2011 23:36:07 +0000 (16:36 -0700)]
dix: avoid calling deleted block and wakeup handlers

BlockHandler and WakeupHandlers may be removed within a different
BlockHandler or WakeupHandler, especially since config/udev uses
these and removes devices.

Calling the deleted handlers and passing potentially freed data
can result in the X server segfaulting after device removal, or
events that result in device removal such as undocking or suspend/
resume.

Signed-off-by: Scott James Remnant <scott@netsplit.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agodri2: restore Screen->ConfigNotify on close
Marcin Slusarz [Tue, 7 Jun 2011 19:22:15 +0000 (21:22 +0200)]
dri2: restore Screen->ConfigNotify on close

ConfigNotify is set by DRI2ScreenInit, but not restored to
previous state on close. Fix it.
(I'm preparing a patch for xf86-video-nouveau which detects GPU lockup
after dri2 init and it needs to reinitialize dri2)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoMerge remote-tracking branch 'jturney/master'
Keith Packard [Thu, 30 Jun 2011 03:14:51 +0000 (20:14 -0700)]
Merge remote-tracking branch 'jturney/master'

13 years agoMerge remote-tracking branch 'jbarnes/master'
Keith Packard [Thu, 30 Jun 2011 03:08:32 +0000 (20:08 -0700)]
Merge remote-tracking branch 'jbarnes/master'

13 years agoRemove unused check for PERL program
Gaetan Nadon [Thu, 23 Jun 2011 17:37:45 +0000 (13:37 -0400)]
Remove unused check for PERL program

Unable to find any use of the PERL Automake variable.
It was used in hw/xfree86/scanpci around 2005.
Should it ever be needed, use XORG_WITH_PERL macro.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge remote-tracking branch 'kibi/master'
Keith Packard [Thu, 30 Jun 2011 01:54:33 +0000 (18:54 -0700)]
Merge remote-tracking branch 'kibi/master'

13 years agoCygwin/X: Left-justify website link in About box
Yaakov Selkowitz [Tue, 23 Mar 2010 09:34:22 +0000 (04:34 -0500)]
Cygwin/X: Left-justify website link in About box

Left-justify website link in About box.  This is a cosmetic fix to make
the About box display correctly when Windows is configured with a
non-default DPI value

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
13 years agoCygwin/X: Preserve client area size and position on Windows window style change
Jon TURNEY [Thu, 12 Aug 2010 14:00:01 +0000 (15:00 +0100)]
Cygwin/X: Preserve client area size and position on Windows window style change

When the style changes, adjust the window size so the client area remains the same.

Otherwise the window size may change when sizing is reflected from Windows to X, and
some windows are drawn expecting them to be exactly the requested size (e.g. the
gmplayer control window)

Use DeferWindowPos to delay the resize to preserve client area on WM_STYLECHANGING
until after the style change has actually happened in WM_STYLECHANGED

As a consquence of this, we need to be more careful to create windows with exactly
the requested placement and client area initially, so the client area matches what
the X client requested

Also synchronize the X windows idea of the placement of a window which Windows is
allowed to place

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>