This commit is contained in:
dmitry 2021-11-20 21:36:57 +03:00
parent c375120d7c
commit a8f6d41630
5 changed files with 13 additions and 13 deletions

View file

@ -4,7 +4,7 @@
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_workspace_v1.h>
#include <wlr/types/wlr_ext_workspace_v1.h>
#include "config.h"
#include "sway/tree/node.h"
#include "sway/tree/view.h"
@ -58,7 +58,7 @@ struct sway_output {
int max_render_time; // In milliseconds
struct wl_event_source *repaint_timer;
struct wlr_workspace_group_handle_v1 *workspace_group;
struct wlr_ext_workspace_group_handle_v1 *workspace_group;
};
struct sway_output *output_create(struct wlr_output *wlr_output);

View file

@ -9,7 +9,7 @@
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_method_v2.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_workspace_v1.h>
#include <wlr/types/wlr_ext_workspace_v1.h>
#include <wlr/types/wlr_drm_lease_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_output_management_v1.h>
@ -91,7 +91,7 @@ struct sway_server {
struct wlr_input_method_manager_v2 *input_method;
struct wlr_text_input_manager_v3 *text_input;
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
struct wlr_workspace_manager_v1 *workspace_manager;
struct wlr_ext_workspace_manager_v1 *workspace_manager;
struct wl_listener workspace_manager_commit_request;
struct wlr_xdg_activation_v1 *xdg_activation_v1;

View file

@ -855,8 +855,8 @@ void handle_new_output(struct wl_listener *listener, void *data) {
return;
}
output->server = server;
output->workspace_group = wlr_workspace_group_handle_v1_create(output->server->workspace_manager);
wlr_workspace_group_handle_v1_output_enter(output->workspace_group, wlr_output);
output->workspace_group = wlr_ext_workspace_group_handle_v1_create(output->server->workspace_manager);
wlr_ext_workspace_group_handle_v1_output_enter(output->workspace_group, wlr_output);
output->damage = wlr_output_damage_create(wlr_output);
wl_signal_add(&wlr_output->events.destroy, &output->destroy);

View file

@ -60,13 +60,13 @@ bool server_privileged_prepare(struct sway_server *server) {
static void handle_workspace_manager_commit_request(struct wl_listener *listener, void *data) {
struct sway_server *_server = wl_container_of(listener, _server, workspace_manager_commit_request);
struct wlr_workspace_manager_v1 *manager = data;
struct wlr_workspace_group_handle_v1 *group;
struct wlr_ext_workspace_manager_v1 *manager = data;
struct wlr_ext_workspace_group_handle_v1 *group;
wl_list_for_each(group, &manager->groups, link) {
struct wlr_workspace_handle_v1 *workspace;
struct wlr_workspace_handle_v1 *next_active_workspace = NULL;
struct wlr_ext_workspace_handle_v1 *workspace;
struct wlr_ext_workspace_handle_v1 *next_active_workspace = NULL;
wl_list_for_each(workspace, &group->workspaces, link) {
if (workspace->current & WLR_WORKSPACE_HANDLE_V1_STATE_ACTIVE) {
if (workspace->current & WLR_EXT_WORKSPACE_HANDLE_V1_STATE_ACTIVE) {
next_active_workspace = workspace;
}
}
@ -183,7 +183,7 @@ bool server_init(struct sway_server *server) {
server->foreign_toplevel_manager =
wlr_foreign_toplevel_manager_v1_create(server->wl_display);
server->workspace_manager =
wlr_workspace_manager_v1_create(server->wl_display);
wlr_ext_workspace_manager_v1_create(server->wl_display);
server->workspace_manager_commit_request.notify =
handle_workspace_manager_commit_request;
wl_signal_add(&server->workspace_manager->events.commit,

View file

@ -390,7 +390,7 @@ static void set_workspace_coordinates(list_t *workspaces) {
struct wl_array coordinates;
wl_array_init(&coordinates);
*(int*)wl_array_add(&coordinates, sizeof(int)) = i + 1;
wlr_workspace_handle_v1_set_coordinates(
wlr_ext_workspace_handle_v1_set_coordinates(
((struct sway_workspace*)workspaces->items[i])
->workspace_handle, &coordinates);
wl_array_release(&coordinates);