57 QEventLoop::ProcessEventsFlags
flags;
77 return (XEventsQueued(
X11->display, QueuedAfterFlush)
85 return (XEventsQueued(
X11->display, QueuedAfterFlush)
94 ulong marker = XNextRequest(
X11->display);
101 }
else if (XEventsQueued(
X11->display, QueuedAlready)) {
103 XNextEvent(
X11->display, &event);
107 switch (event.type) {
122 if (event.xclient.format == 32) {
146 if (
qApp->x11ProcessEvent(&event) == 1)
149 if (event.xany.serial >= marker)
151 }
while (XEventsQueued(
X11->display, QueuedAfterFlush));
175 g_source_set_can_recurse(&x11EventSource->source,
true);
177 memset(&x11EventSource->pollfd, 0,
sizeof(GPollFD));
179 x11EventSource->q = 0;
180 x11EventSource->d = 0;
182 g_source_attach(&x11EventSource->source, mainContext);
194 g_source_remove_poll(&
d->x11EventSource->source, &
d->x11EventSource->pollfd);
195 g_source_destroy(&
d->x11EventSource->source);
196 d->x11EventSource = 0;
202 QEventLoop::ProcessEventsFlags saved_flags =
d->x11EventSource->flags;
203 d->x11EventSource->flags = flags;
205 d->x11EventSource->flags = saved_flags;
212 d->x11EventSource->pollfd.fd = XConnectionNumber(
X11->display);
213 d->x11EventSource->pollfd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
214 d->x11EventSource->q =
this;
215 d->x11EventSource->d =
d;
216 g_source_add_poll(&
d->x11EventSource->source, &
d->x11EventSource->pollfd);
221 XFlush(
X11->display);
static void callback(AuServer *, AuEventHandlerRec *, AuEvent *e, AuPointer p)
bool filterEvent(void *message)
Sends message through the event filter that was set by setEventFilter().
#define QT_END_NAMESPACE
This macro expands to.
GX11EventSource * x11EventSource
QGuiEventDispatcherGlibPrivate * d
QGuiEventDispatcherGlib * q
QEventLoop::ProcessEventsFlags flags
The QObject class is the base class of all Qt objects.
static GSourceFuncs x11EventSourceFuncs
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QGuiEventDispatcherGlibPrivate()
T takeFirst()
Removes the first item in the list and returns it.
QList< XEvent > queuedUserInputEvents
bool processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.
~QGuiEventDispatcherGlib()
void runTimersOnceWithNormalPriority()
void flush()
Flushes the event queue.
#define Q_DECLARE_PUBLIC(Class)
static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointer user_data)
QGuiEventDispatcherGlib(QObject *parent=0)
static gboolean x11EventSourcePrepare(GSource *s, gint *timeout)
static gboolean x11EventSourceCheck(GSource *s)
bool processEvents(QEventLoop::ProcessEventsFlags flags)
Processes pending events that match flags until there are no more events to process.