Skip to content

Commit

Permalink
Fixes for Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
2hdddg committed Jan 19, 2024
1 parent 3cba87b commit 9eee9e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// - wayland version 1.20 ->
// - wl_shm -> version 1
// - zwlr_layer_shell version 4
// - wl_seat version 7
// - wl_output version 4
// - wl_seat version 5
// - wl_output version 3
// - wl_compositor version 4
void Registry::Register(struct wl_registry *registry, uint32_t name, const char *interface,
uint32_t version) {
Expand All @@ -41,7 +41,7 @@ void Registry::Register(struct wl_registry *registry, uint32_t name, const char
this->compositor = (wl_compositor *)wl_registry_bind(
registry, name, &wl_compositor_interface, wanted_version);
} else if (interface == std::string_view(wl_output_interface.name)) {
wanted_version = 4;
wanted_version = 3;
build_version = wl_output_interface.version;
auto output =
(wl_output *)wl_registry_bind(registry, name, &wl_output_interface, wanted_version);
Expand All @@ -51,7 +51,7 @@ void Registry::Register(struct wl_registry *registry, uint32_t name, const char
spdlog::warn("Registration of additional seat, ignoring");
return;
}
wanted_version = 7;
wanted_version = 5;
build_version = wl_seat_interface.version;
auto wlseat =
(wl_seat *)wl_registry_bind(registry, name, &wl_seat_interface, wanted_version);
Expand Down
4 changes: 4 additions & 0 deletions src/SwayCompositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ static void ParseTree(const std::string &payload, Manager &manager) {
std::shared_ptr<SwayCompositor> SwayCompositor::Connect(MainLoop &mainLoop,
std::shared_ptr<Manager> manager) {
auto path = getenv("SWAYSOCK");
if (path == nullptr) {
spdlog::error("SWAYSOCK not set");
return nullptr;
}
spdlog::debug("Connecting to sway at {}", path);
auto fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1) {
Expand Down

0 comments on commit 9eee9e1

Please sign in to comment.