Commit Graph

10667 Commits

Author SHA1 Message Date
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
Daniel Stone
70cef8d8ba 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>
2011-05-06 13:15:18 +10:00
Daniel Stone
00ba884556 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>
2011-05-06 13:15:16 +10:00
Peter Hutterer
5690199802 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>
2011-05-06 09:58:08 +10:00
Jeremy Huddleston
b47d2e43eb XQuartz: Make a copy of args for our crash reporter vsnprintf
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-05 09:04:41 -07:00
Peter Hutterer
bf2059b07a 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 9d23459415
    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>
2011-05-05 10:29:17 +10:00
Ville Syrjälä
eac37f32b8 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>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
f2001b0f6d 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>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
74663e6152 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>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
193ecc8b45 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>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
a6ae917462 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>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
ce9eff9e4c 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>
2011-05-04 19:01:01 +03:00