xmacro(_NET_WM_STATE_FULLSCREEN)
xmacro(_NET_WM_STATE_DEMANDS_ATTENTION)
xmacro(_NET_WM_STATE_MODAL)
+xmacro(_NET_WM_STATE_HIDDEN)
xmacro(_NET_WM_STATE)
xmacro(_NET_WM_WINDOW_TYPE)
xmacro(_NET_WM_WINDOW_TYPE_NORMAL)
/* I’m not entirely sure if we need to keep _NET_WM_NAME on root. */
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen("i3"), "i3");
- /* only send the first 29 atoms (last one is _NET_CLOSE_WINDOW) increment that number when adding supported atoms */
- xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_SUPPORTED, XCB_ATOM_ATOM, 32, 29, supported_atoms);
+ /* only send the first 30 atoms (last one is _NET_CLOSE_WINDOW) increment that number when adding supported atoms */
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_SUPPORTED, XCB_ATOM_ATOM, 32, 30, supported_atoms);
}
bool mapped;
bool unmap_now;
bool child_mapped;
+ bool is_hidden;
/** The con for which this state is. */
Con *con;
x_draw_decoration(con);
}
+/*
+ * Sets or removes the _NET_WM_STATE_HIDDEN property on con if necessary.
+ *
+ */
+static void set_hidden_state(Con *con) {
+ if (con->window == NULL) {
+ return;
+ }
+
+ con_state *state = state_for_frame(con->frame);
+ bool should_be_hidden = con_is_hidden(con);
+ if (should_be_hidden == state->is_hidden)
+ return;
+
+ unsigned int num = 0;
+ uint32_t values[1];
+ if (should_be_hidden) {
+ DLOG("setting _NET_WM_STATE_HIDDEN for con = %p\n", con);
+ values[num++] = A__NET_WM_STATE_HIDDEN;
+ } else {
+ DLOG("removing _NET_WM_STATE_HIDDEN for con = %p\n", con);
+ }
+
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, con->window->id, A__NET_WM_STATE, XCB_ATOM_ATOM, 32, num, values);
+ state->is_hidden = should_be_hidden;
+}
+
/*
* This function pushes the properties of each node of the layout tree to
* X11 if they have changed (like the map state, position of the window, …).
fake_absolute_configure_notify(con);
}
+ set_hidden_state(con);
+
/* Handle all children and floating windows of this node. We recurse
* in focus order to display the focused client in a stack first when
* switching workspaces (reduces flickering). */