aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2024-09-03 15:39:39 +0200
committerAlexander Orzechowski <alex@ozal.ski>2024-09-04 13:49:35 -0400
commitaf28ac04a4d523aecd74dacc94a91f7d9e537982 (patch)
treefbf071459ccfde639d88015804fd5816cc23c562
parent6045ad9a0224ea2aab2d488cd356b5557007f5d1 (diff)
(desktop|tree)/output: Do not use layout listener to arrange
Output layout changes originate from the centralized modeset infrastructure and request_state which already takes care of arranging and updating outputs as needed.
-rw-r--r--include/sway/output.h2
-rw-r--r--include/sway/server.h1
-rw-r--r--include/sway/tree/root.h2
-rw-r--r--sway/desktop/output.c7
-rw-r--r--sway/server.c3
-rw-r--r--sway/tree/root.c10
6 files changed, 0 insertions, 25 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index 990fa506..4584ea45 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -134,8 +134,6 @@ enum sway_container_layout output_get_default_layout(
enum wlr_direction opposite_direction(enum wlr_direction d);
-void handle_output_layout_change(struct wl_listener *listener, void *data);
-
void handle_output_manager_apply(struct wl_listener *listener, void *data);
void handle_output_manager_test(struct wl_listener *listener, void *data);
diff --git a/include/sway/server.h b/include/sway/server.h
index 460f9e17..ccf4a9cc 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -45,7 +45,6 @@ struct sway_server {
struct sway_input_manager *input;
struct wl_listener new_output;
- struct wl_listener output_layout_change;
struct wl_listener renderer_lost;
struct wlr_idle_notifier_v1 *idle_notifier_v1;
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
index 7de0abcd..10d9ea98 100644
--- a/include/sway/tree/root.h
+++ b/include/sway/tree/root.h
@@ -16,8 +16,6 @@ struct sway_root {
struct sway_node node;
struct wlr_output_layout *output_layout;
- struct wl_listener output_layout_change;
-
// scene node layout:
// - root
// - staging
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index f6a26b0e..9f4290cd 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -543,13 +543,6 @@ void handle_new_output(struct wl_listener *listener, void *data) {
request_modeset(server);
}
-void handle_output_layout_change(struct wl_listener *listener,
- void *data) {
- struct sway_server *server =
- wl_container_of(listener, server, output_layout_change);
- update_output_manager_config(server);
-}
-
static struct output_config *output_config_for_config_head(
struct wlr_output_configuration_head_v1 *config_head,
struct sway_output *output) {
diff --git a/sway/server.c b/sway/server.c
index 1ca56086..30896baf 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -277,9 +277,6 @@ bool server_init(struct sway_server *server) {
server->new_output.notify = handle_new_output;
wl_signal_add(&server->backend->events.new_output, &server->new_output);
- server->output_layout_change.notify = handle_output_layout_change;
- wl_signal_add(&root->output_layout->events.change,
- &server->output_layout_change);
server->xdg_output_manager_v1 =
wlr_xdg_output_manager_v1_create(server->wl_display, root->output_layout);
diff --git a/sway/tree/root.c b/sway/tree/root.c
index 20fcfa59..19d072b5 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -19,12 +19,6 @@
struct sway_root *root;
-static void output_layout_handle_change(struct wl_listener *listener,
- void *data) {
- arrange_root();
- transaction_commit_dirty();
-}
-
struct sway_root *root_create(struct wl_display *wl_display) {
struct sway_root *root = calloc(1, sizeof(struct sway_root));
if (!root) {
@@ -81,14 +75,10 @@ struct sway_root *root_create(struct wl_display *wl_display) {
root->non_desktop_outputs = create_list();
root->scratchpad = create_list();
- root->output_layout_change.notify = output_layout_handle_change;
- wl_signal_add(&root->output_layout->events.change,
- &root->output_layout_change);
return root;
}
void root_destroy(struct sway_root *root) {
- wl_list_remove(&root->output_layout_change.link);
list_free(root->scratchpad);
list_free(root->non_desktop_outputs);
list_free(root->outputs);