mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-14 03:46:02 +01:00
Change to json bools
This commit is contained in:
parent
c77b571fa7
commit
59088decd0
1 changed files with 6 additions and 6 deletions
|
@ -80,23 +80,23 @@ R"#({
|
||||||
"id": %i,
|
"id": %i,
|
||||||
"name": "%s"
|
"name": "%s"
|
||||||
},
|
},
|
||||||
"floating": %i,
|
"floating": %s,
|
||||||
"monitor": %i,
|
"monitor": %i,
|
||||||
"class": "%s",
|
"class": "%s",
|
||||||
"title": "%s",
|
"title": "%s",
|
||||||
"pid": %i,
|
"pid": %i,
|
||||||
"xwayland": %i
|
"xwayland": %s
|
||||||
},)#",
|
},)#",
|
||||||
w.get(),
|
w.get(),
|
||||||
(int)w->m_vRealPosition.vec().x, (int)w->m_vRealPosition.vec().y,
|
(int)w->m_vRealPosition.vec().x, (int)w->m_vRealPosition.vec().y,
|
||||||
(int)w->m_vRealSize.vec().x, (int)w->m_vRealSize.vec().y,
|
(int)w->m_vRealSize.vec().x, (int)w->m_vRealSize.vec().y,
|
||||||
w->m_iWorkspaceID, escapeJSONStrings(w->m_iWorkspaceID == -1 ? "" : g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID) ? g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID)->m_szName : std::string("Invalid workspace " + std::to_string(w->m_iWorkspaceID))).c_str(),
|
w->m_iWorkspaceID, escapeJSONStrings(w->m_iWorkspaceID == -1 ? "" : g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID) ? g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID)->m_szName : std::string("Invalid workspace " + std::to_string(w->m_iWorkspaceID))).c_str(),
|
||||||
(int)w->m_bIsFloating,
|
((int)w->m_bIsFloating == 1 ? "true" : "false"),
|
||||||
w->m_iMonitorID,
|
w->m_iMonitorID,
|
||||||
escapeJSONStrings(g_pXWaylandManager->getAppIDClass(w.get())).c_str(),
|
escapeJSONStrings(g_pXWaylandManager->getAppIDClass(w.get())).c_str(),
|
||||||
escapeJSONStrings(g_pXWaylandManager->getTitle(w.get())).c_str(),
|
escapeJSONStrings(g_pXWaylandManager->getTitle(w.get())).c_str(),
|
||||||
w->getPID(),
|
w->getPID(),
|
||||||
(int)w->m_bIsX11
|
((int)w->m_bIsX11 == 1 ? "true" : "false")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,13 +129,13 @@ R"#({
|
||||||
"name": "%s",
|
"name": "%s",
|
||||||
"monitor": "%s",
|
"monitor": "%s",
|
||||||
"windows": %i,
|
"windows": %i,
|
||||||
"hasfullscreen": %i
|
"hasfullscreen": %s
|
||||||
},)#",
|
},)#",
|
||||||
w->m_iID,
|
w->m_iID,
|
||||||
escapeJSONStrings(w->m_szName).c_str(),
|
escapeJSONStrings(w->m_szName).c_str(),
|
||||||
escapeJSONStrings(g_pCompositor->getMonitorFromID(w->m_iMonitorID)->szName).c_str(),
|
escapeJSONStrings(g_pCompositor->getMonitorFromID(w->m_iMonitorID)->szName).c_str(),
|
||||||
g_pCompositor->getWindowsOnWorkspace(w->m_iID),
|
g_pCompositor->getWindowsOnWorkspace(w->m_iID),
|
||||||
(int)w->m_bHasFullscreenWindow
|
((int)w->m_bHasFullscreenWindow == 1 ? "true" : "false")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue