summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-06-10 20:04:30 +0300
committerDaniel Stone <daniel@fooishbar.org>2008-06-10 20:04:30 +0300
commite54cffb649b1622c17457e470cfab8cc56d38c97 (patch)
treec0ef2a4caa848a2630cec7b8aa37fde4ccd96291
parent19802ccd3909145e3ba2f6c073271cb5f3701685 (diff)
parent721b574d36f1884c3f1bf7bd933646e2ed6680b5 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libX11
-rw-r--r--configure.ac6
-rw-r--r--include/X11/Xlib.h16
-rw-r--r--modules/im/ximcp/imTrans.c3
-rw-r--r--src/ConnDis.c5
-rw-r--r--src/XlibInt.c12
-rw-r--r--src/xcb_io.c13
6 files changed, 44 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 3719f02a..a5947e2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([libX11],
- 1.1.4,
+ 1.1.99.1,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
libX11)
AC_CONFIG_SRCDIR([Makefile.am])
@@ -32,7 +32,7 @@ AC_CACHE_CHECK([whether to use XCB], [ac_cv_use_xcb], [ac_cv_use_xcb=yes])
AM_CONDITIONAL(XCB, test x$ac_cv_use_xcb != xno)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XPROTO, [xproto >= 7.0.6])
+PKG_CHECK_MODULES(XPROTO, [xproto >= 7.0.13])
AC_SUBST(XPROTO_CFLAGS)
case "$ac_cv_use_xcb" in
@@ -43,7 +43,7 @@ no)
AC_DEFINE(USE_XCB, 0, [Use XCB for low-level protocol implementation])
;;
*)
- X11_REQUIRES="xcb-xlib >= 0.9.92"
+ X11_REQUIRES="xcb-xlib >= 1.1.90"
X11_EXTRA_DEPS="xcb-xlib"
xdmauth="no" # XCB handles all auth
AC_DEFINE(USE_XCB, 1, [Use XCB for low-level protocol implementation])
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
index a26789b1..73cfacda 100644
--- a/include/X11/Xlib.h
+++ b/include/X11/Xlib.h
@@ -971,6 +971,22 @@ typedef struct {
Window window; /* window on which event was requested in event mask */
} XAnyEvent;
+
+/***************************************************************
+ *
+ * GenericEvent. This event is the standard event for all newer extensions.
+ */
+
+typedef struct
+ {
+ int type; /* of event. Always GenericEvent */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ int extension; /* major opcode of extension that caused the event */
+ int evtype; /* actual event type. */
+ } XGenericEvent;
+
/*
* this union is defined so Xlib can always use the same sized
* event structure internally, to avoid memory fragmentation.
diff --git a/modules/im/ximcp/imTrans.c b/modules/im/ximcp/imTrans.c
index a239219b..cb17ca06 100644
--- a/modules/im/ximcp/imTrans.c
+++ b/modules/im/ximcp/imTrans.c
@@ -77,10 +77,7 @@ _XimTransConnect(
spec->trans_conn = NULL;
if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
- {
- sleep(1);
continue;
- }
else
break;
}
diff --git a/src/ConnDis.c b/src/ConnDis.c
index f919d51d..e61e0f05 100644
--- a/src/ConnDis.c
+++ b/src/ConnDis.c
@@ -42,6 +42,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
#include <stdio.h>
#include <ctype.h>
+#include <unistd.h>
#if !defined(WIN32)
#ifndef Lynx
@@ -389,10 +390,7 @@ _X11TransConnectDisplay (
trans_conn = NULL;
if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
- {
- sleep(1);
continue;
- }
else
break;
}
@@ -409,7 +407,6 @@ _X11TransConnectDisplay (
{
_X11TransClose(trans_conn);
trans_conn = NULL;
- sleep(1);
if (saddr)
{
free ((char *) saddr);
diff --git a/src/XlibInt.c b/src/XlibInt.c
index f90f8511..4f4229a1 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -1066,7 +1066,17 @@ void _XReadEvents(
if (rep->generic.type == X_Error)
_XError (dpy, (xError *) rep);
else /* must be an event packet */
- _XEnq (dpy, (xEvent *)rep);
+ {
+ if (rep->generic.type == GenericEvent)
+ {
+ int evlen;
+ evlen = (rep->generic.length << 2);
+ if (_XRead(dpy, &read_buf[len], evlen) == -2)
+ goto got_event; /* XXX: aargh! */
+ }
+
+ _XEnq (dpy, (xEvent *)rep);
+ }
INCITERPTR(rep,xReply);
len -= SIZEOF(xReply);
}
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 5f071849..997930fb 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -123,6 +123,19 @@ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generi
dpy->last_request_read = event->full_sequence;
if(event->response_type != X_Error)
{
+ /* GenericEvents may be > 32 bytes. In this
+ * case, the event struct is trailed by the
+ * additional bytes. the xcb_generic_event_t
+ * struct uses 4 bytes for internal numbering,
+ * so we need to shift the trailing data to be
+ * after the first 32 bytes. */
+ if (event->response_type == GenericEvent &&
+ ((xcb_ge_event_t*)event)->length)
+ {
+ memmove(&event->full_sequence,
+ &event[1],
+ ((xcb_ge_event_t*)event)->length * 4);
+ }
_XEnq(dpy, (xEvent *) event);
wait_for_first_event = 0;
}