aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/output.h14
-rw-r--r--include/sway/server.h1
-rw-r--r--include/sway/tree/view.h8
3 files changed, 19 insertions, 4 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index 6fb79987..b4980cd8 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -5,6 +5,7 @@
#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
+#include "sway/tree/view.h"
struct sway_server;
struct sway_container;
@@ -13,17 +14,26 @@ struct sway_output {
struct wlr_output *wlr_output;
struct sway_container *swayc;
struct sway_server *server;
- struct timespec last_frame;
struct wl_list layers[4]; // sway_layer_surface::link
struct wlr_box usable_area;
- struct wl_listener frame;
+ struct timespec last_frame;
+ struct wlr_output_damage *damage;
+
struct wl_listener destroy;
struct wl_listener mode;
struct wl_listener transform;
+ struct wl_listener damage_destroy;
+ struct wl_listener damage_frame;
+
pid_t bg_pid;
};
+void output_damage_whole(struct sway_output *output);
+
+void output_damage_whole_view(struct sway_output *output,
+ struct sway_view *view);
+
#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index db81932f..61f21cdb 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -25,7 +25,6 @@ struct sway_server {
struct sway_input_manager *input;
struct wl_listener new_output;
- struct wl_listener output_frame;
struct wlr_layer_shell *layer_shell;
struct wl_listener layer_shell_surface;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 54f6d90e..3965d2b7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -15,6 +15,8 @@ struct sway_xdg_surface_v6 {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener map;
+ struct wl_listener unmap;
struct wl_listener destroy;
int pending_width, pending_height;
@@ -28,8 +30,8 @@ struct sway_xwayland_surface {
struct wl_listener request_resize;
struct wl_listener request_maximize;
struct wl_listener request_configure;
- struct wl_listener unmap;
struct wl_listener map;
+ struct wl_listener unmap;
struct wl_listener destroy;
int pending_width, pending_height;
@@ -113,4 +115,8 @@ void view_close(struct sway_view *view);
void view_update_outputs(struct sway_view *view, const struct wlr_box *before);
+void view_damage_whole(struct sway_view *view);
+
+void view_damage_from(struct sway_view *view);
+
#endif