Commit graph

713 commits

Author SHA1 Message Date
Gaetan Nadon
a67d99ccbe specs: specdir is required to install xml files
The source is installed as well as the targets.
This failed when configuring with --without-xmlto

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-08 17:29:21 -04:00
Matt Dew
e14273f44c specs: replace troff source with docbook-xml source
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-07-08 14:46:33 -04:00
Daniel Stone
bea0873caf XStringToKeysym: Check strdup() return value
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-07-08 19:29:25 +01:00
Marko Myllynen
cffa71b4a5 Fix two typos in SFS 5966 Annex 3
X.Org bug#28792 <https://bugs.freedesktop.org/show_bug.cgi?id=28792>

Signed-off-by: Julien Cristau <jcristau@debian.org>
2010-07-08 17:45:35 +01:00
Daniel Stone
eb023c0f89 Delete now-redundant XKeysymDB
Since XStringToKeysym now supports all the vendor keysyms, just delete
our XKeysymDB, which was incomplete at best, misleading at worst, and
always an annoyance.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-08 16:30:56 +01:00
Daniel Stone
0017539748 makekeys: Scan vendor keysyms as well as core
Since we can't really live without vendor keysyms, scan them all in to
generate ks_tables.h, rather than only doing the core ones, and leaving
the vendor syms to be manually synchronised with XKeysymDB.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-08 16:30:54 +01:00
Daniel Stone
ebd6ef0a4d XStringToKeysym: Special case for XF86 keysyms
Some XFree86 keysyms were in XKeysymDB as XF86_foo, despite really being
XF86foo.  So, if we get to the bottom of XStringToKeysym and haven't
found our XF86_foo, try it again as XF86foo.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-08 16:30:51 +01:00
Daniel Stone
8c2ffce9e5 configure.ac: Change from deprecated AC_DEFINE_DIR to AX_
AC_DEFINE_DIR is deprecated as it's squatting on the autoconf-builtin
namespace, so start using the more proper AX_DEFINE_DIR instead.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-08 16:30:25 +01:00
Fernando Carrijo
6de368c9aa Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-07 15:12:34 -07:00
Adam Jackson
0b724231be Use -version-number consistently instead of -version-info
The latter is libtool braindamage.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-06-30 16:30:49 -04:00
Juliusz Chroboczek
241a990afc Make Compose-comma map to ogonek for I and U in UTF-8 locales.
With the preceding patch, it makes the UTF-8 compose map consistent with
the ISO 8859-4 and -13 maps.
2010-06-29 18:32:42 +02:00
Juliusz Chroboczek
af55e582f4 Make Compose-comma map to Ogonek for A and E in UTF-8 locales.
This makes the UTF-8 compose file consistent with the ISO 8859-2 compose file
as far as Polish is concerned.  We only sacrifice one pair of characters,
e-cedilla, which is not used in any language.
2010-06-29 18:23:31 +02:00
Alan Coopersmith
d6ba13009f Define FILE_MAN_DIR_SUFFIX so XCompose shadow page has correct path
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-24 13:13:11 -07:00
Jamey Sharp
978c723878 poll_for_response: Really handle xcb_poll_for_reply getting a reply.
Don't lose async replies. That's bad.

`xlsfonts -l`, which uses XListFontsWithInfo, worked fine, because the
_XReply path worked; that path waited for replies, rather than polling.

However, XRecordProcessReplies, which does nothing but call XPending,
relied on the event-handling path to process async replies, and that was
busted.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28595

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-06-21 13:53:10 -07:00
Jamey Sharp
ef67486c5a Revert "xcb_io.c: poll_for_response doesn't guarantee there's a pending request."
This reverts commit 4a8b6528ff, because as
a matter of fact, if poll_for_response returns NULL when we know
dpy->xcb->next_event is non-NULL, there *is* guaranteed to be a pending
request.
2010-06-21 13:34:15 -07:00
Jamey Sharp
301ec5b41e Revert "poll_for_response: Really handle xcb_poll_for_reply getting a reply."
This reverts commit c115095d7f. We *do*
need to check poll_for_event every time through the loop in
poll_for_response, so the commit did too much.
2010-06-21 13:24:24 -07:00
Jamey Sharp
4a8b6528ff xcb_io.c: poll_for_response doesn't guarantee there's a pending request.
Fixes the second bug reported in:
https://bugs.freedesktop.org/show_bug.cgi?id=28595

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-06-21 10:54:02 -07:00
Jamey Sharp
c115095d7f poll_for_response: Really handle xcb_poll_for_reply getting a reply.
Don't lose async replies. That's bad.

`xlsfonts -l`, which uses XListFontsWithInfo, worked fine, because the
_XReply path worked; that path waited for replies, rather than polling.

However, XRecordProcessReplies, which does nothing but call XPending,
relied on the event-handling path to process async replies, and that was
busted.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28595

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2010-06-19 10:55:09 -07:00
Marko Myllynen
a25ae16986 Implement SFS 5966 Annex 4 for Finland
This patch adds Annex 4 of SFS 5966 for Finland and fixes two typos in
Annex 3 (which were actually copied verbatim from the standard text).

The implementation of the standard is now complete.

X.Org bug#28498 <https://bugs.freedesktop.org/show_bug.cgi?id=28498>

Signed-off-by: Julien Cristau <jcristau@debian.org>
2010-06-13 20:24:04 +02:00
Alan Coopersmith
47b04195d8 LINEAR_RGB_InitSCCData: When malloc fails, don't try to free unallocated bits
One of the malloc failure checks had a goto to the wrong spot in the
list of cleanup free() calls to unwind at the end, and was freeing
bits that hadn't been initialized/allocated yet, since they would be
stored in the struct that just failed to be allocated.

Error: Null pointer dereference (CWE 476)
   Read from pointer that could be constant 'NULL'
        at line 805 of /export/alanc/X.Org/sx86/lib/libX11/src/xcms/LRGB.c in function 'LINEAR_RGB_InitSCCData'.
          Pointer checked against constant 'NULL' at line 754 but does not protect the dereference.

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

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11 11:06:45 -07:00
Josh Triplett
aebbf36238 Mark the rest of Xprivate.h as _X_HIDDEN.
None of the functions in Xprivate.h should have any callers outside of
Xlib, by definition.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Suggested-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-06 19:11:55 -07:00
Julien Cristau
abcd1b67c8 Hide _XSeqSyncFunction
Commit a6d974dc59 made _XSeqSyncFunction
non-static, but we don't need to export it.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-05 20:47:45 +02:00
Josh Triplett
15e5eaf628 Remove support for building without XCB
And there was much rejoicing.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>

Consensus on #xorg-devel agrees with removing --without-xcb; in
particular, acks from Adam Jackson, Daniel Stone, Kristian Høgsberg,
Julien Cristau, and Rémi Cardona.
2010-06-03 22:19:14 -07:00
Alan Coopersmith
fb19eb767a libX11 1.3.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03 15:21:40 -07:00
Alan Coopersmith
8f3db40ca5 Workaround bug in groff flag processing that breaks distcheck
At least with the groff 1.19.2 package I have installed, groff passes
on the -I flags for the include path to grohtml, which if they come
after the -P-I... flag we pass to grohtml to specify the image file
name pattern cause it to override that flag and put the images in
the wrong place, breaking "make distcheck" - changing the flag order
works around this.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03 13:08:17 -07:00
Alan Coopersmith
bdb31a1fb7 Fix typo that made configure always report "none" for man page suffix
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03 12:45:33 -07:00
Paul Bender
6bb7d2d21d Bug 22591 - configure does not obey the --enable-*-transport options
https://bugs.freedesktop.org/show_bug.cgi?id=22591

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03 12:45:33 -07:00
Paul Bender
d7f35946d6 Bug 22590 - libX11 1.2.1 has broken abstract namespace support
https://bugs.freedesktop.org/show_bug.cgi?id=22590

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-03 12:45:33 -07:00
Alan Coopersmith
b2487d07f7 Bug 22584 - libX11 does not cross compile
Adaptation of patch submitted by Paul Bender in attachment 27301 to
https://bugs.freedesktop.org/show_bug.cgi?id=22584

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-03 12:45:23 -07:00
Alan Coopersmith
4378219ff8 Clarify requirements in XRestackWindows man page
The required common parent window is not specified in the arguments,
just implied as the parent of the first window in the list.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-01 18:55:51 -07:00
Jeremy Huddleston
f09c5299a3 xcb: Add TCP fallback
If we fail to connect to a UNIX socket and the transport isn't specified,
fallback on TCP.  This matches behavior with the xtrans codepath and the
Xlib spec.

