Commit graph

486 commits

Author SHA1 Message Date
Julien Cristau
ae23c25b93 Bump to 1.1.99.2 2008-11-05 22:09:37 +01:00
Julien Cristau
d31e644c65 Fix distcheck 2008-11-05 22:09:32 +01:00
Jamey Sharp
e6a7b70cdb Support multiple independent internal sync handlers
Xlib has several independent tasks that need to be performed with the
display unlocked. It does this by replacing the existing sync handler with
one of a variety of internal sync handlers. However, if multiple internal
sync handlers need to run, then the last one registering wins and
previously registered internal sync handlers are never invoked. This
manifested as a bug with DRI applications on Xlib/XCB as that requires
both an XID handler after every XID allocation, and the periodic sequence
number handler. The XID handler would win, and the sequence number handler
would never be invoked.

Fix this by unifying the internal sync handler mechanism into a single
function that calls all of the known internal sync handlers. They all need
to deal with being called when not strictly necessary now.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@freedesktop.org>
2008-11-04 08:54:01 -08:00
Keith Packard
2dbaaab9c4 Ensure that _XReadEvents always leaves an event in the queue on return
XNextEvent assumes that the event queue will be non-empty on return from
_XReadEvents, but with multiple event readers running, the previous change
could leave the queue empty on return from process_responses. Re-invoke
process_responses until the queue is non-empty.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-04 08:54:01 -08:00
Keith Packard
bedfe68259 Permit only one Xlib thread to block waiting for events
As Xlib queues events internally, we must prevent multiple Xlib threads from
entering XCB to wait for an event in case the queued event is to be
delivered to the thread which didn't manage to read it. In other words, let
only one Xlib thread into xcb_wait_for_event at a time.

Jamey Sharp looked over my shoulder while making this fix and, while hating
my whitespace conventions, appears happy enough with the actual code.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-04 08:54:01 -08:00
Jamey Sharp
cc19618d2e Fix XAllocID race: hold the user display lock until we have a new XID.
Xlib built --without-xcb is also vulnerable to this race, and a similar
fix might work there too.

Also, use an XID that's truly invalid while waiting for the next XID to be
requested.
2008-11-04 08:54:01 -08:00
Josh Triplett
54e5c0941b Use XCB's new socket handoff mechanism rather than the old XCB Xlib lock.
Previously, Xlib/XCB used XCB's Xlib lock to prevent XCB from sending
requests between calls to Xlib's LockDisplay and UnlockDisplay macros.
Xlib/XCB then sent all of its requests using XCB's xcb_send_request, and
had to flush its requests when unlocking the display.

XCB 1.2 adds a new socket handoff mechanism, xcb_take_socket.  Replace
much of the existing Xlib/XCB implementation with the use of
xcb_take_socket to take ownership of the write side of the X connection
socket, and a return_socket callback which writes any outstanding requests
with xcb_writev.  This approach allows Xlib/XCB to use the same buffering
as traditional Xlib did.  In particular, programs which use Xlib/XCB and
never make XCB calls will never need to hand the socket back to XCB, and
vice versa.

This allows us to discard large quantities of synchronization code from
Xlib/XCB, together with the synchronization bugs present in that code.
Several test cases which previously failed now work perfectly, including
multi-threaded ico.  In addition, the infamous locking correctness
assertions, triggered when double-locking or when unlocking without a
previous lock, no longer exist, because Xlib/XCB no longer has any reason
to care more about application locking than traditional Xlib does.

Furthermore, the handoff approach provides great improvements to
performance.  Results from x11perf's XNoOp test, which represented the
worst case for the lock-based Xlib/XCB:

Traditional Xlib:       average 19100000/sec
Lock-based Xlib/XCB:    average  3350000/sec
Handoff-based Xlib/XCB: average 17400000/sec

Thus, for no-ops, the handoff mechanism provides more than a 4x speedup to
Xlib/XCB, bringing Xlib/XCB within 9% of traditional Xlib no-op
performance.  Of course, real-world workloads do not use no-op, so your
mileage may vary.  In particular, since no-ops represent the worst case,
we expect real workloads to more closely match the performance of
traditional Xlib.

