mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-30 16:28:17 +02:00
libweston: add touch device creation signal
Add a signal for touch device creation to allow plugins to detect and respond to touch device changes. Signed-off-by: liang zhou <liang.zhou@gehealthcare.com>
This commit is contained in:
parent
615f6c0322
commit
1269a908d5
3 changed files with 5 additions and 0 deletions
|
|
@ -1460,6 +1460,7 @@ struct weston_compositor {
|
|||
struct wl_signal output_destroyed_signal;
|
||||
struct wl_signal output_moved_signal;
|
||||
struct wl_signal output_resized_signal; /* callback argument: resized output */
|
||||
struct wl_signal touch_device_created_signal; /* callback argument: created touch device */
|
||||
|
||||
/* Signal for output changes triggered by configuration from frontend
|
||||
* or head state changes from backend.
|
||||
|
|
|
|||
|
|
@ -10208,6 +10208,7 @@ weston_compositor_create(struct wl_display *display,
|
|||
wl_signal_init(&ec->output_heads_changed_signal);
|
||||
wl_signal_init(&ec->session_signal);
|
||||
wl_signal_init(&ec->output_capture.ask_auth);
|
||||
wl_signal_init(&ec->touch_device_created_signal);
|
||||
ec->session_active = true;
|
||||
|
||||
ec->output_id_pool = 0;
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ device_added(struct udev_input *input, struct libinput_device *libinput_device)
|
|||
seat->led_update(seat, seat->keyboard_state->xkb_state.leds);
|
||||
}
|
||||
|
||||
if (device->touch_device)
|
||||
wl_signal_emit(&seat->compositor->touch_device_created_signal, device->touch_device);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue