Removed unneeded condition check in render_floating func

This commit is contained in:
Erik Reider 2024-01-26 19:33:11 +01:00
parent 5bb8877abe
commit 84c1b9c7f3

View file

@ -1932,17 +1932,9 @@ static void render_floating(struct sway_output *soutput,
for (int j = 0; j < output->current.workspaces->length; ++j) { for (int j = 0; j < output->current.workspaces->length; ++j) {
struct sway_workspace *ws = output->current.workspaces->items[j]; struct sway_workspace *ws = output->current.workspaces->items[j];
float scroll_percent = soutput->workspace_scroll.percent;
// Only render visible workspace when not scrolling
bool ws_is_visible = workspace_is_visible(ws);
if (!ws_is_visible && scroll_percent == 0) {
continue;
}
// Only render affected workspaces // Only render affected workspaces
if ((ws != other_ws && ws != visible_ws) || if ((ws != other_ws && ws != visible_ws) ||
(ws_is_visible && has_fullscreen)) { (workspace_is_visible(ws) && has_fullscreen)) {
continue; continue;
} }