While removing synchronization code, we changed _XReply to not drop any
locks when calling xcb_wait_for_reply; previously, we had to carefully
avoid a deadlock between the Display lock and the XCB Xlib lock. Holding
the locks reduces implementation complexity and should not impact
applications.

Commit by Jamey Sharp and Josh Triplett.
XCB's handoff mechanism inspired by Keith Packard.
2008-11-04 08:53:09 -08:00
Chris Ball
5a19ac473f Remove configure check for xcb-xlib.
xcb-xlib has been intentionally removed from libxcb; stop checking for
it at configure-time.
2008-11-03 22:57:29 -05:00
Josh Triplett
34b35dda0b .gitignore: Add dolt files 2008-10-29 14:37:44 -07:00
Peter Hutterer
1290cccf2d man: fix formatting error in XkbGetIndicatorState man page. 2008-10-28 11:56:55 +10:30
James Cloos
b1022fa6d7 Increase size of working arrays in the makekeys utility program.
Makekeys is used to create an optimal hash of the keysyms defined
in x11proto’s keysymdef.h.

The recent addition of new keysyms there has triggered a bug in
makekeys where it tries to use a zero on the rhs of the % (mod)
operator (resulting in a divide by zero error) whenever it fails
to find a solution within its constraints.

Increasing the size of the arrays allows it to find a solution for
the current set of keysyms.

Makekeys is only run durring the build process, so this has no impact
on users of libX11, only on the amount of VM needed to build it.

It still needs a more complete fix, but this allows compiles to
progress until that is completed.
2008-10-25 09:13:08 -04:00
James Cloos
3e9afd501e Dolt-ify
Add dolt to acinclude.m4 and call it it configure.ac to speed compiles.
2008-10-25 00:37:53 -04:00
Peter Hutterer
39c0b266ca Add more keysyms for PS3 BD remotes, Ericsson Phones #16519
X.Org Bug 16519 <https://bugs.freedesktop.org/show_bug.cgi?id=16519>
2008-10-15 14:30:20 +10:30
Peter Hutterer
d23aad3133 Add XF86Battery, XF86Bluetooth, XF86WLAN, XF86UWB to keysymdb. 2008-10-13 12:07:42 +10:30
Peter Hutterer
214ea6f5fd xkb: fix out-by-1 error in _XkbWriteKeyExplicit.
Thanks to Michael Meeks, Novell Bug 369263.
https://bugzilla.novell.com/show_bug.cgi?id=369263
2008-10-13 12:07:42 +10:30
Alan Coopersmith
e7ece39afc Sun bug #6739431: double free in _X11TransConnectDisplay()
Double free() introduced in bf53987eaf
After copying original_hostname to phostname, set original_hostname
to NULL, so we don't free the same pointer twice when we free both
original_hostname and phostname.

<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6739431>
2008-10-07 15:41:38 -07:00
Daniel Stone
0877bc916a configure.ac: Fix CC_FOR_BUILD logic error
Turns out we were accidentally smashing it so that you couldn't set it
externally at all.  Oops.
2008-09-23 19:02:02 +03:00
John Tapsell
58bf3aa746 Build: Use native compiler for makekeys
makekeys needs to be run during the build process, as opposed to on the
target, so build it with either of gcc or cc to fix cross-compiling.
This can be overridden by setting $CC_FOR_BUILD.
2008-09-23 17:30:13 +03:00
Adam Jackson
340422a5c7 Fix the previous patch for the BadFont case. 2008-09-17 12:54:34 -04:00
Matthias Clasen
2335eafe4b Bug #17616: Fix an XCB leak when the client has a non-fatal error handler. 2008-09-17 10:43:52 -04:00
Rafael Ávila de Espíndola
db0b85db29 Fix problem with <dead_acute> <c> in pt_BR.UTF-8
The <dead_acute> <C> and <dead_acute> <c> lines in the pt_BR UTF-8
Compose file show "Ç" and "ç" (c with cedilla accent) (akin to the
ISO 8859 pt_BR Compose file) as the string but specify the keysym
and comment for Ć and ć (c with acute accent).

This commit normalizes those two lines to match the specified string.

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

Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-09-14 19:15:26 -04:00
Michael Verret
b065c011ba Fix documentation typo
Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-09-08 16:42:48 -04:00
James Cloos
4213ea9518 Remove extraneous <angle brackets> from the Ethiopic Compose file.
The am_ET.UTF-8 Compose file submitted in:

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

for the OLCP project used incorrect syntax.  (It has angle brackets around the
Uxxxx symbols on the right hand side rather than only on the left hand side).

This bug is noted in OLPC’s ticket:

http://dev.laptop.org/ticket/7474
http://dev.laptop.org/attachment/ticket/7474/olpc_7474_dead_vowels_libX11.patch
2008-09-06 04:19:19 -04:00
James Cloos
9df84b513d Complete the set of vulgar fractions
Unicode 1.1 added thirds, fifths, sixths and eights;
we might as well catch up.

(Unicode and ISO 10646 have 1/7 (U2150), 1/9 (U2151), 1/10 (U2152)
and 0/3 (U2189) in their pipelines, but those four can be added
here after they are published.)
2008-09-01 17:58:13 -04:00
James Cloos
a788792e9d nls (en_US) Re-remove long compositions that override shorter
As reported in <https://bugs.freedesktop.org/show_bug.cgi?id=17228>:

  Commit a6f4bbf7
    nls (en_US): remove long compositions that override shorter [...]
    removed some longer compose sequences because there are shorter
    ones which take preference over the longer. For example the
    sequences:

      <Multi_key> <apostrophe> <comma> <c>   : U1E09 # ḉ
      <Multi_key> <apostrophe> <comma> <C>   : U1E08 # Ḉ

    were removed becase there already was:

      <Multi_key> <apostrophe> <comma>       : U201A # ‚

  Then commit 4ba09125
    Work on making the en_US and pt_BR UTF-8 Compose as similar as
    possible added exactly the same key sequences again. Obviusly
    they won't work.
2008-08-20 15:28:07 -04:00
James Cloos
55248e5c84 Add more <Multi_key> <cedilla> Compose tuples
The last commit missed the el_GR UTF-8 Compose.pre as well as
the various ISO 8859 locales which have compose sequences
generating ‘WITH CEDILLA’ characters.

(Interestingly, some of the 8859 locales already supported
<Multi_key> <cedilla> for some CEDILLA characters, but not
for Ç or ç.)

This is further work on bug 10397.
2008-07-17 21:01:42 -04:00
James Cloos
4ba091255b Work on making the en_US and pt_BR UTF-8 Compose as similar as possible.
The eventual goal here is to have a single primary UTF-8 Compose
file which the locale-specific UTF-8 Compose.pre files can #include.
2008-07-17 17:16:50 -04:00
James Cloos
254522d3c2 Add <Multi_key> <cedilla> Compose tuples
The en_US and pt_BR UTF-8 Compose tables had support for using <comma>
with <Multi_key> to enter CEDILLA characters.  Bug 10397 requests
support for using <cedilla> instead of <comma> in said sequences.

