input: Add a seat name parameter to weston_seat_init
This commit is contained in:
committed by
Kristian Høgsberg
parent
722a2d523c
commit
9af5f9e0fe
@@ -172,7 +172,7 @@ headless_compositor_create(struct wl_display *display,
|
|||||||
if (weston_compositor_init(&c->base, display, argc, argv, config) < 0)
|
if (weston_compositor_init(&c->base, display, argc, argv, config) < 0)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
|
||||||
weston_seat_init(&c->fake_seat, &c->base);
|
weston_seat_init(&c->fake_seat, &c->base, "default");
|
||||||
|
|
||||||
c->base.destroy = headless_destroy;
|
c->base.destroy = headless_destroy;
|
||||||
c->base.restore = headless_restore;
|
c->base.restore = headless_restore;
|
||||||
|
|||||||
@@ -915,6 +915,7 @@ rdp_peer_init(freerdp_peer *client, struct rdp_compositor *c)
|
|||||||
rdpSettings *settings;
|
rdpSettings *settings;
|
||||||
rdpInput *input;
|
rdpInput *input;
|
||||||
RdpPeerContext *peerCtx;
|
RdpPeerContext *peerCtx;
|
||||||
|
char seat_name[32];
|
||||||
|
|
||||||
client->context_size = sizeof(RdpPeerContext);
|
client->context_size = sizeof(RdpPeerContext);
|
||||||
client->ContextNew = (psPeerContextNew)rdp_peer_context_new;
|
client->ContextNew = (psPeerContextNew)rdp_peer_context_new;
|
||||||
@@ -947,7 +948,11 @@ rdp_peer_init(freerdp_peer *client, struct rdp_compositor *c)
|
|||||||
input->ExtendedMouseEvent = xf_extendedMouseEvent;
|
input->ExtendedMouseEvent = xf_extendedMouseEvent;
|
||||||
input->KeyboardEvent = xf_input_keyboard_event;
|
input->KeyboardEvent = xf_input_keyboard_event;
|
||||||
input->UnicodeKeyboardEvent = xf_input_unicode_keyboard_event;
|
input->UnicodeKeyboardEvent = xf_input_unicode_keyboard_event;
|
||||||
weston_seat_init(&peerCtx->item.seat, &c->base);
|
|
||||||
|
if (snprintf(seat_name, 32, "rdp:%d:%s", client->sockfd, client->hostname) >= 32)
|
||||||
|
seat_name[31] = '\0';
|
||||||
|
|
||||||
|
weston_seat_init(&peerCtx->item.seat, &c->base, seat_name);
|
||||||
|
|
||||||
client->Initialize(client);
|
client->Initialize(client);
|
||||||
|
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ evdev_input_create(struct weston_compositor *c, struct udev *udev,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
memset(seat, 0, sizeof *seat);
|
memset(seat, 0, sizeof *seat);
|
||||||
weston_seat_init(&seat->base, c);
|
weston_seat_init(&seat->base, c, "default");
|
||||||
seat->base.led_update = rpi_led_update;
|
seat->base.led_update = rpi_led_update;
|
||||||
|
|
||||||
wl_list_init(&seat->devices_list);
|
wl_list_init(&seat->devices_list);
|
||||||
|
|||||||
@@ -638,7 +638,7 @@ display_add_seat(struct wayland_compositor *c, uint32_t id)
|
|||||||
|
|
||||||
memset(input, 0, sizeof *input);
|
memset(input, 0, sizeof *input);
|
||||||
|
|
||||||
weston_seat_init(&input->base, &c->base);
|
weston_seat_init(&input->base, &c->base, "default");
|
||||||
input->compositor = c;
|
input->compositor = c;
|
||||||
input->seat = wl_registry_bind(c->parent.registry, id,
|
input->seat = wl_registry_bind(c->parent.registry, id,
|
||||||
&wl_seat_interface, 1);
|
&wl_seat_interface, 1);
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ x11_input_create(struct x11_compositor *c, int no_input)
|
|||||||
{
|
{
|
||||||
struct xkb_keymap *keymap;
|
struct xkb_keymap *keymap;
|
||||||
|
|
||||||
weston_seat_init(&c->core_seat, &c->base);
|
weston_seat_init(&c->core_seat, &c->base, "default");
|
||||||
|
|
||||||
if (no_input)
|
if (no_input)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+3
-1
@@ -447,6 +447,7 @@ struct weston_seat {
|
|||||||
} xkb_state;
|
} xkb_state;
|
||||||
|
|
||||||
struct input_method *input_method;
|
struct input_method *input_method;
|
||||||
|
char *seat_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -1031,7 +1032,8 @@ void
|
|||||||
weston_output_destroy(struct weston_output *output);
|
weston_output_destroy(struct weston_output *output);
|
||||||
|
|
||||||
void
|
void
|
||||||
weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec);
|
weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
|
||||||
|
const char *seat_name);
|
||||||
void
|
void
|
||||||
weston_seat_init_pointer(struct weston_seat *seat);
|
weston_seat_init_pointer(struct weston_seat *seat);
|
||||||
int
|
int
|
||||||
|
|||||||
+5
-1
@@ -1466,7 +1466,8 @@ weston_seat_init_touch(struct weston_seat *seat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT void
|
WL_EXPORT void
|
||||||
weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec)
|
weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
|
||||||
|
const char *seat_name)
|
||||||
{
|
{
|
||||||
memset(seat, 0, sizeof *seat);
|
memset(seat, 0, sizeof *seat);
|
||||||
|
|
||||||
@@ -1482,6 +1483,7 @@ weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec)
|
|||||||
seat->compositor = ec;
|
seat->compositor = ec;
|
||||||
seat->modifier_state = 0;
|
seat->modifier_state = 0;
|
||||||
seat->num_tp = 0;
|
seat->num_tp = 0;
|
||||||
|
seat->seat_name = strdup(seat_name);
|
||||||
|
|
||||||
wl_list_insert(ec->seat_list.prev, &seat->link);
|
wl_list_insert(ec->seat_list.prev, &seat->link);
|
||||||
|
|
||||||
@@ -1507,5 +1509,7 @@ weston_seat_release(struct weston_seat *seat)
|
|||||||
if (seat->touch)
|
if (seat->touch)
|
||||||
weston_touch_destroy(seat->touch);
|
weston_touch_destroy(seat->touch);
|
||||||
|
|
||||||
|
free (seat->seat_name);
|
||||||
|
|
||||||
wl_signal_emit(&seat->destroy_signal, seat);
|
wl_signal_emit(&seat->destroy_signal, seat);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -271,7 +271,7 @@ udev_seat_create(struct weston_compositor *c, struct udev *udev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memset(seat, 0, sizeof *seat);
|
memset(seat, 0, sizeof *seat);
|
||||||
weston_seat_init(&seat->base, c);
|
weston_seat_init(&seat->base, c, "default");
|
||||||
seat->base.led_update = drm_led_update;
|
seat->base.led_update = drm_led_update;
|
||||||
|
|
||||||
wl_list_init(&seat->devices_list);
|
wl_list_init(&seat->devices_list);
|
||||||
|
|||||||
Reference in New Issue
Block a user