diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-02-21 20:58:17 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | 5f0801b6f245cc789ea93b9449dd0c573ef36e66 (patch) | |
tree | 657615d28252b0b3bd01ef240ac6ae49dad15f74 /sway/desktop | |
parent | 1e018e72b4d57c8f354b9be9686a7a75797cdcab (diff) |
container: Don't track outputs
The scene graph abstraction does this for us
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/layer_shell.c | 1 | ||||
-rw-r--r-- | sway/desktop/surface.c | 31 | ||||
-rw-r--r-- | sway/desktop/transaction.c | 4 |
3 files changed, 0 insertions, 36 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index a52d27fa..aca99c97 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -14,7 +14,6 @@ #include "sway/layers.h" #include "sway/output.h" #include "sway/server.h" -#include "sway/surface.h" #include "sway/tree/arrange.h" #include "sway/tree/workspace.h" #include <wlr/types/wlr_scene.h> diff --git a/sway/desktop/surface.c b/sway/desktop/surface.c deleted file mode 100644 index af17a8bb..00000000 --- a/sway/desktop/surface.c +++ /dev/null @@ -1,31 +0,0 @@ -#define _POSIX_C_SOURCE 200112L -#include <stdlib.h> -#include <wlr/types/wlr_compositor.h> -#include <wlr/types/wlr_fractional_scale_v1.h> -#include "sway/server.h" -#include "sway/surface.h" -#include "sway/output.h" - -static void surface_update_outputs(struct wlr_surface *surface) { - float scale = 1; - struct wlr_surface_output *surface_output; - wl_list_for_each(surface_output, &surface->current_outputs, link) { - if (surface_output->output->scale > scale) { - scale = surface_output->output->scale; - } - } - wlr_fractional_scale_v1_notify_scale(surface, scale); - wlr_surface_set_preferred_buffer_scale(surface, ceil(scale)); -} - -void surface_enter_output(struct wlr_surface *surface, - struct sway_output *output) { - wlr_surface_send_enter(surface, output->wlr_output); - surface_update_outputs(surface); -} - -void surface_leave_output(struct wlr_surface *surface, - struct sway_output *output) { - wlr_surface_send_leave(surface, output->wlr_output); - surface_update_outputs(surface); -} diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 5f104aa3..ba9d0648 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -250,10 +250,6 @@ static void apply_container_state(struct sway_container *container, view_center_surface(view); } } - - if (!container->node.destroying) { - container_discover_outputs(container); - } } /** |