http://lists.x.org/archives/xorg-devel/2010-April/007915.html

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-14 14:23:24 -07:00
Jamey Sharp
fd82552d5c Merge branch 'xlib-xcb-thread-fixes' 2010-05-10 16:51:24 -07:00
Jeremy Huddleston
aae2a4a7aa Don't append the screen number when using a launchd socket
ssh gets confused by this.  XQuartz is the only DDX using this
functionality, and it doesn't support different screens, so
let's just not include this until most ssh know how to handle
this.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 21:50:29 -07:00
Jeremy Huddleston
adcd0ec209 Remove launchd logic from _XConnectXCB as it's handled in XCB
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 17:19:01 -07:00
Jeremy Huddleston
d232b259c3 Fix various build warnings
imLcIm.c: In function '_XimCachedFileName':
imLcIm.c:361: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
imLcIm.c:364: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'

imRm.c: In function '_XimDefaultArea':
imRm.c:597: warning: cast from pointer to integer of different size
imRm.c: In function '_XimDefaultColormap':
imRm.c:626: warning: cast from pointer to integer of different size

lcFile.c:224: warning: no previous prototype for 'xlocaledir'

lcUTF8.c: In function 'iconv_cstombs':
lcUTF8.c:1841: warning: assignment discards qualifiers from pointer target type
lcUTF8.c:1869: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c:1873: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c: In function 'iconv_mbstocs':
lcUTF8.c:1935: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_mbtocs':
lcUTF8.c:2031: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_mbstostr':
lcUTF8.c:2121: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_strtombs':
lcUTF8.c:2180: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c: In function '_XlcAddGB18030LocaleConverters':
lcUTF8.c:2367: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2368: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2373: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2374: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2375: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2376: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2377: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type

XlibInt.c: In function '_XGetHostname':
XlibInt.c:3441: warning: implicit declaration of function 'gethostname'
XlibInt.c:3441: warning: nested extern declaration of 'gethostname'

ConnDis.c: In function '_XDisconnectDisplay':
ConnDis.c:540: warning: old-style function definition
ConnDis.c: In function '_XSendClientPrefix':
ConnDis.c:554: warning: old-style function definition
ConnDis.c: In function 'XSetAuthorization':
ConnDis.c:677: warning: old-style function definition

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 15:52:51 -07:00
Daniel Kahn Gillmor
3e11c73187 Allow X11 users to compose anarchism
I can easily compose the hammer and sickle (the symbol representative
of communism) by pressing the key sequence:

  <Compose> <C> <C> <C> <P> -> ☭

But i can't easily make the circled A (the symbol representative of
anarchism).

I'd like to be able to use <Compose> <O> <A> (this is a
currently unused key sequence) to generate the symbol:  Ⓐ

Debian bug#555938 <http://bugs.debian.org/555938>

Signed-off-by: Julien Cristau <jcristau@debian.org>
2010-04-23 00:03:48 +02:00
Jamey Sharp
933aee1d5c Fix Xlib/XCB for multi-threaded applications (with caveats).
Rather than trying to group all response processing in one monolithic
process_responses function, let _XEventsQueued, _XReadEvents, and
_XReply each do their own thing with a minimum of code that can all be
reasoned about independently.

Tested with `ico -threads 20`, which seems to be able to make many
icosahedrons dance at once quite nicely now.

Caveats:

- Anything that was not thread-safe in Xlib before XCB probably still
  isn't. XListFontsWithInfo, for instance.

- If one thread is waiting for events and another thread tries to read a
  reply, both will hang until an event arrives. Previously, if this
  happened it might work sometimes, but otherwise would trigger either
  an assertion failure or a permanent hang.

- Versions of libxcb up to and including 1.6 have a bug that can cause
  xcb_wait_for_event or xcb_wait_for_reply to hang if they run
  concurrently with xcb_writev or other writers. So you'll want that fix
  as well.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-18 01:28:38 -07:00
Jamey Sharp
aab43278ae Use InternalLockDisplay on code paths called from LockDisplay.
It's easier to reason about the code when we can't re-enter the
Xlib-private sync-handlers while they're already running.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-18 01:28:38 -07:00
Jamey Sharp
660b7d05f4 Fix _XSend to enqueue the right range of pending requests.
_XSend was off-by-one on both ends. It should not re-enqueue the last
request that was already flushed, but it should enqueue the last request
currently being flushed.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-18 01:28:33 -07:00
Jamey Sharp
f273588990 Pending requests are always added in-order.
Replace insert_pending_request, which did an in-order search of the
queue to find the right insertion point, with a simpler
append_pending_request, and use that in _XSend as well.

Includes assertions to check that the list of pending requests is in
order by sequence number and does not have duplicates.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
2010-04-18 01:28:14 -07:00
Markus Duft
d9cf5885b0 Bug 26839: Fix build problem on Interix (POSIX layer on Windows)
https://bugs.freedesktop.org/show_bug.cgi?id=26839

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-16 08:43:12 -07:00
Josh Triplett
a3f5f1b909 Stop returning an int from _XIDHandler and _XSeqSyncFunction
_XIDHandler and _XSeqSyncFunction originally ran from dpy->synchandler, and
thus had to return an int.  Now, they only run from _XPrivSyncHandler or
LockDisplay, neither of which needs to check their return value since they
always returned 0.  Make them both void.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-15 14:24:21 -07:00
Jamey Sharp
a6d974dc59 Move XID and sync handling from SyncHandle to LockDisplay to fix races.
XID and sync handling happened via _XPrivSyncHandler, assigned to
dpy->synchandler and called from SyncHandle.  _XPrivSyncHandler thus ran
without the Display lock, so manipulating the Display caused races, and
these races led to assertions in multithreaded code (demonstrated via
ico).

In the XTHREADS case, after you've called XInitThreads, we can hook
LockDisplay and UnlockDisplay.  Use that to run _XIDHandler and
_XSeqSyncHandler from LockDisplay rather than SyncHandle; we then know
that we hold the lock, and thus we can avoid races.  We think it makes
sense to do these both from LockDisplay rather than UnlockDisplay, so
that you know you have valid sync and a valid XID before you start
setting up the request you locked to prepare.

In the !XTHREADS case, or if you haven't called XInitThreads, you don't
get to use Xlib from multiple threads, so we can use the logic we have
now (with synchandler and savedsynchandler) without any concern about
races.

This approach gets a bit exciting when the XID and sequence sync
handlers drop and re-acquire the Display lock. Reacquisition will re-run
the handlers, but they return immediately unless they have work to do,
so they can't recurse more than once.  In the worst case, if both of
them have work to do, we can nest the Display lock three deep.  In the
case of the _XIDHandler, we drop the lock to call xcb_generate_id, which
takes the socket back if it needs to request more XIDs, and taking the
socket back will reacquire the lock; we take care to avoid letting
_XIDHandler run again and re-enter XCB from the return_socket callback
(which causes Very Bad Things, and is Not Allowed).

Tested with ico (with 1 and 20 threads), and with several test programs
for XID and sequence sync.  Tested with and without XInitThreads(), and
with and without XCB.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=23192

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
2010-04-15 13:05:08 -07:00
Jamey Sharp
b089b53b69 Honest. Extensions get to filter async errors too.
Under some circumstances, errors are picked up by calling
xcb_poll_for_reply, rather than xcb_poll_for_event, because Xlib issued
the requests with the XCB_REQUEST_CHECKED flag. That happens when either
an async handler is queued at the time the requests are flushed, or when
XSetEventQueueOwner has been used to prevent Xlib from processing XCB's
event queue.

This bugfix extends 405132dab6 to cover
those cases.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26545

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-14 12:59:11 -07:00
Jamey Sharp
a15c312746 _XError already runs async handlers; only call them directly for replies.
The previous behavior probably would have triggered bug reports someday.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-14 12:54:34 -07:00
Jamey Sharp
405132dab6 Extensions get to filter async errors too.
Apparently I misread XlibInt.c:_XReply and thought that handlers set
with XESetError should be consulted only for the sequence number that
_XReply is currently looking for. In fact, the error handlers are also
consulted when an error arrives for a request that was not expected to
have a reply.

However, in an odd twist, the error handlers are *not* consulted outside
of _XReply--that is, when looking for events, or waiting to be able to
flush the output queue. So this patch takes some small pains to preserve
that behavior, though it seems likely to have been unintentional.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26545

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-13 13:12:07 -07:00
Jamey Sharp
d3eab4a38f Prefer the xcb_generic_error_t we already have over casting to xEvent.
Just a minor cleanup.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-13 13:12:06 -07:00
Jamey Sharp
75ea8c3793 Run the user's synchandler as well as any internal synchandlers.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27595

Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-04-12 11:30:20 -07:00
Kusanagi Kouichi
c3f3e4a9e5 Fix manual typos.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:49:56 -07:00
Dirk Wallenstein
75c6c55954 man: Correct the XkbAllAccessXEventsMask mask name
This mask has probably been renamed but not been updated in the manuals.

Signed-off-by: Dirk Wallenstein <dirkwallenstein@t-online.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:44:39 -07:00