platform/upstream/xorg-server.git
13 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Wed, 25 May 2011 15:40:51 +0000 (09:40 -0600)]
Merge remote-tracking branch 'whot/for-keith'

13 years agofbbltone.c: Mark bitmasks as unsigned ints
Alan Coopersmith [Sun, 22 May 2011 20:50:14 +0000 (13:50 -0700)]
fbbltone.c: Mark bitmasks as unsigned ints

Clears many Sun compiler warnings:
"fbbltone.c", line 491: warning: integer overflow detected: op "<<"
"fbbltone.c", line 491: warning: integer overflow detected: op "<<"
"fbbltone.c", line 491: warning: integer overflow detected: op "<<"
"fbbltone.c", line 491: warning: initializer will be sign-extended: -16777216
"fbbltone.c", line 491: warning: integer overflow detected: op "<<"
"fbbltone.c", line 491: warning: initializer will be sign-extended: -1
"fbbltone.c", line 495: warning: integer overflow detected: op "<<"
"fbbltone.c", line 495: warning: integer overflow detected: op "<<"
"fbbltone.c", line 495: warning: integer overflow detected: op "<<"
"fbbltone.c", line 495: warning: initializer will be sign-extended: -256
"fbbltone.c", line 495: warning: integer overflow detected: op "<<"
"fbbltone.c", line 495: warning: initializer will be sign-extended: -1
"fbbltone.c", line 499: warning: integer overflow detected: op "<<"
"fbbltone.c", line 499: warning: integer overflow detected: op "<<"
"fbbltone.c", line 499: warning: integer overflow detected: op "<<"
"fbbltone.c", line 499: warning: initializer will be sign-extended: -65536
"fbbltone.c", line 499: warning: integer overflow detected: op "<<"
"fbbltone.c", line 499: warning: initializer will be sign-extended: -1

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoxserver: remove AbsoluteClass, breaking the A(P|B)I
Simon Thum [Thu, 10 Mar 2011 20:03:40 +0000 (21:03 +0100)]
xserver: remove AbsoluteClass, breaking the A(P|B)I

This struct was unused and has been effectively removed in
commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde
Refs: xorg-server-1.10.0-133-g633b81e

Remove the remainder, with an ABI bump to 13.0.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoxfree86: Allow "MatchLayout" statements in config files
Oleh Nykyforchyn [Thu, 19 May 2011 06:39:52 +0000 (09:39 +0300)]
xfree86: Allow "MatchLayout" statements in config files

Usage example (tested on a dual-seat PC):
Section "InputClass"
  Identifier "keyboard-all"
  MatchIsKeyboard "on"
  MatchDevicePath "/dev/input/event*"
  MatchLayout "!GeForce|!Matrox"
  Driver "evdev"
  Option "XkbLayout" "us"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

It disables auto keyboard configuration for layouts "GeForce" and "Matrox".
Note that "" in patterns means "no Layout sections found", e.g.
  MatchLayout "GeForce|"
is "in layout GeForce or without explicit layout at all".

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXephyr: fix pointer coordinate translation when screen is rotated
Tomas Frydrych [Wed, 18 May 2011 19:49:52 +0000 (20:49 +0100)]
Xephyr: fix pointer coordinate translation when screen is rotated

In the Xephyr case the position of the pointer relative toward the
Xephyr window is controlled by the host server without taking into
account rotation of the Xephyr screen. Consequently the pointer coords
must always be translated when the fb is rotated.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing
Tomas Frydrych [Wed, 18 May 2011 19:47:52 +0000 (20:47 +0100)]
Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing

The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be
NULL it seems.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoFix XWin compilation after updates for input API changes
Colin Harrison [Mon, 16 May 2011 18:31:57 +0000 (19:31 +0100)]
Fix XWin compilation after updates for input API changes

Fix XWin compilation after updates for input API changes in commits
e7150db5 8670c46b and 20fb07f4

Also remove a no longer needed InternalEvent* variable

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoinput: Don't implicitly define verify_internal_event
Jeremy Huddleston [Sat, 14 May 2011 23:23:59 +0000 (16:23 -0700)]
input: Don't implicitly define verify_internal_event

Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22

mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
    verify_internal_event(e);
    ^
1 error generated.

Also includes some other warning cleanups in events.c we're there.

events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue]
        else if ((type == MotionNotify))
                  ~~~~~^~~~~~~~~~~~~~~
events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue]
        else if ((type == MotionNotify))
                 ~     ^              ~
events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue]
        else if ((type == MotionNotify))
                       ^~
                       =
events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
    verify_internal_event(event);
    ^
events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
        DeviceIntPtr it = inputInfo.devices;
                     ^
events.c:5893:18: note: previous declaration is here
    DeviceIntPtr it = inputInfo.devices;
                 ^
3 warnings and 1 error generated.

events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type
      'const InternalEvent *' (aka 'const union _InternalEvent *')
    verify_internal_event(ev);
                          ^~
../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here
extern void verify_internal_event(const InternalEvent *ev);
                                                       ^
1 warning generated.

Found-by: yuffie tinderbox (-Werror=implicit)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoinput: Fix format string for verify_internal_event
Jeremy Huddleston [Sat, 14 May 2011 23:31:10 +0000 (16:31 -0700)]
input: Fix format string for verify_internal_event

inpututils.c:577:25: warning: conversion specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat,Format String Issue]
            ErrorF("%02hx ", *data);
                    ~~~~^    ~~~~~
                    %02hhx
1 warning generated.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoxfree86: bump to video ABI 11
Peter Hutterer [Thu, 19 May 2011 05:36:29 +0000 (15:36 +1000)]
xfree86: bump to video ABI 11

We've broken the ABI with some commit and drivers built against ABI 10
happily segfault now.

(The relevant patch is 51f353d0a0d116af16d7d9590cadef6c56328746 which
changed the ATOM typedef from unsigned long to uint32_t, thanks to
Cyril Brulebois <kibi@debian.org>  for figuring this out)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoXQuartz: Don't crash if CG increases our display resolution
Jeremy Huddleston [Sun, 22 May 2011 17:18:36 +0000 (10:18 -0700)]
XQuartz: Don't crash if CG increases our display resolution

miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
sized for the old resolution.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
Jeremy Huddleston [Sun, 22 May 2011 16:32:57 +0000 (09:32 -0700)]
XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays

If CG reports no displays when launching, we could crash in RandR.  Instead, just
provide a fake 800x600 display until we are notified about displays being attached.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Mark functions _X_NORETURN
Jeremy Huddleston [Thu, 19 May 2011 21:39:22 +0000 (14:39 -0700)]
XQuartz: Mark functions _X_NORETURN

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Silence clang warnings about shadow declarations
Jeremy Huddleston [Thu, 19 May 2011 21:35:56 +0000 (14:35 -0700)]
XQuartz: Silence clang warnings about shadow declarations

X11Application.m:1272:26: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
                xp_error e;
                         ^
X11Application.m:1098:36: note: previous declaration is here
- (void) sendX11NSEvent:(NSEvent *)e {
                                   ^
1 warning generated.

bundle-main.c:648:36: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
                    int max_files, i;
                                   ^
bundle-main.c:594:9: note: previous declaration is here
    int i;
        ^
1 warning generated.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Update DEBUG_LOG to report to ASL
Jeremy Huddleston [Thu, 19 May 2011 21:34:39 +0000 (14:34 -0700)]
XQuartz: Update DEBUG_LOG to report to ASL

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: RandR: Avoid over-releasing if we are unable to determine the current displa...
Jeremy Huddleston [Sun, 15 May 2011 01:33:57 +0000 (18:33 -0700)]
XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Don't call mieqEnqueue during server shutdown
Jeremy Huddleston [Sat, 14 May 2011 23:11:32 +0000 (16:11 -0700)]
XQuartz: Don't call mieqEnqueue during server shutdown

Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Fix an array-index-out-of-bounds crasher
Jeremy Huddleston [Sat, 14 May 2011 21:09:45 +0000 (14:09 -0700)]
XQuartz: Fix an array-index-out-of-bounds crasher

Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agodoc: use devbook.am for developers documentation
Gaetan Nadon [Sat, 14 May 2011 17:30:20 +0000 (13:30 -0400)]
doc: use devbook.am for developers documentation

Relocate the docs under the doc subdir.
Remove redundant xml subdir.
The xmlrules set of makefiles are no longer used.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodoc: relocate xserver.ent in the package root directory
Gaetan Nadon [Sat, 14 May 2011 17:30:19 +0000 (13:30 -0400)]
doc: relocate xserver.ent in the package root directory

This is the appropriate location for reusable configuration and/or
makefile artifacts as opposed to picking one of the subdirs where
it is used.

It shields them from future doc reorg as every subdir
will refer to the root package which never changes location.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodoc: add external doc references support to Xserver-DTrace
Gaetan Nadon [Sat, 14 May 2011 17:30:18 +0000 (13:30 -0400)]
doc: add external doc references support to Xserver-DTrace

This makefile is used to build the 60+ docbooks in xorg.
Dtrace is a user document and should be located under doc subdir.

This user document can now refer to external user/specs docs
or can be referred to by such documnets.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoman: relocate manual pages in the man subdir outside doc
Gaetan Nadon [Fri, 29 Apr 2011 01:16:13 +0000 (21:16 -0400)]
man: relocate manual pages in the man subdir outside doc

The convention is to have the manual pages in a man subdir
which is not under a doc dir. The doc dir contains users docs.
This will move man pages out of the way for upcoming DocBook patches.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodmx: fix warning for doxygen explicit links
Gaetan Nadon [Fri, 29 Apr 2011 01:16:12 +0000 (21:16 -0400)]
dmx: fix warning for doxygen explicit links

Explicit links to functions in another file are not supported.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodmx: modernize doxygen generation.
Gaetan Nadon [Fri, 29 Apr 2011 01:16:11 +0000 (21:16 -0400)]
dmx: modernize doxygen generation.

The configuration and stylesheet were very old.
The stylesheet is not checked-in, use the generated one.
The header is not checked-in, use the generated one.
Add datetime and projectname in default footer.
Developer documentation is not installed and not included in tarball.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodmx: split DocBook/XML and Doxygen makefile targets
Gaetan Nadon [Fri, 29 Apr 2011 01:16:10 +0000 (21:16 -0400)]
dmx: split DocBook/XML and Doxygen makefile targets

Maintaining either requires full knowledge of both.
It's not obvious one has to check the usage of global variables
in devbook.am when maintaining doxygen target. Or vice-versa.

Being in their respective directory, one less thing to worry about.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodmx/doc: use common makefile for developers documentation
Gaetan Nadon [Fri, 29 Apr 2011 01:16:09 +0000 (21:16 -0400)]
dmx/doc: use common makefile for developers documentation

The user/specs docs now have external references support.
Developers doc are not installed so they do not participate.
However, using a similar makefile shared amongst developers
document reduces maintenance and is forward looking.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodoc: use common makefile for developers documentation
Gaetan Nadon [Fri, 29 Apr 2011 01:16:08 +0000 (21:16 -0400)]
doc: use common makefile for developers documentation

The user/specs docs now have external references support.
Developers doc are not installed so they do not participate.
However, using a similar makefile shared amongst developers
document reduces maintenance and is forward looking.

Man pages being out of here, reorg developers docs under the same roof.
Drop the obsolete sgml subdir.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodri2: Don't send so many needless invalidate events
Ville Syrjälä [Fri, 6 May 2011 15:18:15 +0000 (18:18 +0300)]
dri2: Don't send so many needless invalidate events

Only send invalidate events for drawables if some client has requested
some buffers.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Fri, 13 May 2011 20:59:36 +0000 (13:59 -0700)]
Merge remote-tracking branch 'whot/for-keith'

13 years agoMerge remote-tracking branch 'jeremyhu/master'
Keith Packard [Fri, 13 May 2011 20:54:29 +0000 (13:54 -0700)]
Merge remote-tracking branch 'jeremyhu/master'

13 years agoMerge remote-tracking branch 'vsyrjala/composite_validatetree_2'
Keith Packard [Fri, 13 May 2011 20:52:18 +0000 (13:52 -0700)]
Merge remote-tracking branch 'vsyrjala/composite_validatetree_2'

13 years agoXQuartz: Don't circumvent NDEBUG
Jeremy Huddleston [Fri, 13 May 2011 16:10:42 +0000 (09:10 -0700)]
XQuartz: Don't circumvent NDEBUG

If someone wants to turn off asserts with NDEBUG, let them.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Redirect stdout/stderr to asl
Jeremy Huddleston [Wed, 11 May 2011 22:23:17 +0000 (15:23 -0700)]
XQuartz: Redirect stdout/stderr to asl

In order to improve logging in XQuartz, stdout and stderr should be redirected
to asl (syslog).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Add a LOGGING section to our man page
Jeremy Huddleston [Thu, 12 May 2011 22:45:29 +0000 (15:45 -0700)]
XQuartz: Add a LOGGING section to our man page

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: stub: Log directly to ASL rather than stdout/stderr
Jeremy Huddleston [Fri, 13 May 2011 01:29:23 +0000 (18:29 -0700)]
XQuartz: stub: Log directly to ASL rather than stdout/stderr

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoFix a typo: laucnd instead of launchd
Jeremy Huddleston [Thu, 12 May 2011 22:15:40 +0000 (15:15 -0700)]
Fix a typo: laucnd instead of launchd

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agodix: replace CORE_EVENT and XI2_EVENT macros with inline functions.
Peter Hutterer [Wed, 11 May 2011 03:35:39 +0000 (13:35 +1000)]
dix: replace CORE_EVENT and XI2_EVENT macros with inline functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agoinclude: add version_compare helper function
Peter Hutterer [Wed, 11 May 2011 02:20:50 +0000 (12:20 +1000)]
include: add version_compare helper function

Compare two version numbers in the major.minor form.
Switch the few users of manual version switching over to the new function.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: use a tmp variable instead of multiple rClient(other).
Peter Hutterer [Wed, 11 May 2011 01:43:16 +0000 (11:43 +1000)]
dix: use a tmp variable instead of multiple rClient(other).

no functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agoXi: split DeviceStateNotify delivery into a separate function
Peter Hutterer [Thu, 14 Apr 2011 05:59:08 +0000 (15:59 +1000)]
Xi: split DeviceStateNotify delivery into a separate function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: return deliveries from DeliverGrabbedEvent
Peter Hutterer [Thu, 14 Apr 2011 05:43:56 +0000 (15:43 +1000)]
dix: return deliveries from DeliverGrabbedEvent

This isn't currently used by any of the callers but it will likely be in the
future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: move the grab activation condition into a if block.
Peter Hutterer [Thu, 14 Apr 2011 05:09:39 +0000 (15:09 +1000)]
dix: move the grab activation condition into a if block.

Rather than 3 conditions with if (deliveries && ...), have one block with
the three in them.
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: split out client delivery from DeliverEventsToWindow
Peter Hutterer [Tue, 12 Apr 2011 04:04:37 +0000 (14:04 +1000)]
dix: split out client delivery from DeliverEventsToWindow

No real functional changes, this is just for improved readability.

DeliverEventsToWindow used to return an int to specify the number of
deliveries (or rejected deliveries if negative). The number wasn't used by
any caller other than for > 0 comparison.

This patch also changes the return value to be -1 or 1 even in case of
multiple deliveries/rejections. The comment was updated accordingly.

A future patch should probably use the enum EventDeliveryState for
DeliverEventsToWindow.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: split out window owner event delivery from DeliverEventsToWindow
Peter Hutterer [Tue, 12 Apr 2011 03:44:30 +0000 (13:44 +1000)]
dix: split out window owner event delivery from DeliverEventsToWindow

No functional changes, just for readability.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
13 years agodix: split implicit grab activation into a separate function.
Jamey Sharp [Wed, 11 May 2011 21:08:28 +0000 (14:08 -0700)]
dix: split implicit grab activation into a separate function.

I'm not sure I like splitting the check for button-press event from the
code which makes assumptions about that check. How about replacing
patches 3 and 4 with this patch instead?

Signed-off-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>
13 years agoconfigure.ac: XQuartz: Fix support for the deprecated --with-launchd-id-prefix
Jeremy Huddleston [Thu, 12 May 2011 00:27:52 +0000 (17:27 -0700)]
configure.ac: XQuartz: Fix support for the deprecated --with-launchd-id-prefix

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Don't call into CoreFoundation after fork() and before exec()
Jeremy Huddleston [Wed, 11 May 2011 06:42:46 +0000 (23:42 -0700)]
XQuartz: Don't call into CoreFoundation after fork() and before exec()

After fork()ing, we should just limit ourselves to setting up
the environment, file descriptors, and exec()ing.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agodix: replace unneded goto with break.
Peter Hutterer [Thu, 14 Apr 2011 06:45:56 +0000 (16:45 +1000)]
dix: replace unneded goto with break.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoinput: remove DDX event list handling
Peter Hutterer [Fri, 15 Apr 2011 00:07:10 +0000 (10:07 +1000)]
input: remove DDX event list handling

The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.

Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoinput: replace EventListPtr with InternalEvent array
Peter Hutterer [Thu, 14 Apr 2011 12:05:41 +0000 (22:05 +1000)]
input: replace EventListPtr with InternalEvent array

EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoinput: Provide Queue{Button|Keyboard|Proximity}Event helpers
Peter Hutterer [Mon, 11 Apr 2011 05:48:15 +0000 (15:48 +1000)]
input: Provide Queue{Button|Keyboard|Proximity}Event helpers

Don't require every caller to use GPE + mieqEnqueue, provide matching
Queue...Event functions instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoxfree86: print the device ID to the log when adding a device.
Peter Hutterer [Mon, 9 May 2011 05:13:17 +0000 (15:13 +1000)]
xfree86: print the device ID to the log when adding a device.

Sometimes the name isn't enough, it's handy to see the device ID's from the
log file.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Fix sense inversion for core MapNotify events
Daniel Stone [Tue, 3 May 2011 02:20:23 +0000 (03:20 +0100)]
XKB: Fix sense inversion for core MapNotify events

Due to an unfortunate sense inversion incident while switching from a
if (foo) { ... } to if (!foo) continue; style in f06a9d, we punished any
client who attempted to use XKB to restrict the MapNotify events they
wanted by sending them exactly the events they _didn't_ want, and
nothing else.

NewKeyboardNotifies (coming from a client setting the map with an XKB
request, when switching between master devices, etc) weren't affected,
but this would impact anyone using xmodmap-style core requests.  Could
explain a fair bit.

Clarified the comments while I was at it.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Send XKB events for all devices to all clients
Daniel Stone [Tue, 3 May 2011 02:07:50 +0000 (03:07 +0100)]
XKB: Send XKB events for all devices to all clients

We were using XIShouldNotify(client, device) as a test for whether or
not to send XKB map/state/etc changed events, which limits it to only
sending events for the current ClientPointer/ClientKeyboard for that
client.  While this makes perfect sense for core events (e.g.
MappingNotify), XKB events carry a device ID, so are safe to send to all
clients for all devices.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Send NewKeyboardNotify for dev before its master/slaves
Daniel Stone [Tue, 3 May 2011 02:03:06 +0000 (03:03 +0100)]
XKB: Send NewKeyboardNotify for dev before its master/slaves

When we change the keymap on a device, send the NewKeyboardNotify for
that device before we copy the keymap to and notify for its attached
master/slave devices.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Remove duplicate keymap-copying loop
Daniel Stone [Tue, 3 May 2011 01:59:53 +0000 (02:59 +0100)]
XKB: Remove duplicate keymap-copying loop

Previously we had:
    foreach (device + slaves of device) {
        XkbCopyDeviceKeymap(i, device);
        [...]
    }
    if (device was last slave of its MD) {
        XkbCopyDeviceKeymap(master, device);
    }
and now:
    foreach (device + slaves of device + MD if device was last slave) {
        XkbCopyDeviceKeymap(i, device);
        [...]
    }

As an extra bonus, when changing the keymap on a slave device, we now
ensure the LED info on the master is kept in sync.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Simplify a loop in ProcXkbGetKbdByName
Daniel Stone [Tue, 3 May 2011 01:50:48 +0000 (02:50 +0100)]
XKB: Simplify a loop in ProcXkbGetKbdByName

Replace:
    for (stuff; things; etc) {
        if (misc || other) {
            [...]
        }
    }
with:
    for (stuff; things; etc) {
        if (!misc && !other)
            continue;
        [...]
    }

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXKB: Don't send unnecessary NewKeyboardNotifies
Daniel Stone [Tue, 3 May 2011 01:39:55 +0000 (02:39 +0100)]
XKB: Don't send unnecessary NewKeyboardNotifies

In the XKB GetKeyboardByName handler, we had the following pseudocode:
    if (device was last slave of its MD) {
        XkbCopyDeviceKeymap(master, slave);
        XkbSendNewKeyboardNotify(slave, &notify);
    }

Even if the SendNewKeyboardNotify line nominated the correct device,
which it didn't, it's unnecessary as XkbCopyDeviceKeymap already sends a
NewKeyboardNotify on the destination device.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoInput: Simplify CheckPassiveGrabsOnWindow loop
Daniel Stone [Wed, 19 Jan 2011 20:42:10 +0000 (20:42 +0000)]
Input: Simplify CheckPassiveGrabsOnWindow loop

Instead of a mega never-ending if branch with no else, just continue
to the next iteration of the loop if the conditions aren't met - pretty
much entirely reindentation.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoInput: Make CheckPassiveGrabsOnWindow take InternalEvent
Daniel Stone [Wed, 19 Jan 2011 20:38:44 +0000 (20:38 +0000)]
Input: Make CheckPassiveGrabsOnWindow take InternalEvent

Previously, it only took DeviceEvents, but it would be much more useful
if it took InternalEvents.  Any event that activates a grab must still
be a DeviceEvent, so put in a check to enforce this.

Change all callers to make the appropriate casts.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoinput: change CHECKEVENT macro to verify_internal_event function
Peter Hutterer [Wed, 4 May 2011 22:48:19 +0000 (08:48 +1000)]
input: change CHECKEVENT macro to verify_internal_event function

