Skip to content

Commit 2733f0c

Browse files
committed
Fixed ignored X property NET_WM_STATE_HIDDEN
1 parent 131f362 commit 2733f0c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

gui-agent/vmside.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ typedef struct {
116116
Atom net_wm_state; /* Atom: _NET_WM_STATE */
117117
Atom wm_state_fullscreen; /* Atom: _NET_WM_STATE_FULLSCREEN */
118118
Atom wm_state_demands_attention; /* Atom: _NET_WM_STATE_DEMANDS_ATTENTION */
119+
Atom wm_state_hidden; /* Atom: _NET_WM_STATE_HIDDEN */
119120
Atom wm_take_focus; /* Atom: WM_TAKE_FOCUS */
120121
Atom net_wm_name; /* Atom: _NET_WM_NAME */
121122
Atom wm_normal_hints; /* Atom: WM_NORMAL_HINTS */
@@ -878,6 +879,8 @@ static inline uint32_t flags_from_atom(Ghandles * g, Atom a) {
878879
return WINDOW_FLAG_FULLSCREEN;
879880
else if (a == g->wm_state_demands_attention)
880881
return WINDOW_FLAG_DEMANDS_ATTENTION;
882+
else if (a == g->wm_state_hidden)
883+
return WINDOW_FLAG_MINIMIZE;
881884
else {
882885
/* ignore unsupported states */
883886
}
@@ -1729,6 +1732,7 @@ static void mkghandles(Ghandles * g)
17291732
{ &g->net_wm_state, "_NET_WM_STATE" },
17301733
{ &g->wm_state_fullscreen, "_NET_WM_STATE_FULLSCREEN" },
17311734
{ &g->wm_state_demands_attention, "_NET_WM_STATE_DEMANDS_ATTENTION" },
1735+
{ &g->wm_state_hidden, "_NET_WM_STATE_HIDDEN" },
17321736
{ &g->wm_take_focus, "WM_TAKE_FOCUS" },
17331737
{ &g->net_wm_name, "_NET_WM_NAME" },
17341738
{ &g->wm_normal_hints, "WM_NORMAL_HINTS" },
@@ -1748,6 +1752,7 @@ static void mkghandles(Ghandles * g)
17481752
"_NET_WM_STATE",
17491753
"_NET_WM_STATE_FULLSCREEN",
17501754
"_NET_WM_STATE_DEMANDS_ATTENTION",
1755+
"_NET_WM_STATE_HIDDEN",
17511756
};
17521757
for (size_t i = 0; i < QUBES_ARRAY_SIZE(atoms_to_intern); ++i)
17531758
names[SUPPORTED_ATOMS + i] = atoms_to_intern[i].name;
@@ -2320,6 +2325,8 @@ static void handle_window_flags(Ghandles *g, XID winid)
23202325
new_state_list[j++] = g->wm_state_fullscreen;
23212326
if (msg_flags.flags_set & WINDOW_FLAG_DEMANDS_ATTENTION)
23222327
new_state_list[j++] = g->wm_state_demands_attention;
2328+
if (msg_flags.flags_set & WINDOW_FLAG_MINIMIZE)
2329+
new_state_list[j++] = g->wm_state_hidden;
23232330

23242331
if (msg_flags.flags_set)
23252332
changed = 1;

0 commit comments

Comments
 (0)