This commit makes both styles work.
2008-07-17 17:13:36 -04:00
James Cloos
7dc907f603 Fix commit 21e464ec68
The new block was added twice to the en_US.UTF-8 Compose.pre;
delete the duplicate.
2008-06-28 15:25:23 -04:00
Peter Hutterer
596e081b74 Fix unbalanced parenthesis in XKBlib.h # 16551
X.Org Bug 16551 <http://bugs.freedesktop.org/show_bug.cgi?id=16551>
2008-06-28 20:15:16 +09:30
Adam Jackson
f6af6dd2f7 Bug #14898: Don't abuse the sprintf() implementation.
The thing you're printing into should not itself appear in the list of
things to print from, that's bad juju.  Just use strcat().
2008-06-24 13:16:53 -04:00
Khaled Hosny
21e464ec68 NLS: Add Arabic Lam-Alef ligature compose sequences (bug #16426)
Add some Arabic digraphs to utf-8 locales with a Compose.pre

Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-06-19 18:26:11 -04:00
Alan Coopersmith
bf53987eaf Rework code to choose local connection types and fallback to others
Adds --with-local-transport-order configure flag if you don't like the
default ordering (which is platform dependent)

Includes fixes for these Sun/Solaris bug ids:
6678250 X Commands returning incorrect display value unix:0.0 not <system>:0.0
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6678250>
6716481 libX11 should prefer Unix domain sockets over named pipes on Solaris
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6716481>
2008-06-18 20:00:25 -07:00
Alan Coopersmith
cf49e53701 Strip whitespace from end of lines in source files 2008-06-17 14:41:17 -07:00
Jeff Smith
f76fd81dfb Fix memory leak in XOpenDisplay
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-06-16 17:09:29 +09:30
Jens Herden
fca0b0ba3f NLS: Add Khmer compose sequences (bug #5706)
Add some Khmer digraphs to all locales with a Compose.pre.
2008-06-10 20:07:30 +03:00
Daniel Stone
e54cffb649 Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libX11 2008-06-10 20:04:30 +03:00
Peter Hutterer
721b574d36 Bump to 1.1.99.1 2008-05-29 10:57:21 +09:30
Peter Hutterer
631d32d132 Require xproto 7.0.13 and libxcb 1.1.90 (for GenericEvents) 2008-05-28 17:49:56 +09:30
Peter Hutterer
e9195db725 Merge branch 'master' into xge 2008-05-22 12:14:28 +09:30
Daniel Stone
19802ccd39 gitignore: Update with loads more bits from server 2008-05-19 19:22:31 +03:00
Adam Jackson
a7f85567a3 Bug #15884: Remove useless sleep()'s from the connection code.
For network transports, there's enough delay in the network layer
already without adding more.  For local transports, just hurry up
and fail if the server isn't there.
2008-05-13 10:28:39 -04:00
Peter Hutterer
c34f76f475 Pull down extra bytes when reading a GenericEvent (non-xcb).
I refuse to take any responsibily for this code. It works, I guess.
But - all the flushing is done somewhere before that, so we might need to
flush here. Under some circumstances anyway. Don't ask me, I'm an optical
illusion.

Build with xcb as transport layer highly recommended.
2008-05-12 21:48:12 +09:30
Peter Hutterer
c9b2ff1e6a Merge branch 'master' into xge 2008-05-12 17:58:37 +09:30
Teemu Likonen
9129057bdb Change <dead_belowdot> to <dead_belowring> for U+1E00 and U+U1E01
Commit 6b6caeea83 added <dead_belowdot>
<A> and <dead_belowdot> <a> compose sequences for letters U+1E00 and
U+U1E01 (LATIN CAPITAL/SMALL LETTER A WITH RING BELOW). This caused
duplicate compose sequences since these have already been defined. Also,
using <dead_belowring> is more logical since the diacritic is indeed
a "RING BELOW".
2008-05-07 23:20:53 +03:00
Daniel Stone
01a9cb5888 NLS: Make UTF-8 the default for Russian
No-one uses 8859-5 anymore, so make the default for Russian UTF-8; the
only other possible answer would be KOI8-R.

Signed-off-by: Sergey V. Udaltsov <sergey.udaltsov@gmail.com>
2008-05-07 20:04:44 +03:00
Ross Burton
407b81bfbb NLS: Add interrobang to UTF-8 compose tables (bug #15653)
It is what it says on the box.
2008-04-29 13:38:10 +03:00
Theppitak Karoonboonyanan
0b6682303e IM: Respect XMODIFIERS for Thai locale (bug #15719)
When looking at Thai input methods, make sure XMODIFIERS is checked
before jumping straight into built-in Thai processing, so external XIM
servers such as SCIM can be used with Thai.
2008-04-28 11:51:25 +03:00
Colin Harrison
c13aded1b2 Fix missing error condition 2008-04-26 18:56:05 +01:00
Colin Harrison
f5c5ffc175 Xlib warning fixes 2008-04-21 17:24:33 +01:00