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>
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>
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>
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>
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>
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>
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>
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>
Keith Packard [Fri, 13 May 2011 20:59:36 +0000 (13:59 -0700)]
Merge remote-tracking branch 'whot/for-keith'
Keith Packard [Fri, 13 May 2011 20:54:29 +0000 (13:54 -0700)]
Merge remote-tracking branch 'jeremyhu/master'
Keith Packard [Fri, 13 May 2011 20:52:18 +0000 (13:52 -0700)]
Merge remote-tracking branch 'vsyrjala/composite_validatetree_2'
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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, ¬ify);
}
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Keith Packard [Fri, 29 Apr 2011 16:59:49 +0000 (09:59 -0700)]
Merge remote-tracking branch 'jturney/remove-opengl-spec-download'
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>
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>
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>
Keith Packard [Wed, 27 Apr 2011 19:08:51 +0000 (12:08 -0700)]
Merge remote-tracking branch 'jturney/master'
Keith Packard [Wed, 27 Apr 2011 19:01:56 +0000 (12:01 -0700)]
Merge remote-tracking branch 'jeremyhu/master'
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jeremy Huddleston [Mon, 25 Apr 2011 03:35:06 +0000 (20:35 -0700)]
XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 24 Apr 2011 06:22:27 +0000 (23:22 -0700)]
XQuartz: Silence clang static analyzer
Call to 'malloc' has an allocation size of 0 bytes.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 24 Apr 2011 06:15:49 +0000 (23:15 -0700)]
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>
Jeremy Huddleston [Sun, 24 Apr 2011 03:12:38 +0000 (20:12 -0700)]
XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sat, 23 Apr 2011 19:55:39 +0000 (12:55 -0700)]
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>
Jeremy Huddleston [Sat, 23 Apr 2011 19:11:39 +0000 (12:11 -0700)]
XQuartz: xpr: Initialize window_hash in xprInit
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sat, 23 Apr 2011 18:55:49 +0000 (11:55 -0700)]
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>
Jeremy Huddleston [Sat, 23 Apr 2011 08:48:25 +0000 (01:48 -0700)]
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>
Jeremy Huddleston [Sat, 23 Apr 2011 08:39:16 +0000 (01:39 -0700)]
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:
94ed0ba1b5043ad9fc33b42756af447d5ab15bbd
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Fri, 22 Apr 2011 19:05:32 +0000 (12:05 -0700)]
XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4
xprAppleWM.c:143: warning: initialization from incompatible pointer type
xprAppleWM.c:144: warning: initialization from incompatible pointer type
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Mon, 25 Apr 2011 19:38:07 +0000 (12:38 -0700)]
XQuartz: Bump bundle version to 2.7.0
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 24 Apr 2011 06:25:39 +0000 (23:25 -0700)]
rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value
Found by clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 24 Apr 2011 06:27:16 +0000 (23:27 -0700)]
rootless: Dead code removal
Found by clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 24 Apr 2011 04:24:27 +0000 (21:24 -0700)]
glx: Silence warnings when building with clang
This replaces AX_TLS (GPL3) with XORG_TLS (MIT)
In file included from glapi.c:46:
In file included from ./glapi.h:51:
./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
In file included from glapi.c:46:
./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec"))) = NULL;
^
glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
4 errors generated.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jeremy Huddleston [Sun, 24 Apr 2011 03:55:53 +0000 (20:55 -0700)]
render: Silence warnings when building with clang
picture.c:351:37: error: implicit conversion from 'unsigned int' to 'CARD16' (aka 'unsigned short') changes value from
4294967295 to 65535
[-Werror,-Wconstant-conversion]
pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Suggested-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Jeremy Huddleston [Sun, 24 Apr 2011 03:49:27 +0000 (20:49 -0700)]
os: Silence warnings when building with clang
access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
if ((host->family == FamilyServerInterpreted)) {
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
if ((host->family == FamilyServerInterpreted)) {
^~
=
access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
if ((host->family == FamilyServerInterpreted)) {
~ ^ ~
In file included from xstrans.c:8:
In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
/usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
^
log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
if (asprintf(&logFileName, fname, display) == -1)
^~~~~
log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
if ((asprintf(&suffix, backup, display) == -1) ||
^~~~~~
log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
LogVWrite(verb, tmpBuf, args);
^~~~~~
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Jeremy Huddleston [Sun, 24 Apr 2011 03:39:25 +0000 (20:39 -0700)]
Xext: Silence warnings when building with clang
xvmain.c:1113:22: warning: equality comparison with extraneous parentheses [-Wparentheses]
if ((pf->depth == pDraw->depth)
~~~~~~~~~~^~~~~~~~~~~~~~~
xvmain.c:1113:22: note: use '=' to turn this equality comparison into an assignment
if ((pf->depth == pDraw->depth)
^~
=
xvmain.c:1113:22: note: remove extraneous parentheses around the comparison to silence this warning
if ((pf->depth == pDraw->depth)
~ ^ ~
1 warning generated.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Jeremy Huddleston [Sun, 24 Apr 2011 03:36:53 +0000 (20:36 -0700)]
fb: Silence warnings when building with clang
fbpict.c:163:8: warning: implicit conversion from enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different enumeration
type 'pixman_format_code_t' [-Wconversion]
pict->format,
~~~~~~^~~~~~
fbbltone.c:486:2: warning: shift result (
281474959933440) requires 49 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
^~~~~~~~~~~~
fbbltone.c:474:6: note: instantiated from:
SelMask24(b,1,r))
^
fbbltone.c:429:46: note: instantiated from:
^
fbbltone.c:427:18: note: instantiated from:
0xffffff << Mask24Check(x,r)) : 0)
~~~~~~~~ ^
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Jeremy Huddleston [Mon, 25 Apr 2011 02:57:22 +0000 (19:57 -0700)]
os: Add missing _X_ATTRIBUTE_PRINTF to va_list variants
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Nicolas Kaiser [Sun, 24 Apr 2011 10:44:15 +0000 (12:44 +0200)]
xkb: remove duplicated include
Remove duplicated include.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>