Skip to content

Commit

Permalink
Status: add desktop_mode
Browse files Browse the repository at this point in the history
This teaches the status machineary about sending the mode a desktop is
in:

 * Global
 * Per-monitor
 * Shared

 Fixes #260
  • Loading branch information
ThomasAdam committed Apr 20, 2021
1 parent 81106a6 commit 6b77e7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fvwm/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,14 @@ status_send(void)
m_cur = monitor_get_current();

bson_init(&msg);
BSON_APPEND_INT64(&msg, "version", 1);
BSON_APPEND_INT64(&msg, "version", 2);
BSON_APPEND_UTF8(&msg, "current_screen", m_cur->si->name);
BSON_APPEND_UTF8(&msg, "desktop_mode",
monitor_mode == MONITOR_TRACKING_G && is_tracking_shared ? "shared" :
monitor_mode == MONITOR_TRACKING_G ? "global" :
monitor_mode == MONITOR_TRACKING_M ? "per-monitor" :
"unknown");

BSON_APPEND_DOCUMENT_BEGIN(&msg, "screens", &screens);

d_count = 0;
Expand Down

0 comments on commit 6b77e7e

Please sign in to comment.