Commit Graph

10678 Commits

Author SHA1 Message Date
Jeremy Huddleston
ba7d1020ac 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>
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
0e7f61d72c 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>
2011-05-14 11:22:29 -07:00
Gaetan Nadon
96c65be39b 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>
2011-05-14 11:22:26 -07:00
Gaetan Nadon
dbe26634e4 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>
2011-05-14 11:22:17 -07:00
Gaetan Nadon
221507e3bf 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>
2011-05-13 14:08:17 -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
Keith Packard
4d02c53971 Merge remote-tracking branch 'vsyrjala/composite_validatetree_2' 2011-05-13 13:52:18 -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
Peter Hutterer
728d0bf20e 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>
2011-05-13 09:42:04 +10:00
Peter Hutterer
ffd4874798 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>
2011-05-13 09:41:50 +10:00
Peter Hutterer
c4f9c3a07d 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>
2011-05-13 09:41:42 +10:00
Peter Hutterer
dc45d5816d 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>
2011-05-13 09:41:38 +10:00
Peter Hutterer
5bcc22757e 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>
2011-05-13 09:41:37 +10:00
Peter Hutterer
2054ca7306 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>
2011-05-13 09:41:36 +10:00
Peter Hutterer
236ed6f506 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>
2011-05-13 09:41:34 +10:00
Peter Hutterer
536ca28f1b 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>
2011-05-13 09:41:33 +10:00
Jamey Sharp
a311a03135 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>
2011-05-13 09:41:29 +10:00
Jeremy Huddleston
a558a66d24 configure.ac: XQuartz: Fix support for the deprecated --with-launchd-id-prefix
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 17:29:49 -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
c8674a328c dix: replace unneded goto with break.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-11 14:27:36 +10: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
Daniel Stone
3231962db8 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>
2011-05-06 13:15:28 +10:00
Daniel Stone
460a377ef2 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>
2011-05-06 13:15:26 +10:00
Daniel Stone
a79d4544fe 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>
2011-05-06 13:15:25 +10:00
Daniel Stone
c7634498d4 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>
2011-05-06 13:15:24 +10:00
Daniel Stone
b8540d18c7 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>
2011-05-06 13:15:23 +10:00
Daniel Stone
72b6639c83 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>
2011-05-06 13:15:22 +10:00