mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-31 07:11:27 -04:00
client: Add wl_display_dispatch_queue_timeout
For dispatching messages on a queue with a timeout. This slightly changes the samantics of wl_display_dispatch. Previously it was possible for it to return even though there wasn't a single dispatched event. The function correctly returned 0 in this case but it is now used to indicate a timeout. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
This commit is contained in:
parent
ff8b885523
commit
ddd348da7e
2 changed files with 127 additions and 34 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#define WAYLAND_CLIENT_CORE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include "wayland-util.h"
|
||||
#include "wayland-version.h"
|
||||
|
||||
|
|
@ -250,6 +251,11 @@ int
|
|||
wl_display_dispatch_queue(struct wl_display *display,
|
||||
struct wl_event_queue *queue);
|
||||
|
||||
int
|
||||
wl_display_dispatch_queue_timeout(struct wl_display *display,
|
||||
struct wl_event_queue *queue,
|
||||
const struct timespec *timeout);
|
||||
|
||||
int
|
||||
wl_display_dispatch_queue_pending(struct wl_display *display,
|
||||
struct wl_event_queue *queue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue