Commit graph

514 commits

Author SHA1 Message Date
Alan Coopersmith
d7bea6fa90 Add README with pointers to mailing list, bugzilla & git repos
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-02-02 20:34:31 -08:00
Paulo Cesar Pereira de Andrade
f682c27e93 Check if a function argument is NULL.
This was an addition to patch (also by me)
https://bugs.freedesktop.org/attachment.cgi?id=14660
that was not added when rediscovering/correcting the problem.
2009-02-02 16:36:39 -02:00
Paulo Cesar Pereira de Andrade
427e9d45d4 Allow multiple inclusions of cursorfont.h, cosmetic patch. 2009-02-02 16:31:05 -02:00
Paulo Cesar Pereira de Andrade
b91524a53e Don't add prototypes for functions that don't exist.
Note that a full review was not done, only for functions that receive
char/short arguments, or one of it's parameters is a function pointer
that requires char/short arguments.
2009-02-02 16:30:39 -02:00
Paulo Cesar Pereira de Andrade
537eb52fe2 WORD64 compile fix. This bug catched on a overview of the code.
The code is wrong since the first git revision, so it seens that it has
not been compiled with WORD64 for quite some time, there is also another
interesting code in xkb/XKBRdBuf.c:
  <hash>ifdef WORD64
  _XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
  <hash>endif
and possibly there are other similar problems.
2009-02-02 16:29:27 -02:00
Brian Rogers
ffd0300fb7 Initialize event_notify after allocating the memory for it.
An uninitialized or otherwise invalid condition variable can apparently
cause a hang in pthread_cond_broadcast. Ekiga, openoffice, and xine
at least are freezing as a result of event_notify never being initialized.

Signed-off-by: Brian Rogers <brian@xyzw.org>
Signed-off-by: Bart Massey <bart@cs.pdx.edu>
2009-01-31 13:36:45 -08:00
James Cloos
97fc6babd4 NLS: Add UTF-8 compose file for Finnish
From bug report:

  https://bugs.freedesktop.org/show_bug.cgi?id=18747