The macro is sufficient if called during a development cycle, but not
sufficient information when triggered by a user (e.g.
https://bugzilla.redhat.com/show_bug.cgi?id=688693).

Expand what this does to print the event content and a backtrace, so at
least we know where we're coming from. Only the first 32 bytes are printed
since if something goes wrong, the event we have is almost certainly an
xEvent or xError, both restricted to 32 bytes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoXQuartz: Make a copy of args for our crash reporter vsnprintf
Jeremy Huddleston [Thu, 5 May 2011 16:04:41 +0000 (09:04 -0700)]
XQuartz: Make a copy of args for our crash reporter vsnprintf

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoinput: Only release SD buttons for explicit floating/reattachment (#36146)
Peter Hutterer [Fri, 15 Apr 2011 04:06:20 +0000 (14:06 +1000)]
input: Only release SD buttons for explicit floating/reattachment (#36146)

Grabbing an SD device temporary floats the device but we must not release
the buttons. Introduced in

    commit 9d23459415b84606ee4f38bb2d19054c432c8552
    Author: Peter Hutterer <peter.hutterer@who-t.net>
    Date:   Fri Feb 25 11:08:19 2011 +1000

    dix: release all buttons and keys before reattaching a device (#34182)

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agocomposite: Recompute clipping when changing between manual and automatic redirection
Ville Syrjälä [Wed, 13 Apr 2011 18:46:20 +0000 (21:46 +0300)]
composite: Recompute clipping when changing between manual and automatic redirection

Call compMarkWindows() when changing between manual and automatic
redirection modes. Otherwise the window clipping won't be recomputed
correctly.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
13 years agocomposite: Fix pWin->redirectDraw when changing between manual and automatic redirection
Ville Syrjälä [Wed, 13 Apr 2011 18:45:43 +0000 (21:45 +0300)]
composite: Fix pWin->redirectDraw when changing between manual and automatic redirection

compAllowPixmap() is not called when changing between manual and
automatic redirection modes. That means pWin->redirectDraw is left
with an incorrect value, and miComputeClips() gets confused whether
the window is supposed to be treated as transparent or not. Fix
the issue by updating pWin->redirectDraw in compCheckRedirect()
even when not calling compAllocPixmap().

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
13 years agocomposite: Copy the window contents back from the pixmap
Ville Syrjälä [Mon, 20 Dec 2010 14:37:24 +0000 (16:37 +0200)]
composite: Copy the window contents back from the pixmap

Since extra expose events are no longer generated during window
unredirection, the window contents must be preserved by the server.
So copy the window contents back from the pixmap. The copy can only
be done after the clips have been recomputed, so delay the copy and
the pixmap destruction until ValidateTree is done. Window borders are
restored by HandleExposures and thus don't need to be copied back.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agocomposite: Get rid of the internal UnmapWindow+MapWindow cycle
Ville Syrjälä [Fri, 17 Dec 2010 21:46:34 +0000 (23:46 +0200)]
composite: Get rid of the internal UnmapWindow+MapWindow cycle

Eliminate the internal MapWindow+UnmapWindow cycle around window
redirection changes. Instead do the work in a single pass by marking
the afected windows and calling ValidateTree and HandleExposures
directly. This gets rid of unnecessary expose events, and invalid
ClipNotify calls during rediredction changes. Now ClipNotify will only
get called with the final clip values, and expose events are only sent
to areas that actually got exposed.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agocomposite: Initialize borderClip with current values
Ville Syrjälä [Mon, 20 Dec 2010 14:30:52 +0000 (16:30 +0200)]
composite: Initialize borderClip with current values

ValidateTree needs a valid borderClip so initialize the parent
constrained border clip with the window's current borderClip
in compRedirectWindow.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agocomposite: Call ValidateGC after ChangeGC
Ville Syrjälä [Mon, 20 Dec 2010 14:33:36 +0000 (16:33 +0200)]
composite: Call ValidateGC after ChangeGC

ChangeGC changes the GC, so ValidateGC should be called after it, not
before.

Also pass NullClient instead of serverClient to ChangeGC() since we
know the changed values to be valid, and setting
serverClient->errorValue seems pointless anyway.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoXQuartz: prefs_copy_url and prefs_get_copy return retained objects
Jeremy Huddleston [Tue, 3 May 2011 17:54:09 +0000 (10:54 -0700)]
XQuartz: prefs_copy_url and prefs_get_copy return retained objects

No functional change.  This just annotates the return policy.

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Ensure that {CF,NS}_RETURNS{,_NOT}_RETAINED are defined
Jeremy Huddleston [Tue, 3 May 2011 17:36:19 +0000 (10:36 -0700)]
XQuartz: Ensure that {CF,NS}_RETURNS{,_NOT}_RETAINED are defined

These will be used in subsequent patches to denote proper retain counts in XQuartz

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoClean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo
Alan Coopersmith [Wed, 20 Apr 2011 02:02:54 +0000 (19:02 -0700)]
Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo

Use calloc to initialize pScrVisInfo array so we don't have to check
which ones were already initialized when freeing them all.

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

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

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

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoOnly free pContext once when AddResource fails in ProcRecordCreateContext
Alan Coopersmith [Wed, 20 Apr 2011 01:53:22 +0000 (18:53 -0700)]
Only free pContext once when AddResource fails in ProcRecordCreateContext

Since RecordDeleteContext frees its argument, don't fall through to free
it again.

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

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

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoInput: Fix event size confusion in CheckPassiveGrabsOnWindow
Daniel Stone [Sun, 23 Jan 2011 22:40:10 +0000 (08:40 +1000)]
Input: Fix event size confusion in CheckPassiveGrabsOnWindow

We were just storing a DeviceEvent, but allocating enough space for an
InternalEvent.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
13 years agoInput: Add DeepestSpriteWin function
Daniel Stone [Tue, 18 Jan 2011 20:16:36 +0000 (20:16 +0000)]
Input: Add DeepestSpriteWin function

Does what it says on the box: returns the deepest child window in a
given sprite's trace.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
13 years agoInput: Pass co-ordinates by reference to transformAbsolute
Chase Douglas [Tue, 18 Jan 2011 20:08:09 +0000 (20:08 +0000)]
Input: Pass co-ordinates by reference to transformAbsolute

With the upcoming XI 2.1 touch work, the co-ordinate values will need to
be passed by reference, rather than modified in-place.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoMove event filter initializer out of the structure itself
Alan Coopersmith [Sat, 23 Apr 2011 05:19:39 +0000 (22:19 -0700)]
Move event filter initializer out of the structure itself

When kept in the structure, it causes the entire MAXDEVICES * 128 masks
to be stored in the data segment and loaded from the file, and also leads
to worries about later generations inheriting changes across server reset.

           text    data     bss     dec     hex filename
Before:   91837   20528      32  112397   1b70d .libs/events.o
After:    92277      48   20512  112837   1b8c5 .libs/events.o
Before: 3013384  122696  163156 3299236  3257a4 Xorg
After:  3013832  102216  183636 3299684  325964 Xorg

File size before:       4337008 Xorg
File size after:        4316568 Xorg

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
13 years agoMake xorg.conf.example rule compatible with Solaris make
Alan Coopersmith [Fri, 11 Mar 2011 23:43:14 +0000 (15:43 -0800)]
Make xorg.conf.example rule compatible with Solaris make

Solaris make won't substitute $< in explicit rules, only implicit ones

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
13 years agoMove Xinput server API documentation from libXi to doc/xml
Alan Coopersmith [Thu, 3 Feb 2011 01:00:25 +0000 (17:00 -0800)]
Move Xinput server API documentation from libXi to doc/xml

Documentation is quite out of date but still fits better here than
in the client library.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoXQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4
Jeremy Huddleston [Fri, 29 Apr 2011 18:06:18 +0000 (11:06 -0700)]
XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4

Ok, this time for sure... how many brown bags can I fit over my face?

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Use a rwlock instead of a mutex to protect window_hash in the pthread case
Jeremy Huddleston [Sun, 24 Apr 2011 01:09:11 +0000 (18:09 -0700)]
XQuartz: Use a rwlock instead of a mutex to protect window_hash in the pthread case

Concurrent reads are acceptable, so using an rwlock should be better.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoMerge remote-tracking branch 'jturney/remove-opengl-spec-download'
Keith Packard [Fri, 29 Apr 2011 16:59:49 +0000 (09:59 -0700)]
Merge remote-tracking branch 'jturney/remove-opengl-spec-download'

13 years agohw/xwin: wglext.h should be provided by w32api, rather than downloaded
Jon TURNEY [Wed, 6 Apr 2011 15:26:45 +0000 (16:26 +0100)]
hw/xwin: wglext.h should be provided by w32api, rather than downloaded

wglext.h should be provided by the w32api package, rather than downloaded.
if it's not, do 'wget -P /usr/include/w32api/GL http://www.opengl.org/registry/api/wglext.h'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoconfigure: Look for Khronos OpenGL spec files using pkg-config
Jon TURNEY [Wed, 6 Apr 2011 15:23:45 +0000 (16:23 +0100)]
configure: Look for Khronos OpenGL spec files using pkg-config

Look for Khronos OpenGL spec files using pkg-config, rather than downloading them

Also add a --with-khronos-spec-dir=PATH configure option so XWin can be directed
where to find these files without using the khronos-spec-files package

XWin with AIGLX requires OpenGL spec files in order to generate wrapper code which:
(1) thunks from the glapi dispatch table which uses the default cdecl calling convention
to native GL functions using the stdcall calling convention.
(2) performs function address lookup for OpenGL 1.2+ functions, which are treated
as extensions and so not directly linkable.

v2: KHRONOS_SPEC_DIR is only valid when XWIN_GLX_WINDOWS is defined. Avoid 'make dist'
seeing invalid dependencies by only including rules using KHRONOS_SPEC_DIR if
XWIN_GLX_WINDOWS is defined

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoXQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4
Jeremy Huddleston [Thu, 28 Apr 2011 05:12:59 +0000 (22:12 -0700)]
XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4

This fixes a regression introduced by d79cc14a51f3e8d4d2f66aad055092672cab1526

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoMerge remote-tracking branch 'jturney/master'
Keith Packard [Wed, 27 Apr 2011 19:08:51 +0000 (12:08 -0700)]
Merge remote-tracking branch 'jturney/master'

13 years agoMerge remote-tracking branch 'jeremyhu/master'
Keith Packard [Wed, 27 Apr 2011 19:01:56 +0000 (12:01 -0700)]
Merge remote-tracking branch 'jeremyhu/master'

13 years agoCygwin/X: Handle failure during winScreenInit()
Jon TURNEY [Sat, 5 Mar 2011 17:34:42 +0000 (17:34 +0000)]
Cygwin/X: Handle failure during winScreenInit()

Handle failure during winScreenInit() a bit more cleanly, rather than crashing

This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1'

Also document that fullscreen may only be applied to one screen.

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>
13 years agoCygwin/X: Make winOverrrideStyle() thread-safe
Jon TURNEY [Tue, 23 Mar 2010 20:06:33 +0000 (20:06 +0000)]
Cygwin/X: Make winOverrrideStyle() thread-safe

Make winOverrrideStyle() thread-safe

winOverrideStyle() is called from the internal WM client thread.

Accessing server-internal data structures to get window name and
class is not safe, as there is no lock to ensure we do not collide
with these data structures being updated in the server thread.

Rewrite so the internal client thread uses X client calls to
obtain this data safely

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>
13 years agoCygwin/X: Cosmetic fixes to logging of result from X*TextPropertyToTextList()
Jon TURNEY [Fri, 11 Feb 2011 13:15:40 +0000 (13:15 +0000)]
Cygwin/X: Cosmetic fixes to logging of result from X*TextPropertyToTextList()

Report XLocaleNotSupported result from X*TextPropertyToTextList()
Fix formatting for unknown results reported for X*TextPropertyToTextList()

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>
13 years agoCygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPI
Jon TURNEY [Fri, 28 Jan 2011 20:17:22 +0000 (20:17 +0000)]
Cygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPI

Decorate function pointers retrieved via GetProcAddress which are currently
missing it with WINAPI, to ensure stdcall convention is used when calling them.

This fixes a crash currently seen when compiled -O2 and the -screen option uses
a size and monitor number e.g. -screen 0 1280x1000@2

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>
13 years agoCygwin/X: Don't make InputOnly windows visible
Jon TURNEY [Tue, 12 Oct 2010 16:12:02 +0000 (17:12 +0100)]
Cygwin/X: Don't make InputOnly windows visible

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>
13 years agoCygwin/X: Fix a GDI bitmap resource leak of window icons
Jon TURNEY [Thu, 22 Jul 2010 17:36:51 +0000 (18:36 +0100)]
Cygwin/X: Fix a GDI bitmap resource leak of window icons

Ensure any icon created specially for a window is destroyed when
the window is destroyed

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>
13 years agoCygwin/X: Internal WM workaround for Java AWT bug
Jon TURNEY [Wed, 21 Jul 2010 17:11:13 +0000 (18:11 +0100)]
Cygwin/X: Internal WM workaround for Java AWT bug

Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT
doesn't explicitly know about (See sun bug #6434227)

XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic
ConfigureNotify events to update window location if it's identified the
WM as a non-reparenting WM it knows about (compiz or lookingglass)

Rather than tell all sorts of lies to get XWM to recognize us as one of
those, simply send a synthetic ConfigureNotify for every non-synthetic one

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>
13 years agoconfigure: Let configure --enable/disable-aiglx control building of AIGLX for all...
Jon TURNEY [Fri, 16 Apr 2010 20:55:01 +0000 (21:55 +0100)]
configure: Let configure --enable/disable-aiglx control building of AIGLX for all DDXs

Let configure --enable/disable-aiglx control building of AIGLX for all DDXs. Currently
we can't use --enable/disable-aiglx to control if Xwin DDX is built with AIGLX enabled,
as at the moment it's forced off if we aren't building the X.Org DDX DRI or DRI2 loader

Rearrange things a bit, introducing a new automake conditional, AIGLX_DRI_LOADER to
specifically indicate if the X.Org DDX DRI/DRI2 loader convenience library should be
built, and replace the previous X.Org DDX-specific uses of the AIGLX conditional with that

As before, AIGLX_DRI_LOADER is only enabled if --enable-glx, --enable-aiglx and at least one
of --enable-dri or --enable-dri2 are enabled

This allows the general conditional AIGLX to control if AIGLX is built for the XWin DDX as
well

The C #define AIGLX set by AC_DEFINE(AIGLX) seems to be obsolete, I can't find anything
which checks it

Updated for ajax's "glx: Make --disable-dri not disable AIGLX" patch, which allows DRI2
to be enabled independently of DRI1

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoXQuartz: Use ErrorF rather than fprintf to log errors
Jeremy Huddleston [Tue, 26 Apr 2011 05:00:41 +0000 (22:00 -0700)]
XQuartz: Use ErrorF rather than fprintf to log errors

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: stub: Dead code removal
Jeremy Huddleston [Tue, 26 Apr 2011 04:25:10 +0000 (21:25 -0700)]
XQuartz: stub: Dead code removal

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long...
Emanuele Giaquinta [Mon, 25 Apr 2011 17:38:17 +0000 (10:38 -0700)]
XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4

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

Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Enable logging to a file for better debugging
Jeremy Huddleston [Mon, 25 Apr 2011 05:01:48 +0000 (22:01 -0700)]
XQuartz: Enable logging to a file for better debugging

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoXQuartz: Rename launchd-id-prefix to bundle-id-prefix
Jeremy Huddleston [Mon, 25 Apr 2011 04:35:04 +0000 (21:35 -0700)]
XQuartz: Rename launchd-id-prefix to bundle-id-prefix

It's used many other places than just for launchd.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>