mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-03 20:29:48 +01:00
Merge pull request #483 from rubyist/json-when-no-activewindow
Have hyprctl -j activewindows return empty json object if there are no activewindows
This commit is contained in:
commit
3829b1626e
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ std::string activeWindowRequest(HyprCtl::eHyprCtlOutputFormat format) {
|
||||||
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
||||||
return "Invalid";
|
return format == HyprCtl::FORMAT_JSON ? "{}" : "Invalid";
|
||||||
|
|
||||||
if (format == HyprCtl::FORMAT_JSON) {
|
if (format == HyprCtl::FORMAT_JSON) {
|
||||||
return getFormat(
|
return getFormat(
|
||||||
|
|
Loading…
Reference in a new issue