mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-10 13:29:48 -05:00
Send device name at connect time
This commit is contained in:
parent
945ea0e743
commit
478d9265f9
16 changed files with 139 additions and 161 deletions
|
|
@ -45,7 +45,6 @@ static const char socket_name[] = "\0wayland";
|
|||
struct image {
|
||||
struct window *window;
|
||||
struct display *display;
|
||||
struct wl_compositor *compositor;
|
||||
uint32_t key;
|
||||
|
||||
gboolean redraw_scheduled;
|
||||
|
|
@ -226,9 +225,8 @@ keyboard_focus_handler(struct window *window,
|
|||
}
|
||||
|
||||
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 image *image = data;
|
||||
|
||||
|
|
@ -243,18 +241,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 struct image *
|
||||
image_create(struct display *display, uint32_t key, const char *filename)
|
||||
{
|
||||
|
|
@ -281,11 +267,9 @@ image_create(struct display *display, uint32_t key, const char *filename)
|
|||
image->key = key + 100;
|
||||
image->redraw_scheduled = 1;
|
||||
|
||||
image->compositor = display_get_compositor(display);
|
||||
window_set_resize_handler(image->window, resize_handler, image);
|
||||
window_set_keyboard_focus_handler(image->window, keyboard_focus_handler, image);
|
||||
|
||||
wl_compositor_add_listener(image->compositor, &compositor_listener, image);
|
||||
window_set_acknowledge_handler(image->window, acknowledge_handler, image);
|
||||
|
||||
image_draw(image);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue