diff options
author | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2023-04-13 20:45:02 +0200 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | 1b092386455eeb16fed05cea672c4c88d733f8f2 (patch) | |
tree | 7957005c4ff17c8660f12b97421ad71cc994136b /sway/tree/container.c | |
parent | scene_graph: Maintain `wlr_scene_node`s for the sway tree. (diff) | |
download | sway-1b092386455eeb16fed05cea672c4c88d733f8f2.tar.gz sway-1b092386455eeb16fed05cea672c4c88d733f8f2.tar.zst sway-1b092386455eeb16fed05cea672c4c88d733f8f2.zip |
scene_graph: Use built-in linux dmabuf feedback handling
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 9ed08929..307bf963 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1157,33 +1157,6 @@ static void set_fullscreen(struct sway_container *con, bool enable) { | |||
1157 | con->view->foreign_toplevel, enable); | 1157 | con->view->foreign_toplevel, enable); |
1158 | } | 1158 | } |
1159 | } | 1159 | } |
1160 | |||
1161 | if (!server.linux_dmabuf_v1 || !con->view->surface) { | ||
1162 | return; | ||
1163 | } | ||
1164 | if (!enable) { | ||
1165 | wlr_linux_dmabuf_v1_set_surface_feedback(server.linux_dmabuf_v1, | ||
1166 | con->view->surface, NULL); | ||
1167 | return; | ||
1168 | } | ||
1169 | |||
1170 | if (!con->pending.workspace || !con->pending.workspace->output) { | ||
1171 | return; | ||
1172 | } | ||
1173 | |||
1174 | struct sway_output *output = con->pending.workspace->output; | ||
1175 | |||
1176 | const struct wlr_linux_dmabuf_feedback_v1_init_options options = { | ||
1177 | .main_renderer = server.renderer, | ||
1178 | .scanout_primary_output = output->wlr_output, | ||
1179 | }; | ||
1180 | struct wlr_linux_dmabuf_feedback_v1 feedback = {0}; | ||
1181 | if (!wlr_linux_dmabuf_feedback_v1_init_with_options(&feedback, &options)) { | ||
1182 | return; | ||
1183 | } | ||
1184 | wlr_linux_dmabuf_v1_set_surface_feedback(server.linux_dmabuf_v1, | ||
1185 | con->view->surface, &feedback); | ||
1186 | wlr_linux_dmabuf_feedback_v1_finish(&feedback); | ||
1187 | } | 1160 | } |
1188 | 1161 | ||
1189 | static void container_fullscreen_workspace(struct sway_container *con) { | 1162 | static void container_fullscreen_workspace(struct sway_container *con) { |