summaryrefslogtreecommitdiff
path: root/clients/terminal.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-06-08 20:34:11 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-06-08 20:34:11 -0400
commit478d9265f9a01b2dd1ed92d640081d3dd82f1c87 (patch)
tree641dcd49aacf3148cedfe542235ed7fc6c53ed88 /clients/terminal.c
parent945ea0e743a80cc9d47e71bff6f733500e857f36 (diff)
Send device name at connect time
Diffstat (limited to 'clients/terminal.c')
-rw-r--r--clients/terminal.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/clients/terminal.c b/clients/terminal.c
index 48e137b..a16fdcb 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -50,7 +50,6 @@ static int option_fullscreen;
struct terminal {
struct window *window;
struct display *display;
- struct wl_compositor *compositor;
int redraw_scheduled, redraw_pending;
char *data;
int width, height, start, row, column;
@@ -418,9 +417,8 @@ resize_handler(struct window *window, void *data)
}
static void
-handle_acknowledge(void *data,
- struct wl_compositor *compositor,
- uint32_t key, uint32_t frame)
+acknowledge_handler(struct window *window,
+ uint32_t key, uint32_t frame, void *data)
{
struct terminal *terminal = data;
@@ -432,18 +430,6 @@ handle_acknowledge(void *data,
}
static void
-handle_frame(void *data,
- struct wl_compositor *compositor,
- uint32_t frame, uint32_t timestamp)
-{
-}
-
-static const struct wl_compositor_listener compositor_listener = {
- handle_acknowledge,
- handle_frame,
-};
-
-static void
key_handler(struct window *window, uint32_t key, uint32_t unicode,
uint32_t state, uint32_t modifiers, void *data)
{
@@ -493,12 +479,9 @@ terminal_create(struct display *display, int fullscreen)
terminal->redraw_scheduled = 1;
terminal->margin = 5;
- terminal->compositor = display_get_compositor(display);
window_set_fullscreen(terminal->window, terminal->fullscreen);
window_set_resize_handler(terminal->window, resize_handler, terminal);
-
- wl_compositor_add_listener(terminal->compositor,
- &compositor_listener, terminal);
+ window_set_acknowledge_handler(terminal->window, acknowledge_handler, terminal);
window_set_key_handler(terminal->window, key_handler, terminal);
window_set_keyboard_focus_handler(terminal->window,