2017-10-23 01:37:30 +11:00
|
|
|
#define _POSIX_C_SOURCE 200112L
|
2018-03-30 15:47:57 +11:00
|
|
|
#include <assert.h>
|
2017-10-23 01:37:30 +11:00
|
|
|
#include <stdbool.h>
|
2018-03-30 15:47:57 +11:00
|
|
|
#include <stdlib.h>
|
2019-07-28 06:02:56 +10:00
|
|
|
#include <wayland-server-core.h>
|
2017-10-23 01:37:30 +11:00
|
|
|
#include <wlr/backend.h>
|
2020-04-14 23:04:56 +10:00
|
|
|
#include <wlr/backend/headless.h>
|
|
|
|
#include <wlr/backend/multi.h>
|
2019-01-17 21:16:23 +11:00
|
|
|
#include <wlr/backend/noop.h>
|
2017-10-23 01:37:30 +11:00
|
|
|
#include <wlr/backend/session.h>
|
2018-03-20 09:31:18 +11:00
|
|
|
#include <wlr/render/wlr_renderer.h>
|
2017-11-23 13:06:08 +11:00
|
|
|
#include <wlr/types/wlr_compositor.h>
|
2019-01-08 04:39:33 +11:00
|
|
|
#include <wlr/types/wlr_data_control_v1.h>
|
2018-07-02 07:55:25 +10:00
|
|
|
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
2019-01-26 10:45:06 +11:00
|
|
|
#include <wlr/types/wlr_gamma_control_v1.h>
|
2018-11-23 22:07:46 +11:00
|
|
|
#include <wlr/types/wlr_gtk_primary_selection.h>
|
2018-04-29 18:40:58 +10:00
|
|
|
#include <wlr/types/wlr_idle.h>
|
2018-09-15 03:21:44 +10:00
|
|
|
#include <wlr/types/wlr_layer_shell_v1.h>
|
2019-01-26 10:45:06 +11:00
|
|
|
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
2019-02-20 21:16:05 +11:00
|
|
|
#include <wlr/types/wlr_primary_selection_v1.h>
|
|
|
|
#include <wlr/types/wlr_relative_pointer_v1.h>
|
2018-07-02 07:55:25 +10:00
|
|
|
#include <wlr/types/wlr_screencopy_v1.h>
|
2018-04-08 03:21:07 +10:00
|
|
|
#include <wlr/types/wlr_server_decoration.h>
|
2019-09-18 14:46:29 +10:00
|
|
|
#include <wlr/types/wlr_tablet_v2.h>
|
2020-04-28 00:41:54 +10:00
|
|
|
#include <wlr/types/wlr_viewporter.h>
|
2018-03-31 15:13:26 +11:00
|
|
|
#include <wlr/types/wlr_xcursor_manager.h>
|
2018-09-24 20:54:57 +10:00
|
|
|
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
2018-09-15 10:55:05 +10:00
|
|
|
#include <wlr/types/wlr_xdg_output_v1.h>
|
2018-11-23 22:07:46 +11:00
|
|
|
#include "config.h"
|
2018-06-23 16:24:11 +10:00
|
|
|
#include "list.h"
|
2019-01-21 05:51:12 +11:00
|
|
|
#include "log.h"
|
2018-01-31 12:01:49 +11:00
|
|
|
#include "sway/config.h"
|
2018-07-02 10:26:57 +10:00
|
|
|
#include "sway/desktop/idle_inhibit_v1.h"
|
2017-12-09 00:07:47 +11:00
|
|
|
#include "sway/input/input-manager.h"
|
2019-01-17 21:16:23 +11:00
|
|
|
#include "sway/output.h"
|
2018-04-06 04:01:14 +10:00
|
|
|
#include "sway/server.h"
|
2018-08-26 12:05:16 +10:00
|
|
|
#include "sway/tree/root.h"
|
2018-11-18 10:33:06 +11:00
|
|
|
#if HAVE_XWAYLAND
|
2018-06-19 07:49:28 +10:00
|
|
|
#include "sway/xwayland.h"
|
2018-07-25 06:16:06 +10:00
|
|
|
#endif
|
2018-01-31 12:01:49 +11:00
|
|
|
|
2018-06-13 08:39:24 +10:00
|
|
|
bool server_privileged_prepare(struct sway_server *server) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_DEBUG, "Preparing Wayland server initialization");
|
2017-10-23 01:37:30 +11:00
|
|
|
server->wl_display = wl_display_create();
|
|
|
|
server->wl_event_loop = wl_display_get_event_loop(server->wl_display);
|
2018-05-25 22:51:01 +10:00
|
|
|
server->backend = wlr_backend_autocreate(server->wl_display, NULL);
|
2017-10-23 01:37:30 +11:00
|
|
|
|
2018-05-10 02:32:55 +10:00
|
|
|
if (!server->backend) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_ERROR, "Unable to create backend");
|
2018-05-10 02:32:55 +10:00
|
|
|
return false;
|
|
|
|
}
|
2018-06-13 08:39:24 +10:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool server_init(struct sway_server *server) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_DEBUG, "Initializing Wayland server");
|
2018-06-13 08:39:24 +10:00
|
|
|
|
2018-03-30 15:47:57 +11:00
|
|
|
struct wlr_renderer *renderer = wlr_backend_get_renderer(server->backend);
|
|
|
|
assert(renderer);
|
|
|
|
|
2018-05-22 04:11:20 +10:00
|
|
|
wlr_renderer_init_wl_display(renderer, server->wl_display);
|
2017-10-23 01:37:30 +11:00
|
|
|
|
2018-03-30 15:47:57 +11:00
|
|
|
server->compositor = wlr_compositor_create(server->wl_display, renderer);
|
2019-10-10 00:06:30 +11:00
|
|
|
server->compositor_new_surface.notify = handle_compositor_new_surface;
|
|
|
|
wl_signal_add(&server->compositor->events.new_surface,
|
|
|
|
&server->compositor_new_surface);
|
|
|
|
|
2017-10-23 01:37:30 +11:00
|
|
|
server->data_device_manager =
|
|
|
|
wlr_data_device_manager_create(server->wl_display);
|
2018-03-30 09:07:03 +11:00
|
|
|
|
2018-07-23 01:27:54 +10:00
|
|
|
wlr_gamma_control_manager_v1_create(server->wl_display);
|
2018-11-23 22:07:46 +11:00
|
|
|
wlr_gtk_primary_selection_device_manager_create(server->wl_display);
|
2017-10-23 01:37:30 +11:00
|
|
|
|
2018-02-15 06:51:51 +11:00
|
|
|
server->new_output.notify = handle_new_output;
|
|
|
|
wl_signal_add(&server->backend->events.new_output, &server->new_output);
|
2019-07-17 04:58:14 +10:00
|
|
|
server->output_layout_change.notify = handle_output_layout_change;
|
|
|
|
wl_signal_add(&root->output_layout->events.change,
|
|
|
|
&server->output_layout_change);
|
2017-11-12 06:41:18 +11:00
|
|
|
|
2018-09-15 11:03:35 +10:00
|
|
|
wlr_xdg_output_manager_v1_create(server->wl_display, root->output_layout);
|
2018-04-06 04:01:14 +10:00
|
|
|
|
2018-07-02 10:26:57 +10:00
|
|
|
server->idle = wlr_idle_create(server->wl_display);
|
|
|
|
server->idle_inhibit_manager_v1 =
|
|
|
|
sway_idle_inhibit_manager_v1_create(server->wl_display, server->idle);
|
2018-06-27 19:16:49 +10:00
|
|
|
|
2018-09-15 03:21:44 +10:00
|
|
|
server->layer_shell = wlr_layer_shell_v1_create(server->wl_display);
|
2018-03-29 06:47:22 +11:00
|
|
|
wl_signal_add(&server->layer_shell->events.new_surface,
|
|
|
|
&server->layer_shell_surface);
|
|
|
|
server->layer_shell_surface.notify = handle_layer_shell_surface;
|
|
|
|
|
2018-05-14 01:38:56 +10:00
|
|
|
server->xdg_shell = wlr_xdg_shell_create(server->wl_display);
|
|
|
|
wl_signal_add(&server->xdg_shell->events.new_surface,
|
|
|
|
&server->xdg_shell_surface);
|
|
|
|
server->xdg_shell_surface.notify = handle_xdg_shell_surface;
|
2018-04-01 00:21:15 +11:00
|
|
|
|
2019-09-18 14:46:29 +10:00
|
|
|
server->tablet_v2 = wlr_tablet_v2_create(server->wl_display);
|
|
|
|
|
2018-07-14 06:53:56 +10:00
|
|
|
server->server_decoration_manager =
|
2018-04-08 03:21:07 +10:00
|
|
|
wlr_server_decoration_manager_create(server->wl_display);
|
|
|
|
wlr_server_decoration_manager_set_default_mode(
|
2018-07-14 06:53:56 +10:00
|
|
|
server->server_decoration_manager,
|
|
|
|
WLR_SERVER_DECORATION_MANAGER_MODE_SERVER);
|
|
|
|
wl_signal_add(&server->server_decoration_manager->events.new_decoration,
|
|
|
|
&server->server_decoration);
|
|
|
|
server->server_decoration.notify = handle_server_decoration;
|
2018-07-30 03:31:10 +10:00
|
|
|
wl_list_init(&server->decorations);
|
2018-04-08 03:21:07 +10:00
|
|
|
|
2018-09-24 20:54:57 +10:00
|
|
|
server->xdg_decoration_manager =
|
|
|
|
wlr_xdg_decoration_manager_v1_create(server->wl_display);
|
|
|
|
wl_signal_add(
|
|
|
|
&server->xdg_decoration_manager->events.new_toplevel_decoration,
|
|
|
|
&server->xdg_decoration);
|
|
|
|
server->xdg_decoration.notify = handle_xdg_decoration;
|
|
|
|
wl_list_init(&server->xdg_decorations);
|
|
|
|
|
2019-01-30 06:52:59 +11:00
|
|
|
server->relative_pointer_manager =
|
|
|
|
wlr_relative_pointer_manager_v1_create(server->wl_display);
|
|
|
|
|
2019-01-26 10:45:06 +11:00
|
|
|
server->pointer_constraints =
|
|
|
|
wlr_pointer_constraints_v1_create(server->wl_display);
|
|
|
|
server->pointer_constraint.notify = handle_pointer_constraint;
|
|
|
|
wl_signal_add(&server->pointer_constraints->events.new_constraint,
|
|
|
|
&server->pointer_constraint);
|
|
|
|
|
2018-10-24 08:38:57 +11:00
|
|
|
server->presentation =
|
|
|
|
wlr_presentation_create(server->wl_display, server->backend);
|
|
|
|
|
2019-05-21 07:47:05 +10:00
|
|
|
server->output_manager_v1 =
|
|
|
|
wlr_output_manager_v1_create(server->wl_display);
|
|
|
|
server->output_manager_apply.notify = handle_output_manager_apply;
|
|
|
|
wl_signal_add(&server->output_manager_v1->events.apply,
|
|
|
|
&server->output_manager_apply);
|
|
|
|
server->output_manager_test.notify = handle_output_manager_test;
|
|
|
|
wl_signal_add(&server->output_manager_v1->events.test,
|
|
|
|
&server->output_manager_test);
|
|
|
|
|
2020-01-28 04:39:29 +11:00
|
|
|
server->output_power_manager_v1 =
|
|
|
|
wlr_output_power_manager_v1_create(server->wl_display);
|
|
|
|
server->output_power_manager_set_mode.notify =
|
|
|
|
handle_output_power_manager_set_mode;
|
|
|
|
wl_signal_add(&server->output_power_manager_v1->events.set_mode,
|
|
|
|
&server->output_power_manager_set_mode);
|
2019-10-18 21:57:17 +11:00
|
|
|
server->input_method = wlr_input_method_manager_v2_create(server->wl_display);
|
|
|
|
server->text_input = wlr_text_input_manager_v3_create(server->wl_display);
|
2019-08-20 19:30:09 +10:00
|
|
|
server->foreign_toplevel_manager =
|
|
|
|
wlr_foreign_toplevel_manager_v1_create(server->wl_display);
|
2020-01-28 04:39:29 +11:00
|
|
|
|
2018-06-22 22:44:16 +10:00
|
|
|
wlr_export_dmabuf_manager_v1_create(server->wl_display);
|
2018-07-02 07:55:25 +10:00
|
|
|
wlr_screencopy_manager_v1_create(server->wl_display);
|
2019-01-08 04:39:33 +11:00
|
|
|
wlr_data_control_manager_v1_create(server->wl_display);
|
2019-02-20 21:16:05 +11:00
|
|
|
wlr_primary_selection_v1_device_manager_create(server->wl_display);
|
2020-04-28 00:41:54 +10:00
|
|
|
wlr_viewporter_create(server->wl_display);
|
2017-12-04 06:21:26 +11:00
|
|
|
|
2017-11-12 03:58:43 +11:00
|
|
|
server->socket = wl_display_add_socket_auto(server->wl_display);
|
2018-01-01 08:32:28 +11:00
|
|
|
if (!server->socket) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_ERROR, "Unable to open wayland socket");
|
2017-10-23 01:37:30 +11:00
|
|
|
wlr_backend_destroy(server->backend);
|
|
|
|
return false;
|
|
|
|
}
|
2017-12-07 00:28:46 +11:00
|
|
|
|
2020-04-14 23:04:56 +10:00
|
|
|
server->noop_backend = wlr_noop_backend_create(server->wl_display);
|
|
|
|
|
2019-01-17 21:16:23 +11:00
|
|
|
struct wlr_output *wlr_output = wlr_noop_add_output(server->noop_backend);
|
|
|
|
root->noop_output = output_create(wlr_output);
|
|
|
|
|
2020-04-14 23:04:56 +10:00
|
|
|
server->headless_backend =
|
|
|
|
wlr_headless_backend_create_with_renderer(server->wl_display, renderer);
|
|
|
|
wlr_multi_backend_add(server->backend, server->headless_backend);
|
|
|
|
|
2018-08-18 16:58:50 +10:00
|
|
|
// This may have been set already via -Dtxn-timeout
|
|
|
|
if (!server->txn_timeout_ms) {
|
|
|
|
server->txn_timeout_ms = 200;
|
2018-06-25 09:09:43 +10:00
|
|
|
}
|
2018-08-18 16:58:50 +10:00
|
|
|
|
Implement type safe arguments and demote sway_container
This commit changes the meaning of sway_container so that it only refers
to layout containers and view containers. Workspaces, outputs and the
root are no longer known as containers. Instead, root, outputs,
workspaces and containers are all a type of node, and containers come in
two types: layout containers and view containers.
In addition to the above, this implements type safe variables. This
means we use specific types such as sway_output and sway_workspace
instead of generic containers or nodes. However, it's worth noting that
in a few places places (eg. seat focus and transactions) referring to
them in a generic way is unavoidable which is why we still use nodes in
some places.
If you want a TL;DR, look at node.h, as well as the struct definitions
for root, output, workspace and container. Note that sway_output now
contains a workspaces list, and workspaces now contain a tiling and
floating list, and containers now contain a pointer back to the
workspace.
There are now functions for seat_get_focused_workspace and
seat_get_focused_container. The latter will return NULL if a workspace
itself is focused. Most other seat functions like seat_get_focus and
seat_set_focus now accept and return nodes.
In the config->handler_context struct, current_container has been
replaced with three pointers: node, container and workspace. node is the
same as what current_container was, while workspace is the workspace
that the node resides on and container is the actual container, which
may be NULL if a workspace itself is focused.
The global root_container variable has been replaced with one simply
called root, which is a pointer to the sway_root instance.
The way outputs are created, enabled, disabled and destroyed has
changed. Previously we'd wrap the sway_output in a container when it is
enabled, but as we don't have containers any more it needs a different
approach. The output_create and output_destroy functions previously
created/destroyed the container, but now they create/destroy the
sway_output. There is a new function output_disable to disable an output
without destroying it.
Containers have a new view property. If this is populated then the
container is a view container, otherwise it's a layout container. Like
before, this property is immutable for the life of the container.
Containers have both a `sway_container *parent` and
`sway_workspace *workspace`. As we use specific types now, parent cannot
point to a workspace so it'll be NULL for containers which are direct
children of the workspace. The workspace property is set for all
containers, except those which are hidden in the scratchpad as they have
no workspace.
In some cases we need to refer to workspaces in a container-like way.
For example, workspaces have layout and children, but when using
specific types this makes it difficult. Likewise, it's difficult for a
container to get its parent's layout when the parent could be another
container or a workspace. To make it easier, some helper functions have
been created: container_parent_layout and container_get_siblings.
container_remove_child has been renamed to container_detach and
container_replace_child has been renamed to container_replace.
`container_handle_fullscreen_reparent(con, old_parent)` has had the
old_parent removed. We now unfullscreen the workspace when detaching the
container, so this function is simplified and only needs one argument
now.
container_notify_subtree_changed has been renamed to
container_update_representation. This is more descriptive of its
purpose. I also wanted to be able to call it with whatever container was
changed rather than the container's parent, which makes bubbling up to
the workspace easier.
There are now state structs per node thing. ie. sway_output_state,
sway_workspace_state and sway_container_state.
The focus, move and layout commands have been completely refactored to
work with the specific types. I considered making these a separate PR,
but I'd be backporting my changes only to replace them again, and it's
easier just to test everything at once.
2018-08-30 21:00:10 +10:00
|
|
|
server->dirty_nodes = create_list();
|
2018-06-27 19:07:48 +10:00
|
|
|
server->transactions = create_list();
|
|
|
|
|
2018-10-18 22:20:00 +11:00
|
|
|
server->input = input_manager_create(server);
|
|
|
|
input_manager_get_default_seat(); // create seat0
|
|
|
|
|
2017-10-23 01:37:30 +11:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void server_fini(struct sway_server *server) {
|
2018-04-18 08:15:11 +10:00
|
|
|
// TODO: free sway-specific resources
|
2018-11-18 10:33:06 +11:00
|
|
|
#if HAVE_XWAYLAND
|
2018-08-30 18:05:04 +10:00
|
|
|
wlr_xwayland_destroy(server->xwayland.wlr_xwayland);
|
|
|
|
#endif
|
|
|
|
wl_display_destroy_clients(server->wl_display);
|
2018-04-18 08:15:11 +10:00
|
|
|
wl_display_destroy(server->wl_display);
|
Implement type safe arguments and demote sway_container
This commit changes the meaning of sway_container so that it only refers
to layout containers and view containers. Workspaces, outputs and the
root are no longer known as containers. Instead, root, outputs,
workspaces and containers are all a type of node, and containers come in
two types: layout containers and view containers.
In addition to the above, this implements type safe variables. This
means we use specific types such as sway_output and sway_workspace
instead of generic containers or nodes. However, it's worth noting that
in a few places places (eg. seat focus and transactions) referring to
them in a generic way is unavoidable which is why we still use nodes in
some places.
If you want a TL;DR, look at node.h, as well as the struct definitions
for root, output, workspace and container. Note that sway_output now
contains a workspaces list, and workspaces now contain a tiling and
floating list, and containers now contain a pointer back to the
workspace.
There are now functions for seat_get_focused_workspace and
seat_get_focused_container. The latter will return NULL if a workspace
itself is focused. Most other seat functions like seat_get_focus and
seat_set_focus now accept and return nodes.
In the config->handler_context struct, current_container has been
replaced with three pointers: node, container and workspace. node is the
same as what current_container was, while workspace is the workspace
that the node resides on and container is the actual container, which
may be NULL if a workspace itself is focused.
The global root_container variable has been replaced with one simply
called root, which is a pointer to the sway_root instance.
The way outputs are created, enabled, disabled and destroyed has
changed. Previously we'd wrap the sway_output in a container when it is
enabled, but as we don't have containers any more it needs a different
approach. The output_create and output_destroy functions previously
created/destroyed the container, but now they create/destroy the
sway_output. There is a new function output_disable to disable an output
without destroying it.
Containers have a new view property. If this is populated then the
container is a view container, otherwise it's a layout container. Like
before, this property is immutable for the life of the container.
Containers have both a `sway_container *parent` and
`sway_workspace *workspace`. As we use specific types now, parent cannot
point to a workspace so it'll be NULL for containers which are direct
children of the workspace. The workspace property is set for all
containers, except those which are hidden in the scratchpad as they have
no workspace.
In some cases we need to refer to workspaces in a container-like way.
For example, workspaces have layout and children, but when using
specific types this makes it difficult. Likewise, it's difficult for a
container to get its parent's layout when the parent could be another
container or a workspace. To make it easier, some helper functions have
been created: container_parent_layout and container_get_siblings.
container_remove_child has been renamed to container_detach and
container_replace_child has been renamed to container_replace.
`container_handle_fullscreen_reparent(con, old_parent)` has had the
old_parent removed. We now unfullscreen the workspace when detaching the
container, so this function is simplified and only needs one argument
now.
container_notify_subtree_changed has been renamed to
container_update_representation. This is more descriptive of its
purpose. I also wanted to be able to call it with whatever container was
changed rather than the container's parent, which makes bubbling up to
the workspace easier.
There are now state structs per node thing. ie. sway_output_state,
sway_workspace_state and sway_container_state.
The focus, move and layout commands have been completely refactored to
work with the specific types. I considered making these a separate PR,
but I'd be backporting my changes only to replace them again, and it's
easier just to test everything at once.
2018-08-30 21:00:10 +10:00
|
|
|
list_free(server->dirty_nodes);
|
2018-06-27 19:07:48 +10:00
|
|
|
list_free(server->transactions);
|
2017-10-23 01:37:30 +11:00
|
|
|
}
|
2017-11-12 03:58:43 +11:00
|
|
|
|
2018-11-17 22:29:59 +11:00
|
|
|
bool server_start(struct sway_server *server) {
|
|
|
|
#if HAVE_XWAYLAND
|
2019-08-15 17:00:14 +10:00
|
|
|
if (config->xwayland != XWAYLAND_MODE_DISABLED) {
|
|
|
|
sway_log(SWAY_DEBUG, "Initializing Xwayland (lazy=%d)",
|
|
|
|
config->xwayland == XWAYLAND_MODE_LAZY);
|
2018-11-17 22:29:59 +11:00
|
|
|
server->xwayland.wlr_xwayland =
|
2019-08-15 17:00:14 +10:00
|
|
|
wlr_xwayland_create(server->wl_display, server->compositor,
|
|
|
|
config->xwayland == XWAYLAND_MODE_LAZY);
|
2020-05-28 02:48:07 +10:00
|
|
|
if (!server->xwayland.wlr_xwayland) {
|
|
|
|
sway_log(SWAY_ERROR, "Failed to start Xwayland");
|
2020-07-02 21:50:24 +10:00
|
|
|
unsetenv("DISPLAY");
|
2020-05-28 02:48:07 +10:00
|
|
|
} else {
|
|
|
|
wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface,
|
|
|
|
&server->xwayland_surface);
|
|
|
|
server->xwayland_surface.notify = handle_xwayland_surface;
|
|
|
|
wl_signal_add(&server->xwayland.wlr_xwayland->events.ready,
|
|
|
|
&server->xwayland_ready);
|
|
|
|
server->xwayland_ready.notify = handle_xwayland_ready;
|
|
|
|
|
|
|
|
setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true);
|
|
|
|
|
|
|
|
/* xcursor configured by the default seat */
|
|
|
|
}
|
2018-11-17 22:29:59 +11:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_INFO, "Starting backend on wayland display '%s'",
|
2017-11-12 03:58:43 +11:00
|
|
|
server->socket);
|
2018-01-01 08:32:28 +11:00
|
|
|
if (!wlr_backend_start(server->backend)) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_ERROR, "Failed to start backend");
|
2017-11-12 03:58:43 +11:00
|
|
|
wlr_backend_destroy(server->backend);
|
2018-07-19 15:39:58 +10:00
|
|
|
return false;
|
2017-11-12 03:58:43 +11:00
|
|
|
}
|
2018-07-19 15:39:58 +10:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void server_run(struct sway_server *server) {
|
2019-01-21 05:51:12 +11:00
|
|
|
sway_log(SWAY_INFO, "Running compositor on wayland display '%s'",
|
2018-07-19 15:39:58 +10:00
|
|
|
server->socket);
|
2017-11-12 03:58:43 +11:00
|
|
|
wl_display_run(server->wl_display);
|
|
|
|
}
|