Commit graph

21 commits

Author SHA1 Message Date
Alan Coopersmith
c8c4161491 Fix a several sparse warnings: Using plain integer as NULL pointer
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-06 16:52:46 -07:00
Alan Coopersmith
501f4e0ada Bug 6820: Xlib shouldn't handle EAGAIN as a fatal IO error
X.Org Bug #6820 <http://bugs.freedesktop.org/show_bug.cgi?id=6820>
Patch #17637 <http://bugs.freedesktop.org/attachment.cgi?id=17637>

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-12 17:38:21 -07: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
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
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
Alan Coopersmith
cf49e53701 Strip whitespace from end of lines in source files 2008-06-17 14:41:17 -07: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
Josh Triplett
64325f38ba Fix fd.o bug 15023: make Xlib sync correctly given many void requests
If given many requests without replies, Xlib may not sync until it flushes
the output buffer.  Thus, if Xlib can fit enough requests in the buffer to
pass by the number of requests it would normally sync after (65536 -
BUFSIZE/sizeof(xReq)), it will sync too late.  The test case in bug 15023
demonstrated this by issuing a request with a reply (ListExtensions) at
just the right time to get confused with the GetInputFocus reply issued in
response to the sync 65,536 requests later; the test case used an async
handler to watch the replies, since otherwise it could not issue a request
without waiting for the response.  When the test case failed, Xlib's sync
handler would eat the ListExtensions reply, and the test case's async
handler would see the GetInputFocus reply.

Fix this by replacing SEQLIMIT with a function sync_hazard() that uses the
buffer size to figure out when the sequence numbers could potentially wrap
before the next flush.

With this commit, the test case consistently passed, and the async reply
handler always saw the ListExtensions reply.

Commit by Jamey Sharp and Josh Triplett.
2008-03-15 13:04:54 -07:00
Jamey Sharp
95523387d6 Allow re-entrant Xlib calls from _XIOError.
Some libraries try to clean up X resources from atexit handlers, _fini,
or C++ destructors. To make these work, the Display lock should be
downgraded to a user lock (as in XLockDisplay) before calling exit(3).
This blocks Xlib calls from threads other than the one calling exit(3)
while still allowing the exit handlers to call Xlib.

This assumes that the thread calling exit will call any atexit handlers.
If this does not hold, then an alternate solution would involve
registering an atexit handler to take over the lock, which would only
assume that the same thread calls all the atexit handlers.

Commit by Josh Triplett and Jamey Sharp.
2007-06-02 11:57:39 -07:00
Tilman Sauerbeck
1c75a94790 Bug #10475: Fixed lots of char*/const char* mixups.
I didn't fix all of them, as that would require touching
public headers.
2007-04-06 11:59:31 +02:00
Matthias Hopf
9354351fcb Bug #3104: Compose table cache for faster X11 application starts. Part 1: Pointerless compose data structure, using indices instead of pointers, needed for mmap()ing data structure. 2006-06-16 16:31:37 +02:00
Jamey Sharp
a11d1b0ae6 Use the full_sequence from XCBGenericError/Event for setting last_request_read, and quit replacing _XSetLastRequestRead with an XCB-specific version. 2006-03-03 01:42:49 -08:00
Jamey Sharp
c7cda56eeb Land XCB support on X.org HEAD. 2006-02-19 11:49:15 -08:00
Jamey Sharp
6b0158dfad Refactor _XFlush and _XSend code that sets dpy->synchandler to _XSeqSyncFunction into a new function, _XSetSeqSyncFunction. It makes the patch for XCB cleaner, but is arguably a good idea anyway. 2006-02-14 19:37:36 +00:00
Alexander Gottwald
fd5f58e0ba Replace <X11/Xtrans.h> with <X11/Xtrans/Xtrans.h>
Copy Xtrans.h to exports/include/X11/Xtrans only
2005-06-09 15:52:02 +00:00
Søren Sandmann Pedersen
7eee605e3a - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in <X11/...>
- For Xcomposite and Xdamage, don't link the build system out of the xc tree
- Link the public X11 headers into their own directory
- Add links to XKeysymDB and XErrorDB
- Add links to all the Xlib man pages
- Add links to the lcUniConv subdirectory
- Conditionally include config.h in Xlib source
2005-05-13 22:53:36 +00:00
Alexander Gottwald
11a03ab908 Bugzilla #1864, http://freedesktop.org/bugzilla/show_bug.cgi?id=1864 Initialize pointer to NULL to avoid freeing random memory 2004-12-01 12:42:17 +00:00
Alexander Gottwald
f3d83ee153 Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added mingw (Win32) port 2004-11-15 15:06:54 +00:00
Alexander Gottwald
b798ea1191 Bugzilla #1864, http://freedesktop.org/bugzilla/show_bug.cgi?id=1864 Initialize pointer to NULL to avoid freeing random memory 2004-11-15 13:29:56 +00:00
Egbert Eich
c6349f4319 Merging XORG-CURRENT into trunk 2004-04-23 18:42:09 +00:00
Kaleb Keithley
deae12c6b6 R6.6 is the Xorg base-line 2003-11-14 15:54:30 +00:00