Only use workspace manager when not using IPC

Since we always init Wayland, we would previously have both
zext_workspace_manager_v1 and Hyprland IPC which is terrible
This commit is contained in:
scorpion-26 2023-08-08 17:52:35 +02:00
parent ef925ef174
commit ed71da316e

View file

@ -146,7 +146,7 @@ namespace Wayland
wl_output* output = (wl_output*)wl_registry_bind(registry, name, &wl_output_interface, 4); wl_output* output = (wl_output*)wl_registry_bind(registry, name, &wl_output_interface, 4);
wl_output_add_listener(output, &outputListener, nullptr); wl_output_add_listener(output, &outputListener, nullptr);
} }
if (strcmp(interface, "zext_workspace_manager_v1") == 0) if (strcmp(interface, "zext_workspace_manager_v1") == 0 && !Config::Get().useHyprlandIPC)
{ {
workspaceManager = (zext_workspace_manager_v1*)wl_registry_bind(registry, name, &zext_workspace_manager_v1_interface, version); workspaceManager = (zext_workspace_manager_v1*)wl_registry_bind(registry, name, &zext_workspace_manager_v1_interface, version);
zext_workspace_manager_v1_add_listener(workspaceManager, &workspaceManagerListener, nullptr); zext_workspace_manager_v1_add_listener(workspaceManager, &workspaceManagerListener, nullptr);
@ -180,7 +180,7 @@ namespace Wayland
WaitFor(registeredMonitors); WaitFor(registeredMonitors);
registeredMonitors = false; registeredMonitors = false;
if (!workspaceManager) if (!workspaceManager && !Config::Get().useHyprlandIPC)
{ {
LOG("Compositor doesn't implement zext_workspace_manager_v1, disabling workspaces!"); LOG("Compositor doesn't implement zext_workspace_manager_v1, disabling workspaces!");
RuntimeConfig::Get().hasWorkspaces = false; RuntimeConfig::Get().hasWorkspaces = false;