2009-01-29 20:17:48 -05:00
Paulo Cesar Pereira de Andrade
1bd2966ed8 patches to avoid gcc warnings for libX11 (#4)
Author is Peter Breitenlohner <peb@mppmu.mpg.de>
Bug #17946, attachment #19443

This patch avoids the gcc warning
	../../../../libX11-1.1.5/modules/im/ximcp/imDefLkup.c:223: warning: passing arg 1 of `_XimProcSyncReply' from incompatible pointer type
(same as already done at other places)

BTW: what is the difference between XIM (the type of ic->core.im)
and Xim ?
2009-01-29 20:25:15 -02:00
Paulo Cesar Pereira de Andrade
f16dd6af3e patches to avoid gcc warnings for libX11 (#3)
Author is Peter Breitenlohner <peb@mppmu.mpg.de>
Bug #17946, attachment #19441

This patch avoids the two gcc warnings
	../../../../libX11-1.1.5/modules/im/ximcp/imRm.c:413: warning: assignment discards qualifiers from pointer target type
	../../../../libX11-1.1.5/modules/im/ximcp/imRm.c:450: warning: assignment discards qualifiers from pointer target type

Note, that this as a rather crude fix of the problem (and it is really a
shame to cast name_table to non-const).

The right solution would be to declare XIMValuesList.supported_values
(in include/X11/Xlib.h) as 'const char **' (or '_Xconst char **').
This will, however, require extensive modifications in various places.
2009-01-29 20:22:21 -02:00
Paulo Cesar Pereira de Andrade
cce75c5dce patches to avoid gcc warnings for libX11 (#2)
Author is Peter Breitenlohner <peb@mppmu.mpg.de>
Bug #17946, attachment #19440

Avoid a preprocessor message
	<stdin>:194: warning: no newline at end of file

Two more such warnings (in XkbSAGroup.man and XkbSASetGroup.man)
seem to be caused by a truncated (or otherwise incomplete)
manpage.
2009-01-29 20:20:18 -02:00
Paulo Cesar Pereira de Andrade
692baebcc5 patches to avoid gcc warnings for libX11 (#1)
Author is Peter Breitenlohner <peb@mppmu.mpg.de>
Bug #17946, attachment #19439

Define as 1 (one) as done by autoconf and the command line
option, e.g. -DX11_t, not as empty.

This avoids the gcc (3.4.6) warnings:
	../../libX11-1.1.5/src/x11_trans.c:27:1: warning: "X11_t" redefined
	<command line>:7:1: warning: this is the location of the previous definition
	../../libX11-1.1.5/src/x11_trans.c:28:1: warning: "TRANS_CLIENT" redefined
	<command line>:8:1: warning: this is the location of the previous definition

Similarly, follow the autoconf convention to define XTHREADS
and XUSE_MTSAFE_API as one.

This avoids analogous warnings when compiling libXcomposite,
libXcursor, and libXdamage.

No reason to AC_SUBST XTHREADS and XUSE_MTSAFE_API (unused).
2009-01-29 20:17:14 -02:00
Paulo Cesar Pereira de Andrade
a1977883c9 Janitor: Correct some gcc/sparse warnings.
Most remaining warnings are about XIM/Xim to/from conversion
and discarding const from pointers.
2009-01-29 15:01:06 -02:00
Paulo Cesar Pereira de Andrade
8ba0ca32a6 Janitor: ansification, make distcheck, compiler warnings.
Only convert to use "ansi prototypes" the functions warned from
compilation with "./autogen.sh --prefix=/usr", on a Linux computer.

  Also, only address "trivial" compiler warning fixes in this commit.

  The new .gitignore is the output of a command like:
% find . -name .gitignore -exec cat {} \; | sort | uniq
and only the toplevel .gitignore file was kept.
2009-01-28 20:31:42 -02:00
Peter Hutterer
091c1624fd Fix wrong implies symbol.
Quote Simos Xenitellis:
> I checked the gtk+ commit logs that go back to 2000, and I see that still it
> was
>
>   { 0x08ce, 0x21d2 }, /*                     implies ⇒ RIGHTWARDS
> DOUBLE ARROW */
>
> In XFree86, it appears there was an error when they converted the
> original table to
> http://cvsweb.xfree86.org/cvsweb/xc/lib/X11/imKStoUCS.c?rev=1.1&content-type=text/vnd.viewcvs-markup
> and the problem still shows up there (November 2000).

http://lists.freedesktop.org/archives/xorg/2008-October/039743.html

Reported by Erik Streb del Toro.
2009-01-13 12:05:54 +10:00
James Cloos
e32521f19e [i18n] s/U00DC/Udiaeresis/g
The xkeyboard-config keyboards generate the symbol Udiaeresis, not
U00DC.  Make sure the relevant Compose sequences expect the symbol
which the keyboards actually send.
2008-12-07 04:13:34 -05:00
James Cloos
b7502abfe2 Revert "For nls/*.pre, allow people to comment lines by starting them with '##'."
As of commit c9d20e3 the initial double-hashes are replaced with proper C comments.

This reverts commit a225a0be48.
2008-12-07 04:09:46 -05:00
James Cloos
c9d20e3f69 Use C comments rather than initial doubled hashes to exclude lines from .pre files 2008-12-07 04:08:23 -05:00
vehemens
c34ce54d9e [i18n] Distribute new headers which were added for gb18030 support.
big5hkscs.h and gbk.h, added in 67e34d7a, need to be in SOURCES to
make it into the tar.

Completes 67e34d7a82.

Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-12-07 01:18:26 -05:00
Stefan Dirsch
418819558d Fixed strange font mixups, when fontsets are still used (#2676, Novell #74299). 2008-11-22 22:01:07 +01:00
Stefan Dirsch
67e34d7a82 Added remaining xlib patch required for gb18030 support (#1573). 2008-11-22 19:40:54 +01:00
Stefan Dirsch
55782a0a1f Added remaining hunk of Egbert's patch to prevent XIM deadlocks (#1182). 2008-11-22 17:53:06 +01:00
Ken Thomases
c859446c50 [i18n] Provide translation from XK_partialderivative (8ef) to Unicode (U2202)
Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-11-21 13:58:10 -05:00
Jeremy Huddleston
5e68e94d85 Force local transport when using the launchd socket.
Fixes a regression due to
bf53987eaf
2008-11-17 20:47:26 -08:00
Peter Hutterer
7aca689ce1 Add XF86Suspend, XF86Hibernate to KeysymDB. 2008-11-14 10:32:50 +10:00
James Cloos
d16b11f25f [nls] Annotate the Bépo compose sequences
Add comments with the UCS names.
Add utf-8 strings for each result.
Format for easy reading.
2008-11-11 19:43:39 -05:00
James Cloos
7302984642 [nls] Add some UTF-8 Compose sequences
As requested for the Bépo keyboard layout (http://clavier-dvorak.org/wiki/).

Cf. bugs:

  https://bugs.freedesktop.org/show_bug.cgi?id=17821
  https://bugs.freedesktop.org/show_bug.cgi?id=17822
2008-11-11 16:41:34 -05:00
Colin Harrison
ad6008a0c9 Fix copy/paste typo in imLcPrs
Signed-off-by: James Cloos <cloos@jhcloos.com>
2008-11-06 17:48:21 -05:00
Adam Jackson
0f0168ad18 Fix leak in _XimXGetReadData
Spotted by Denis Dzyubenko
2008-11-06 14:54:13 -05:00
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