Adapted Client to new source in 0.54
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.10.0)
|
||||
project(hyprland-toggle-tiling VERSION 1.4.0 LANGUAGES C CXX)
|
||||
project(hyprland-toggle-tiling VERSION 1.4.1 LANGUAGES C CXX)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz)
|
||||
|
||||
@@ -23,7 +23,6 @@ class Client {
|
||||
std::array<int, 2> size;
|
||||
WorkspaceSignature workspace;
|
||||
bool floating;
|
||||
bool pseudo;
|
||||
int monitor;
|
||||
std::string className;
|
||||
std::string title;
|
||||
@@ -34,6 +33,7 @@ class Client {
|
||||
bool pinned;
|
||||
int fullscreen;
|
||||
int fullscreenClient;
|
||||
bool overFullscreen;
|
||||
std::string swallowing;
|
||||
int focusHistory;
|
||||
bool inhibitingIdle;
|
||||
|
||||
@@ -12,7 +12,6 @@ void from_json(const json& j, Client& client) {
|
||||
j.at("size").get_to(client.size);
|
||||
j.at("workspace").get_to(client.workspace);
|
||||
j.at("floating").get_to(client.floating);
|
||||
j.at("pseudo").get_to(client.pseudo);
|
||||
j.at("monitor").get_to(client.monitor);
|
||||
j.at("class").get_to(client.className); // Maps "class" JSON field to className
|
||||
j.at("title").get_to(client.title);
|
||||
@@ -23,6 +22,7 @@ void from_json(const json& j, Client& client) {
|
||||
j.at("pinned").get_to(client.pinned);
|
||||
j.at("fullscreen").get_to(client.fullscreen);
|
||||
j.at("fullscreenClient").get_to(client.fullscreenClient);
|
||||
j.at("overFullscreen").get_to(client.overFullscreen);
|
||||
j.at("swallowing").get_to(client.swallowing);
|
||||
j.at("focusHistoryID").get_to(client.focusHistory);
|
||||
j.at("inhibitingIdle").get_to(client.inhibitingIdle);
|
||||
|
||||
Reference in New Issue
Block a user