48 #include <private/qeventdispatcher_unix_p.h> 77 ulong marker = XNextRequest(
X11->display);
80 while (!
d->interrupt) {
83 && !
d->queuedUserInputEvents.isEmpty()) {
85 event =
d->queuedUserInputEvents.takeFirst();
86 }
else if (XEventsQueued(
X11->display, QueuedAlready)) {
88 XNextEvent(
X11->display, &event);
90 if (flags & QEventLoop::ExcludeUserInputEvents) {
100 d->queuedUserInputEvents.append(event);
107 if (event.xclient.format == 32) {
115 d->queuedUserInputEvents.append(event);
132 if (
qApp->x11ProcessEvent(&event) == 1)
135 if (event.xany.serial >= marker) {
136 if (XEventsQueued(
X11->display, QueuedAfterFlush))
141 }
while (!
d->interrupt && XEventsQueued(
X11->display, QueuedAfterFlush));
145 const uint exclude_all =
147 if (nevents > 0 && ((
uint)flags & exclude_all) == exclude_all) {
165 XFlush(
X11->display);
171 d->xfd = XConnectionNumber(
X11->display);
185 nfds =
qMax(nfds - 1,
d->xfd) + 1;
186 FD_SET(
d->xfd, readfds);
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, timeval *timeout)
bool filterEvent(void *message)
Sends message through the event filter that was set by setEventFilter().
#define QT_END_NAMESPACE
This macro expands to.
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
bool processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
#define QT_BEGIN_NAMESPACE
This macro expands to.
void flush()
Flushes the event queue.
QEventDispatcherX11(QObject *parent=0)
QList< XEvent > queuedUserInputEvents
bool hasPendingEvents()
Returns true if there is an event waiting; otherwise returns false.
static void sendPostedEvents()
Q_CORE_EXPORT uint qGlobalPostedEventsCount()
#define Q_DECLARE_PUBLIC(Class)
bool processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.
virtual int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, timeval *timeout)
QEventDispatcherX11Private()