aboutsummaryrefslogtreecommitdiff
path: root/example/pointer.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-22 11:15:59 -0400
committerDrew DeVault <sir@cmpwn.com>2017-06-22 11:15:59 -0400
commitf5423a51b559a0fc0d51f7a11cdaf82789a058c9 (patch)
treebdf287b0571044e94fb59d38daf999f67472c276 /example/pointer.c
parent8ce9237c928a7dc6afb889291237465daf4d6b43 (diff)
Use wl_display_run and refactor example keyboards
Diffstat (limited to 'example/pointer.c')
-rw-r--r--example/pointer.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/example/pointer.c b/example/pointer.c
index c2fb6ee5..9a2f33d7 100644
--- a/example/pointer.c
+++ b/example/pointer.c
@@ -47,15 +47,6 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
wlr_renderer_end(sample->renderer);
}
-static void handle_keyboard_key(struct keyboard_state *kbstate,
- xkb_keysym_t sym, enum wlr_key_state key_state) {
- if (sym == XKB_KEY_Escape) {
- kbstate->compositor->exit = true;
- } else if (key_state == WLR_KEY_PRESSED && sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
- wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
- }
-}
-
static void handle_pointer_motion(struct pointer_state *pstate,
double d_x, double d_y) {
struct sample_state *state = pstate->compositor->data;
@@ -117,7 +108,6 @@ int main(int argc, char *argv[]) {
compositor.data = &state;
compositor.output_add_cb = handle_output_add;
compositor.output_frame_cb = handle_output_frame;
- compositor.keyboard_key_cb = handle_keyboard_key;
compositor.pointer_motion_cb = handle_pointer_motion;
compositor.pointer_button_cb = handle_pointer_button;
compositor.pointer_axis_cb = handle_pointer_axis;