mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
xwm: send selection data
This commit is contained in:
parent
ea6f77b484
commit
b0683874e9
8 changed files with 298 additions and 31 deletions
|
|
@ -13,6 +13,19 @@
|
|||
struct roots_server server = { 0 };
|
||||
|
||||
static void ready(struct wl_listener *listener, void *data) {
|
||||
struct roots_desktop *desktop =
|
||||
wl_container_of(listener, desktop, xwayland_ready);
|
||||
|
||||
#ifdef HAS_XWAYLAND
|
||||
struct wlr_xwayland *xwayland = data;
|
||||
if (xwayland) {
|
||||
struct roots_seat *seat =
|
||||
input_get_seat(desktop->server->input,
|
||||
ROOTS_CONFIG_DEFAULT_SEAT_NAME);
|
||||
wlr_xwayland_set_seat(xwayland, seat->seat);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (server.config->startup_cmd != NULL) {
|
||||
const char *cmd = server.config->startup_cmd;
|
||||
pid_t pid = fork();
|
||||
|
|
@ -38,12 +51,6 @@ int main(int argc, char **argv) {
|
|||
server.desktop = desktop_create(&server, server.config);
|
||||
server.input = input_create(&server, server.config);
|
||||
|
||||
struct roots_seat *default_seat =
|
||||
roots_seat_create(server.input, ROOTS_CONFIG_DEFAULT_SEAT_NAME);
|
||||
if (server.desktop->xwayland) {
|
||||
server.desktop->xwayland->seat = default_seat->seat;
|
||||
}
|
||||
|
||||
const char *socket = wl_display_add_socket_auto(server.wl_display);
|
||||
if (!socket) {
|
||||
wlr_log_errno(L_ERROR, "Unable to open wayland socket");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue