Commit graph

674 commits

Author SHA1 Message Date
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
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
Dirk Wallenstein
9262aceaff man: Add missing geometry component flag
Signed-off-by: Dirk Wallenstein <dirkwallenstein@t-online.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:44:36 -07:00
Dirk Wallenstein
50cf134465 man: Return value of XkbGetState is Status and not Bool
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:30:35 -07:00
Dirk Wallenstein
7a93ae2bb5 man: Fix return value specification of XkbKeyActionEntry
The XkbKeyActionEntry macro expands to a pointer.

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:30:31 -07:00
Dirk Wallenstein
e9884d4a05 man: Redirect users from XKeycodeToKeysym to XkbKeycodeToKeysym #25732
XKeycodeToKeysym keeps compatibility with pre-XKB and thus only sees 2
groups with 2 levels each. It wraps the index into the next group.
This behavior confuses the unaware user, and therefore this will add a
reference to XkbKeycodeToKeysym in the corresponding man paragraph.

Another bug had that issue, too. #5349

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:30:19 -07:00
Alan Coopersmith
6474cdf97c Fix typo in new fi_FI.UTF-8 that was reported by "make check"
Unrecognized pattern in Compose on line #154:
  <dead_diaeresis> <space>                " "¨"

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-08 20:02:05 -07:00
Marko Myllynen
91bd5e7af2 Bug 27465 - Rewritten fi_FI.UTF-8 Compose file
I've rewritten the fi_FI.UTF-8 Compose file so that it

- includes en_US.UTF-8/Compose for base compose definitions (and thus gets any
possible additions to en_US.UTF-8/Compose automatically included)
- overrides any en_US.UTF-8/Compose definitions with fi_FI.UTF-8/Compose
definitions (thus making it safe to include en_US.UTF-8/Compose)
- lists all the definitions specified in the SFS 5966 standard (thus making it
easy to verify that the implementation is valid and complete)
- adds a header about the file itself as required by the standard

The rewritten version is ~320 lines compared to over 5000 lines of the previous
version.

https://bugs.freedesktop.org/show_bug.cgi?id=27465
2010-04-08 19:53:52 -07:00
Gaetan Nadon
f6a4fd0c76 config: update and relocate AC_DEFINE_DIR macro
Remove deprecated acinclude.m4 macro container file
Use separate macro files as per autoconf recommendation
Use the latest macro from GNU (ax) which replaces
the non-gnu version (ac)
This preserves the Autoconf macro AC namespace.

Also moved out of acinclude.m4 is the DOLT macro

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-06 11:23:44 -04:00
Gaetan Nadon
61d5231db4 config: remove the pkgconfig pc.in file from EXTRA_DIST
Automake always includes it in the tarball.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-03-29 14:53:48 -04:00
Fernando Carrijo
69fc76a032 No need for req->firstKeyCode to be set twice.
There is no reason to set req->firstKeyCode twice when a client, wishful
for changing keyboard mappings, calls XChangeKeyboardMapping. This patch
fixes the mistake by making no functional changes to libX11 whatsoever.

Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-18 13:36:14 +10:00
Gaetan Nadon
b5797597f8 config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-19 09:22:56 -05:00
Gaetan Nadon
052c4d7995 specs: change install cmd due to automake 1.11
specData_INSTALL is defined in 1.9 and 1.10 but not 1.11

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-16 14:28:21 -05:00
Gaetan Nadon
7277a18cda doc: use $(mkdir_p) rather than $(MKDIR_P) due to automake 1.9.6
$(MKDIR_P) is not defined in automake 1.9.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-09 17:27:08 -05:00
Gaetan Nadon
e66eda95b5 specs: install html images in $docdir with html files
The images required by the html files have been omitted.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-05 08:57:46 -05:00
Gaetan Nadon
137d1ff6be doc: use new macros to control doc generation
Namely XORG_WITH_GROFF for the groff generation tool
XORG_WITH_PS2PDF for the conversion of PS docs to PDF
XORG_ENABLE_SPECS for the generation of specs

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-03 20:49:58 -05:00
Gaetan Nadon
9ca583c5d6 doc: clean-up generated html images
Generate images in /images as is the convention
Provide a base file name for images rather than process ID
Remove images directory when running make clean

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-01-26 19:41:08 -05:00
Kristian Høgsberg
eb289b34bf XErrorDB: Add new DRI2 request names 2010-01-21 13:39:17 -05:00
Julien Cristau
6babf2123d man: Fix typo in Makefile
Missing line continuation was preventing the XCompose alias from being
generated.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-16 17:51:13 -08:00
Alan Coopersmith
68530599e6 libX11 1.3.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-16 11:41:32 -08:00
Alan Coopersmith
1e5af224b9 Update COPYING file with actual licenses from libX11 code & docs
COPYING was previously a years out-of-date copy of the LICENSES
doc summarizing all licenses for all XFree86 components, many of
which did not apply to libX11.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 18:37:50 -08:00
Alan Coopersmith
ddb1786720 Purge CVS/RCS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 17:38:26 -08:00
Alan Coopersmith
c1db9ddcfa Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 15:39:14 -08:00
Alan Coopersmith
1aaa7c0358 Add %S substitutions to Compose man page
Commit 9df349a789 added support for %S
in Compose file include statements - this documents it in the Compose
file man page.

Also changes the existing substitution documentation to list format
instead of a paragraph format to allow easier adding of %S.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 08:28:22 -08:00
Richard Purdie
94b45db930 Fix configure.ac PKG_ macro calls
If the first call to PKG_CHECK_MODULES() may not be called during execution
which is the case here since its inside a case statement, call
PKG_PROG_PKG_CONFIG() to ensure things worked correctly.

Fixes a configure failure introduced by commit
87529c0390 when xcb is enabled.

http://bugs.freedesktop.org/show_bug.cgi?id=26041

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 08:11:47 -08:00
Alan Coopersmith
df559d8bc2 Raise xorg-macros requirement to 1.4
Needed since the changes in 464390f16d
depend on the INSTALL file delivered in xorg-macros 1.4

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 08:03:20 -08:00
James Cloos
9df349a789 Allow inclusion of system level compose files.
With the release of XFree86 4.4 an inclusion system of compose files was
added to Xlib to allow inclusion of the default compose file (with %L),
any compose files from user’s home directory (with %H), or a compose
file with a hard coded path¹. However, even today including system level
compose files is not possible in a platform independent manner although
the machinery for including compose files and overriding previously
defined compositions is already in place.

With the ability to include system level compose files one could greatly
reduce the need for compose file rule duplication and the work needed to
propagate changes in one compose file to others. For example, currently
the Finnish compose file fi_FI.UTF-8 weights over 5000 lines² but it
is almost identical with en_US.UTF-8 except for perhaps half a dozen
compositions.

This commit allows one to include system level compose files with the
following kind of syntax:

include "%S/en_US.UTF-8/Compose"

1] http://www.xfree86.org/4.4.0/RELNOTES5.html#42
2] http://cgit.freedesktop.org/xorg/lib/libX11/tree/nls/fi_FI.UTF-8/Compose.pre

Signed-off-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2010-01-13 11:04:38 -05:00
Thien-Thi Nguyen
ccf21a8877 libX11: Fix comment: Invert polarity (direction) of reformat description.
Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-11 20:54:38 -08:00
Osamu Sayama
4d4676c0d6 set_fontset_extents crash after get_rotate_fontname fix in 2bef065b70
- In set_fontset_extents, check font_data is not NULL before running
  loop that may increment it to a non-NULL invalid pointer.
- Make sure get_rotate_fontname counts the final field

Fixes OpenSolaris bug 6913809: X application dumps core in ja_JP.UTF-8 locale
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6913809>

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-01-06 13:17:40 -08:00
Alan Coopersmith
87529c0390 Merge X11, XKBPROTO, & XPROTO pkg-config lists
Since the XPROTO_CFLAGS & XKBPROTO_CFLAGS are just merged into X11_CFLAGS
in configure.ac anyway, might as well combine the lists passed to
PKG_CHECK_MODULES to reduce duplication in the flags.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-01-06 13:17:12 -08:00
Alan Coopersmith
2dd053667b Add XCompose man page shadow for Compose man page
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-05 18:28:48 -08:00
Alan Coopersmith
02543bba81 Add $(AM_V_GEN) to silence lint rules too
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-05 18:28:48 -08:00
Alan Coopersmith
db7c6fdeea Remove GCC_WARNINGS now that XORG_CWARNFLAGS sets them for us
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-05 18:28:48 -08:00
Gaetan Nadon
6b4e526e7b configure.ac: restore correct order for XORG_DEFAULT_OPTIONS
It must be following AC_USE_SYSTEM_EXTENSION
2009-11-29 10:44:24 -05:00
Gaetan Nadon
3dbaa11d1c Add .gitignore in /specs for generated files
Being in /specs, it will apply for all 3 subdirs
2009-11-29 10:01:44 -05:00
Gaetan Nadon
f45d39d37a Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Now that the INSTALL file is generated.
Allows running make maintainer-clean.
2009-11-27 20:56:03 -05:00
Gaetan Nadon
464390f16d INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.
2009-11-14 09:26:16 -05:00
Gaetan Nadon
6360e7f0ce Deploy the new XORG_DEFAULT_OPTIONS #24242
This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.
2009-11-14 09:26:16 -05:00
Gaetan Nadon
d02f943c98 Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
ChangeLog filename is known to Automake and requires no further
coding in the makefile.
2009-11-14 09:26:16 -05:00
Gaetan Nadon
f77c89c751 .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-11-14 09:26:16 -05:00
Alan Coopersmith
46c7b0e9d0 Add compose-check.pl to EXTRA_DIST
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-11-12 23:05:40 -08:00