aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-02-22 23:01:48 +0100
committerGitHub <noreply@github.com>2018-02-22 23:01:48 +0100
commit41c272b77ac3abac22a6622aa717f42402c54460 (patch)
tree10c637831d78858294fb08fba28b4ddca05f3e8a
parent2e7d8862549a786c5aafcbe20db290377e3228ac (diff)
parenta7158267511719a7044ac773d455629a1c6458aa (diff)
Merge pull request #661 from Ongy/wlr_idle_events
move activity_notify into events in wlr_idle
-rw-r--r--include/wlr/types/wlr_idle.h4
-rw-r--r--types/wlr_idle.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_idle.h b/include/wlr/types/wlr_idle.h
index 689c33a4..1744f07c 100644
--- a/include/wlr/types/wlr_idle.h
+++ b/include/wlr/types/wlr_idle.h
@@ -19,7 +19,9 @@ struct wlr_idle {
struct wl_event_loop *event_loop;
struct wl_listener display_destroy;
- struct wl_signal activity_notify;
+ struct {
+ struct wl_signal activity_notify;
+ } events;
void *data;
};
diff --git a/types/wlr_idle.c b/types/wlr_idle.c
index 51963aea..a3981479 100644
--- a/types/wlr_idle.c
+++ b/types/wlr_idle.c
@@ -122,7 +122,7 @@ static void create_idle_timer(struct wl_client *client,
wl_signal_add(&timer->seat->events.destroy, &timer->seat_destroy);
timer->input_listener.notify = handle_input_notification;
- wl_signal_add(&idle->activity_notify, &timer->input_listener);
+ wl_signal_add(&idle->events.activity_notify, &timer->input_listener);
// create the timer
timer->idle_source =
wl_event_loop_add_timer(idle->event_loop, idle_notify, timer);
@@ -181,7 +181,7 @@ struct wlr_idle *wlr_idle_create(struct wl_display *display) {
return NULL;
}
wl_list_init(&idle->idle_timers);
- wl_signal_init(&idle->activity_notify);
+ wl_signal_init(&idle->events.activity_notify);
idle->event_loop = wl_display_get_event_loop(display);
if (idle->event_loop == NULL) {
@@ -204,5 +204,5 @@ struct wlr_idle *wlr_idle_create(struct wl_display *display) {
}
void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat) {
- wlr_signal_emit_safe(&idle->activity_notify, seat);
+ wlr_signal_emit_safe(&idle->events.activity_notify, seat);
}