aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <orzechowski.alexander@gmail.com>2023-04-06 22:23:53 +0200
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit1e018e72b4d57c8f354b9be9686a7a75797cdcab (patch)
tree46e6c588d30ddfc43793d1980b38b8d53bf9bdd7 /include
parentscene_graph: Port view saved buffers (diff)
downloadsway-1e018e72b4d57c8f354b9be9686a7a75797cdcab.tar.gz
sway-1e018e72b4d57c8f354b9be9686a7a75797cdcab.tar.zst
sway-1e018e72b4d57c8f354b9be9686a7a75797cdcab.zip
Delete old damage tracking code
The new scene graph abstraction handles this for us.
Diffstat (limited to 'include')
-rw-r--r--include/sway/desktop.h13
-rw-r--r--include/sway/output.h29
-rw-r--r--include/sway/tree/container.h7
-rw-r--r--include/sway/tree/view.h18
4 files changed, 0 insertions, 67 deletions
diff --git a/include/sway/desktop.h b/include/sway/desktop.h
deleted file mode 100644
index 7f2f5b3e..00000000
--- a/include/sway/desktop.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#include <wlr/types/wlr_compositor.h>
2
3struct sway_container;
4struct sway_view;
5
6void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly,
7 bool whole);
8
9void desktop_damage_whole_container(struct sway_container *con);
10
11void desktop_damage_box(struct wlr_box *box);
12
13void desktop_damage_view(struct sway_view *view);
diff --git a/include/sway/output.h b/include/sway/output.h
index e2023306..30595f54 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -45,8 +45,6 @@ struct sway_output {
45 45
46 struct wlr_box usable_area; 46 struct wlr_box usable_area;
47 47
48 struct wlr_damage_ring damage_ring;
49
50 int lx, ly; // layout coords 48 int lx, ly; // layout coords
51 int width, height; // transformed buffer size 49 int width, height; // transformed buffer size
52 enum wl_output_subpixel detected_subpixel; 50 enum wl_output_subpixel detected_subpixel;
@@ -99,19 +97,6 @@ typedef void (*sway_surface_iterator_func_t)(struct sway_output *output,
99 struct sway_view *view, struct wlr_surface *surface, struct wlr_box *box, 97 struct sway_view *view, struct wlr_surface *surface, struct wlr_box *box,
100 void *user_data); 98 void *user_data);
101 99
102void output_damage_whole(struct sway_output *output);
103
104void output_damage_surface(struct sway_output *output, double ox, double oy,
105 struct wlr_surface *surface, bool whole);
106
107void output_damage_from_view(struct sway_output *output,
108 struct sway_view *view);
109
110void output_damage_box(struct sway_output *output, struct wlr_box *box);
111
112void output_damage_whole_container(struct sway_output *output,
113 struct sway_container *con);
114
115bool output_match_name_or_id(struct sway_output *output, 100bool output_match_name_or_id(struct sway_output *output,
116 const char *name_or_id); 101 const char *name_or_id);
117 102
@@ -129,18 +114,6 @@ void output_disable(struct sway_output *output);
129 114
130struct sway_workspace *output_get_active_workspace(struct sway_output *output); 115struct sway_workspace *output_get_active_workspace(struct sway_output *output);
131 116
132void output_surface_for_each_surface(struct sway_output *output,
133 struct wlr_surface *surface, double ox, double oy,
134 sway_surface_iterator_func_t iterator, void *user_data);
135
136void output_view_for_each_surface(struct sway_output *output,
137 struct sway_view *view, sway_surface_iterator_func_t iterator,
138 void *user_data);
139
140void output_view_for_each_popup_surface(struct sway_output *output,
141 struct sway_view *view, sway_surface_iterator_func_t iterator,
142 void *user_data);
143
144void output_for_each_workspace(struct sway_output *output, 117void output_for_each_workspace(struct sway_output *output,
145 void (*f)(struct sway_workspace *ws, void *data), void *data); 118 void (*f)(struct sway_workspace *ws, void *data), void *data);
146 119
@@ -158,8 +131,6 @@ void output_get_box(struct sway_output *output, struct wlr_box *box);
158enum sway_container_layout output_get_default_layout( 131enum sway_container_layout output_get_default_layout(
159 struct sway_output *output); 132 struct sway_output *output);
160 133
161void scale_box(struct wlr_box *box, float scale);
162
163enum wlr_direction opposite_direction(enum wlr_direction d); 134enum wlr_direction opposite_direction(enum wlr_direction d);
164 135
165void handle_output_layout_change(struct wl_listener *listener, void *data); 136void handle_output_layout_change(struct wl_listener *listener, void *data);
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 4920e064..4cd4c847 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -125,11 +125,6 @@ struct sway_container {
125 double child_total_width; 125 double child_total_width;
126 double child_total_height; 126 double child_total_height;
127 127
128 // In most cases this is the same as the content x and y, but if the view
129 // refuses to resize to the content dimensions then it can be smaller.
130 // These are in layout coordinates.
131 double surface_x, surface_y;
132
133 // Outputs currently being intersected 128 // Outputs currently being intersected
134 list_t *outputs; // struct sway_output 129 list_t *outputs; // struct sway_output
135 130
@@ -181,8 +176,6 @@ bool container_has_ancestor(struct sway_container *container,
181 176
182void container_update_textures_recursive(struct sway_container *con); 177void container_update_textures_recursive(struct sway_container *con);
183 178
184void container_damage_whole(struct sway_container *container);
185
186void container_reap_empty(struct sway_container *con); 179void container_reap_empty(struct sway_container *con);
187 180
188struct sway_container *container_flatten(struct sway_container *container); 181struct sway_container *container_flatten(struct sway_container *container);
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 66d6db1c..80097dd3 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -46,10 +46,6 @@ struct sway_view_impl {
46 void (*set_fullscreen)(struct sway_view *view, bool fullscreen); 46 void (*set_fullscreen)(struct sway_view *view, bool fullscreen);
47 void (*set_resizing)(struct sway_view *view, bool resizing); 47 void (*set_resizing)(struct sway_view *view, bool resizing);
48 bool (*wants_floating)(struct sway_view *view); 48 bool (*wants_floating)(struct sway_view *view);
49 void (*for_each_surface)(struct sway_view *view,
50 wlr_surface_iterator_func_t iterator, void *user_data);
51 void (*for_each_popup_surface)(struct sway_view *view,
52 wlr_surface_iterator_func_t iterator, void *user_data);
53 bool (*is_transient_for)(struct sway_view *child, 49 bool (*is_transient_for)(struct sway_view *child,
54 struct sway_view *ancestor); 50 struct sway_view *ancestor);
55 void (*close)(struct sway_view *view); 51 void (*close)(struct sway_view *view);
@@ -254,20 +250,6 @@ void view_close(struct sway_view *view);
254 250
255void view_close_popups(struct sway_view *view); 251void view_close_popups(struct sway_view *view);
256 252
257void view_damage_from(struct sway_view *view);
258
259/**
260 * Iterate all surfaces of a view (toplevels + popups).
261 */
262void view_for_each_surface(struct sway_view *view,
263 wlr_surface_iterator_func_t iterator, void *user_data);
264
265/**
266 * Iterate all popup surfaces of a view.
267 */
268void view_for_each_popup_surface(struct sway_view *view,
269 wlr_surface_iterator_func_t iterator, void *user_data);
270
271// view implementation 253// view implementation
272 254
273bool view_init(struct sway_view *view, enum sway_view_type type, 255bool view_init(struct sway_view *view, enum sway_view_type type,