aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2020-05-31 01:37:43 +0200
committerFurkan Sahin <furkan-dev@proton.me>2020-05-31 01:37:43 +0200
commit9d84eb90442f2a946c3de1da76143206a4caa443 (patch)
treec2f53f827372904f8d7b1356231350652bed8a8d /include
parent6ba4b4f6c06e24acd42b6e2f8a5a2535e1fd210f (diff)
view: Save all buffers associated with view
During the execution of a resize transaction, the buffer associated with a view's surface is saved and reused until the client acknowledges the resulting configure event. However, only one the main buffer of the main surface was stored and rendered, meaning that subsurfaces disappear during resize. Iterate over all, store and render buffers from all surfaces in the view to ensure that correct rendering is preserved.
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/view.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index ab2dc8e4..53c5d34e 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -55,6 +55,13 @@ struct sway_view_impl {
void (*destroy)(struct sway_view *view);
};
+struct sway_saved_buffer {
+ struct wlr_client_buffer *buffer;
+ int x, y;
+ int width, height;
+ struct wl_list link; // sway_view::saved_buffers
+};
+
struct sway_view {
enum sway_view_type type;
const struct sway_view_impl *impl;
@@ -65,9 +72,6 @@ struct sway_view {
pid_t pid;
- double saved_x, saved_y;
- int saved_width, saved_height;
-
// The size the view would want to be if it weren't tiled.
// Used when changing a view from tiled to floating.
int natural_width, natural_height;
@@ -80,8 +84,7 @@ struct sway_view {
bool allow_request_urgent;
struct wl_event_source *urgent_timer;
- struct wlr_client_buffer *saved_buffer;
- int saved_buffer_width, saved_buffer_height;
+ struct wl_list saved_buffers; // sway_saved_buffer::link
// The geometry for whatever the client is committing, regardless of
// transaction state. Updated on every commit.