Skip to content

Commit

Permalink
fixes to wlr-workspace plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ammen99 committed Jul 30, 2020
1 parent 5b407f7 commit 0d134fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/single_plugins/wlr-workspaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class wlr_workspaces_intergration : public plugin_interface_t
workspaces[i][j] = wlr_workspace_handle_v1_create(group);

std::string name =
output->to_string() + "workspace-" +
std::to_string(i * ws_dim.height + j);
output->to_string() + ":workspace-" +
std::to_string(i * ws_dim.width + j);
wlr_workspace_handle_v1_set_name(workspaces[i][j], name.c_str());

wl_array coordinates;
Expand Down Expand Up @@ -91,15 +91,16 @@ class wlr_workspaces_intergration : public plugin_interface_t

output->workspace->request_workspace(active_workspace);
});
on_commit.connect(&manager->manager->events.commit);
}

signal_connection_t on_current_workspace_changed = [&] (signal_data_t *data)
{
auto ev = static_cast<wf::workspace_changed_signal*>(data);
wlr_workspace_handle_v1_set_active(
workspaces[ev->old_viewport.x][ev->old_viewport.y], false);
workspaces[ev->old_viewport.y][ev->old_viewport.x], false);
wlr_workspace_handle_v1_set_active(
workspaces[ev->new_viewport.x][ev->new_viewport.y], true);
workspaces[ev->new_viewport.y][ev->new_viewport.x], true);
};

void fini() override
Expand Down

0 comments on commit 0d134fe

Please sign in to comment.