diff options
author | emersion <contact@emersion.fr> | 2018-03-30 13:18:50 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-30 17:16:35 -0400 |
commit | a776ecbb860608e0f75430a53ea75a6ed19ac746 (patch) | |
tree | f664978ac74c3fc13993ed709cc1015c025d3344 /sway/desktop/xdg_shell_v6.c | |
parent | Merge pull request #1667 from emersion/wlroots-xwayland-map (diff) | |
download | sway-a776ecbb860608e0f75430a53ea75a6ed19ac746.tar.gz sway-a776ecbb860608e0f75430a53ea75a6ed19ac746.tar.zst sway-a776ecbb860608e0f75430a53ea75a6ed19ac746.zip |
Add lite damage tracking
This skips the renderer if nothing has changed, and renders
everything otherwise.
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 01f38d16..68abc120 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -76,6 +76,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
76 | // TODO: Let floating views do whatever | 76 | // TODO: Let floating views do whatever |
77 | view->width = sway_surface->pending_width; | 77 | view->width = sway_surface->pending_width; |
78 | view->height = sway_surface->pending_height; | 78 | view->height = sway_surface->pending_height; |
79 | view_damage_from(view); | ||
79 | } | 80 | } |
80 | 81 | ||
81 | static void handle_destroy(struct wl_listener *listener, void *data) { | 82 | static void handle_destroy(struct wl_listener *listener, void *data) { |
@@ -123,12 +124,12 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
123 | sway_view->sway_xdg_surface_v6 = sway_surface; | 124 | sway_view->sway_xdg_surface_v6 = sway_surface; |
124 | sway_view->surface = xdg_surface->surface; | 125 | sway_view->surface = xdg_surface->surface; |
125 | sway_surface->view = sway_view; | 126 | sway_surface->view = sway_view; |
126 | 127 | ||
127 | // TODO: | 128 | // TODO: |
128 | // - Look up pid and open on appropriate workspace | 129 | // - Look up pid and open on appropriate workspace |
129 | // - Set new view to maximized so it behaves nicely | 130 | // - Set new view to maximized so it behaves nicely |
130 | // - Criteria | 131 | // - Criteria |
131 | 132 | ||
132 | sway_surface->commit.notify = handle_commit; | 133 | sway_surface->commit.notify = handle_commit; |
133 | wl_signal_add(&xdg_surface->surface->events.commit, &sway_surface->commit); | 134 | wl_signal_add(&xdg_surface->surface->events.commit, &sway_surface->commit); |
134 | 135 | ||