mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 12:08:19 +02:00
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libX11
This commit is contained in:
commit
e54cffb649
6 changed files with 44 additions and 11 deletions
|
|
@ -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])
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -77,10 +77,7 @@ _XimTransConnect(
|
|||
spec->trans_conn = NULL;
|
||||
|
||||
if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
|
||||
{
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
13
src/xcb_io.c
13
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue