mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
Flesh out keyboard support in examples
This commit is contained in:
parent
e257afeb7e
commit
6bf7e095cf
2 changed files with 140 additions and 27 deletions
|
|
@ -162,12 +162,6 @@ void input_remove(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&kbstate->key.link);
|
||||
}
|
||||
|
||||
static int timer_done(void *data) {
|
||||
struct state *state = data;
|
||||
state->exit = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main() {
|
||||
struct state state = {
|
||||
.color = { 1.0, 0.0, 0.0 },
|
||||
|
|
@ -225,10 +219,6 @@ int main() {
|
|||
if (!wlr || !wlr_backend_init(wlr)) {
|
||||
return 1;
|
||||
}
|
||||
struct wl_event_source *timer = wl_event_loop_add_timer(event_loop,
|
||||
timer_done, &state);
|
||||
|
||||
wl_event_source_timer_update(timer, 30000);
|
||||
|
||||
while (!state.exit) {
|
||||
wl_event_loop_dispatch(event_loop, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue