Commit Graph

5470 Commits

Author SHA1 Message Date
Matěj Cepl
b27d61e443 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>
2011-06-30 16:38:31 +10:00
Marcin Slusarz
b573cdd40e 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>
2011-06-30 16:38:23 +10:00
Keith Packard
61f87a75f2 Merge remote-tracking branch 'jturney/master' 2011-06-29 20:14:51 -07:00
Keith Packard
0d2153a46c Merge remote-tracking branch 'jbarnes/master' 2011-06-29 20:08:32 -07:00
Keith Packard
d5ca33ca2d Merge remote-tracking branch 'kibi/master' 2011-06-29 18:54:33 -07:00
Yaakov Selkowitz
72d914335c 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>
2011-06-29 19:14:38 +01:00
Jon TURNEY
e78628406f 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>
2011-06-29 19:14:35 +01:00
Jesse Barnes
932513e23b DRI2/GLX: use new swap event types
Use the new event types so we can pass a valid SBC value to clients.
Fix up the completion calls to use CARD32 instead of CARD64 to match
the new field size.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-06-29 11:05:36 -07:00
Jeremy Huddleston
bea57392c7 XQuartz: Fix Makefile dependencies
automake generates _DEPENDENCIES from _LIBADD, but it strips out variables.
This resulted in not relinking if some components were rebuilt (like
libdix, libos, etc).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-28 13:07:20 -07:00
Jeremy Huddleston
c8b80a82d9 XQuartz: Make a call to activateIgnoringOtherApps in our NSApplicationActivatedEventType handler
In addition, this change will not call into the X11 activation unless an X11
window was active when we deactivated.  We can't rely on the event and current
key windows because the key window will be nil until activated, and the event
will only reference the window if the window was clicked (whereas it will be
nil if we activated via dock or cmd-tab).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-28 13:07:19 -07:00
Keith Packard
f968f4ace9 Merge remote-tracking branch 'dbn/no-libxorg' 2011-06-28 09:10:14 -07:00
Peter Hutterer
4dbed26254 xfree86: Only log the serial bytes if debug is on.
Introduced in e3f296d91d, when the ifdef DEBUG
around the whole block was removed, but only two of the three ErrorF
switched to DebugF.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-06-27 12:21:45 -07:00
Dan Nicholson
163441fe53 xfree86: Remove libxorg convenience library to speed up build
libxorg.la served to collect all the Xorg convenience libraries into one
massive archive to link into Xorg. This made things easy for symbol
resolution, but it tremendously slowed down the build since each change
caused libxorg.la to be rebuilt. This is an extremely slow process of
extracting all the objects from the sub-libraries and recombining them.

Instead, the archives are linked directly into Xorg. The order of the
libraries had to be tweaked a bit to make symbols resolve correctly with
the lower level code moving later in the link command.

As a side effect, since the dtrace objects are now being linked
directly into Xorg, we don't need the SPECIAL_DTRACE_OBJECTS hack to
add them twice.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-23 05:28:31 -07:00
Dan Nicholson
6259b30111 xfree86: Move sdksyms generation to ddx toplevel
The symbols in sdksyms.c cover the entire source tree. In order to make
them resolve when libxorg.la goes away, move the objects from libloader
to Xorg. Unfortunately, this means sdksyms needs to get built again for
the test code.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-23 05:28:31 -07:00
Dan Nicholson
7d5c8a12cb Don't use empty source files
When an empty _SOURCES variable is declared, automake will recognize that
only linking is needed.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-23 05:28:31 -07:00
Alan Coopersmith
47b6ba3204 Add xkeyboard-config to See Also of man pages referencing xkb
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-21 17:54:43 -07:00
Alan Coopersmith
cfbe471b58 Xdmx.man: convert section references to substituted forms
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-21 17:54:15 -07:00
Alan Coopersmith
c3278f3c17 Xdmx.man: additional updates to modernize XKB information
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21 17:54:14 -07:00
Alan Coopersmith
19e3706713 Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values
Passed through from configure.ac via manpages.am

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21 17:54:14 -07:00
Cyril Brulebois
4edf49d032 dmx/examples: Fix missing key_click_percent assignment.
Thanks to gcc's -Wunused-but-set-variable, stop ignoring the percent
parameter, and add it to the XKeyboardControl structure before the
XChangeKeyboardControl call.

This warning goes away accordingly:
|   CC     xbell-xbell.o
| xbell.c: In function ‘main’:
| xbell.c:74:22: warning: variable ‘percent’ set but not used [-Wunused-but-set-variable]

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-16 00:44:43 +02:00
Cyril Brulebois
33dad2b74e hw/dmx: Stop using variables for text widgets.
They are unused in the sense they're not getting any callback set up, so
there's no point in storing them into variables. Keep the initial
alignment of the parameters to try and reduce the diff noise.

Those warnings go away accordingly:
|   CC     xdmxconfig-xdmxconfig.o
| xdmxconfig.c: In function ‘main’:
| xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable]
| xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable]

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-16 00:44:08 +02:00
Jeremy Huddleston
778309fd0e XQuartz: GLX: Fix a -Wformat-security compilation warning
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 14:00:52 -07:00
Jeremy Huddleston
34e2598f0a XQuartz: GLX: Use _glapi_create_table_from_handle to create out dispatch table
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 14:00:52 -07:00
Jeremy Huddleston
c3df4df407 XQuartz: Add missing include for <pthread.h>
BuildFix for Leopard and earlier.

https://trac.macports.org/ticket/29717

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 08:17:26 -07:00
Jeremy Huddleston
feab04397d XQuartz: AIGLX: Remove unnecessary includes in indirect.c
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Jeremy Huddleston
3fa5d27e46 XQuartz: AIGLX: Setup dispatch table based on runtime capabilities rather than buildtime
This will allow XQuartz built on older systems to pickup capabilities on
newer systems and prevent runtime failures when building on newer systems and
running on older ones.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Jeremy Huddleston
dd5d91fc95 XQuartz: Remove explicit link against libGL
This was indented to force a link against OpenGL.framework's libGL, but it
actually resulted in linking against mesa's libGL due to the ordering of -L

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Cyril Brulebois
5115c2c721 Xephyr: Mention Xserver's options are also accepted.
Originally reported in the Debian BTS:
  http://bugs.debian.org/582650

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-03 18:09:51 +02:00
Jeremy Huddleston
48b4b778f6 XQuartz: xpbproxy: Correct NSUInteger format strings
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:57:52 -07:00
Jeremy Huddleston
971193b275 XQuartz: ASL: Use xpbproxy subsystem for logging xpbproxy messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:57:52 -07:00
Jeremy Huddleston
7dfd65705c XQuartz: ASL: Use GLXAqua subsystem for logging GLXAqua messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:18:47 -07:00
Jeremy Huddleston
19020b23ef XQuartz: ASL: Use xpr subsystem for logging xpr messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:18:44 -07:00
Jeremy Huddleston
a66400f8db XQuartz: ASL: Update logging to support differnet levels and subsystems
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:07:56 -07:00
Jeremy Huddleston
c0077b41b4 XQuartz: Add a semicolon after DEBUG_LOG
Don't rely on the macro to provide it

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 20:56:18 -07:00
Jeremy Huddleston
fbc8aae8e9 XQuartz: Move -lXplugin to LDFLAGS from LDADD
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 20:41:11 -07:00
Jeremy Huddleston
38df706c6b XQuartz: GLX: Create a new dispatch table rather than modifying the existing one
Fixes regression introduced by b0c665ac0f

0   X11.bin                       	0x0000000100118293 __glXAquaScreenCreateContext + 684
1   X11.bin                       	0x00000001001315b0 DoCreateContext + 163
2   X11.bin                       	0x000000010013509f __glXDispatch + 211
3   X11.bin                       	0x00000001000c7dad Dispatch + 785
4   X11.bin                       	0x00000001000b97e5 dix_main + 1022
5   X11.bin                       	0x00000001000122bc server_thread + 50
6   libSystem.B.dylib             	0x00007fff836554f6 _pthread_start + 331
7   libSystem.B.dylib             	0x00007fff836553a9 thread_start + 13

http://lists.apple.com/archives/X11-users/2011/May/msg00045.html

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-06-01 20:41:11 -07:00
Simon Thum
b5d828789c xserver: remove AbsoluteClass, breaking the A(P|B)I
This struct was unused and has been effectively removed in
commit 633b81e8ba
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>
2011-05-25 08:23:58 +10:00
Oleh Nykyforchyn
c05c8640f1 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>
2011-05-25 08:23:58 +10:00
Tomas Frydrych
83c059f034 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>
2011-05-25 08:23:58 +10:00
Tomas Frydrych
b387069faf 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>
2011-05-25 08:23:58 +10:00
Colin Harrison
53ccc54ac7 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>
2011-05-24 14:08:13 +10:00
Peter Hutterer
0de7cec907 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 51f353d0a0 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>
2011-05-23 09:38:21 -07:00
Jeremy Huddleston
1fb501ad15 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>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
60af79e35e 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>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
f25ca898c5 XQuartz: Mark functions _X_NORETURN
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
7413886d65 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>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
96ac4e61f4 XQuartz: Update DEBUG_LOG to report to ASL
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
384eb45b94 XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:27 -07:00
Jeremy Huddleston
25191648b8 XQuartz: Don't call mieqEnqueue during server shutdown
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:27 -07:00
Jeremy Huddleston
fd5f630bc4 XQuartz: Fix an array-index-out-of-bounds crasher
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:26 -07:00
Gaetan Nadon
9129beb507 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>
2011-05-13 14:08:09 -07:00
Gaetan Nadon
0d8a5766a3 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>
2011-05-13 14:08:07 -07:00
Gaetan Nadon
622ebb8815 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>
2011-05-13 14:08:05 -07:00
Gaetan Nadon
595460c397 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>
2011-05-13 14:08:02 -07:00
Gaetan Nadon
04011b0bc3 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>
2011-05-13 14:07:58 -07:00
Ville Syrjälä
531869448d 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>
2011-05-13 14:05:11 -07:00
Keith Packard
ba5540221f Merge remote-tracking branch 'whot/for-keith' 2011-05-13 13:59:36 -07:00
Keith Packard
6347a0b802 Merge remote-tracking branch 'jeremyhu/master' 2011-05-13 13:54:29 -07:00
Jeremy Huddleston
f144fb771f XQuartz: Don't circumvent NDEBUG
If someone wants to turn off asserts with NDEBUG, let them.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-13 09:10:42 -07:00
Jeremy Huddleston
f46835a096 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>
2011-05-12 20:19:40 -07:00
Jeremy Huddleston
5bc05d96f8 XQuartz: Add a LOGGING section to our man page
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 19:28:32 -07:00
Jeremy Huddleston
c18b7165f9 XQuartz: stub: Log directly to ASL rather than stdout/stderr
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 19:28:32 -07:00
Jeremy Huddleston
d694601591 Fix a typo: laucnd instead of launchd
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 18:31:14 -07:00
Jeremy Huddleston
c89a6f824e 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>
2011-05-10 23:55:19 -07:00
Peter Hutterer
20fb07f436 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>
2011-05-11 14:27:36 +10:00
Peter Hutterer
8670c46bdf 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>
2011-05-11 14:27:36 +10:00
Peter Hutterer
e7150db535 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>
2011-05-11 14:27:33 +10:00
Peter Hutterer
1b8593a6c1 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>
2011-05-11 10:53:06 +10:00
Jeremy Huddleston
3ac220d6cc 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>
2011-05-03 10:54:09 -07:00
Jeremy Huddleston
bac8d12555 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>
2011-05-03 10:39:31 -07:00
Alan Coopersmith
8d229c4cf9 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>
2011-05-01 10:19:35 -07:00
Jeremy Huddleston
0fc7ec6dd5 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>
2011-04-29 11:06:18 -07:00
Jeremy Huddleston
29d471663e 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>
2011-04-29 11:04:42 -07:00
Keith Packard
5cb31cd0cb Merge remote-tracking branch 'jturney/remove-opengl-spec-download' 2011-04-29 09:59:49 -07:00
Jon TURNEY
4d8735d388 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>
2011-04-28 17:53:39 +01:00
Jon TURNEY
a50878682c 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>
2011-04-28 17:48:44 +01:00
Jeremy Huddleston
0f284f0f42 XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4
This fixes a regression introduced by d79cc14a51

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-27 22:12:59 -07:00
Keith Packard
f6d4e75ec5 Merge remote-tracking branch 'jturney/master' 2011-04-27 12:08:51 -07:00
Jon TURNEY
4318e6a147 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>
2011-04-27 14:25:16 +01:00
Jon TURNEY
ce6136f8c5 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>
2011-04-27 14:24:17 +01:00
Jon TURNEY
0c603509eb 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>
2011-04-27 14:23:35 +01:00
Jon TURNEY
71550a8665 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>
2011-04-27 14:23:09 +01:00
Jon TURNEY
38a1f5c613 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>
2011-04-27 14:22:41 +01:00
Jon TURNEY
bd288c3458 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>
2011-04-27 14:22:13 +01:00
Jon TURNEY
19e764eee0 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>
2011-04-27 14:19:01 +01:00
Jon TURNEY
c5a612fc18 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>
2011-04-26 10:40:56 +01:00
Jeremy Huddleston
6f29dbf5e3 XQuartz: Use ErrorF rather than fprintf to log errors
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 22:00:41 -07:00
Jeremy Huddleston
cb083b05c4 XQuartz: stub: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 21:25:10 -07:00
Emanuele Giaquinta
72ed7551f4 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>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
0a60192a85 XQuartz: Enable logging to a file for better debugging
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
de4023f194 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>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
e466745109 XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
f1d867c0a1 XQuartz: Silence clang static analyzer
Call to 'malloc' has an allocation size of 0 bytes.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
913223e9dd XQuartz: xpr: Dead code removal
Assigned value is always the same as the existing value.

Found by clang static analyzer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
d0caa0e4cd XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
9244a3a24f XQuartz: xpr: Use a serial queue rather than pthread mutexes for window_hash
Additionally removes some dead code and fixes double-locking in
xprIsX11Window.  xprIsX11Window doesn't need to do any locking because
those resources are protected by the called functions themselves.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel A. Steffen <dsteffen@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
bac34a54f7 XQuartz: xpr: Initialize window_hash in xprInit
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
1596ea72d6 XQuartz: Use a lighter spinlock instead of a pthread_mutex_t in QuartzScreenSaver
Currently, we only end up here through a call to QuartzShowFullscreen, and
this is always on the same thread.  Future changes (such as further
incorporating libdispatch) may allow this to change, but contention will
remain minimal since the call is infrequent and it is short held.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel A. Steffen <dsteffen@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
3e253c603b XQuartz: Remove the threadSafety dead-ish code
It's been a few years now since we've needed this to debug thread
boundaries, so punt it out to clean up the namespace polution.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
a52c8078c9 XQuartz: Use xorg_backtrace() instead of spewCallStack()
xorg_backtrace() has been in os for two years now, we might as well
start using it.

Ref: 94ed0ba1b5

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00