Skip to content

Commit

Permalink
Revert "Use pointers for libev objects"
Browse files Browse the repository at this point in the history
This reverts commit fa43feb.
  • Loading branch information
Airblader committed May 16, 2016
1 parent fa43feb commit ee5503d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include "all.h"

static struct ev_loop *loop;
static ev_timer *idle_watcher;
static ev_io *x_watcher;
static ev_check *x_check;
static ev_timer idle_watcher;
static ev_io x_watcher;
static ev_check x_check;

static coordinates_t last_cursor_pos;

Expand All @@ -26,16 +26,16 @@ void event_init(void) {
}

static void event_init_x_loop(void) {
ev_io_init(x_watcher, x_cb, XConnectionNumber(display), EV_READ);
ev_io_start(loop, x_watcher);
ev_io_init(&x_watcher, x_cb, XConnectionNumber(display), EV_READ);
ev_io_start(loop, &x_watcher);

ev_check_init(x_check, x_check_cb);
ev_check_start(loop, x_check);
ev_check_init(&x_check, x_check_cb);
ev_check_start(loop, &x_check);
}

static void event_init_timer(void) {
ev_timer_init(idle_watcher, idle_cb, 0, config.timeout);
ev_timer_start(loop, idle_watcher);
ev_timer_init(&idle_watcher, idle_cb, 0, config.timeout);
ev_timer_start(loop, &idle_watcher);
}

static void x_cb(EV_P_ ev_io *w, int revents) {
Expand Down Expand Up @@ -75,7 +75,7 @@ static void x_check_cb(EV_P_ ev_check *w, int revents) {

/* We don't bother checking the exact event since we only select events that interest us. */
cursor_show();
ev_timer_again(loop, idle_watcher);
ev_timer_again(loop, &idle_watcher);
}
}

Expand Down

0 comments on commit ee5503d

Please sign in to comment.