-struct Client {
- /** initialized will be set to true if the client was fully
- * initialized by manage_window() and all functions can be used
- * normally */
- bool initialized;
-
- /** if you set a client to floating and set it back to managed, it
- * does remember its old position and *tries* to get back there */
- Cell old_position;
-
- /** Backpointer. A client is inside a container */
- Container *container;
- /** Because dock clients don’t have a container, we have this
- * workspace-backpointer */
- Workspace *workspace;
-
- /** x, y, width, height of the frame */
- Rect rect;
- /** Position in floating mode and in tiling mode are saved
- * separately */
- Rect floating_rect;
- /** x, y, width, height of the child (relative to its frame) */
- Rect child_rect;
-
- /** contains the size calculated from the hints set by the window or 0
- * if the client did not send any hints */
- int proportional_height;
- int proportional_width;
-
- /** Height which was determined by reading the _NET_WM_STRUT_PARTIAL
- * top/bottom of the screen reservation */
- int desired_height;
-
- /** Name (= window title) */
- char *name;
- /** name_len stores the real string length (glyphs) of the window
- * title if the client uses _NET_WM_NAME. Otherwise, it is set to -1
- * to indicate that name should be just passed to X as 8-bit string
- * and therefore will not be rendered correctly. This behaviour is to
- * support legacy applications which do not set _NET_WM_NAME */
- int name_len;
- /** This will be set to true as soon as the first _NET_WM_NAME comes
- * in. If set to true, legacy window names are ignored. */
- bool uses_net_wm_name;
-
- /** Holds the WM_CLASS, useful for matching the client in commands */
- char *window_class;
-
- /** fullscreen is pretty obvious */
- bool fullscreen;
-
- /** floating? (= not in tiling layout) This cannot be simply a bool
- * because we want to keep track of whether the status was set by the
- * application (by setting WM_CLASS to tools for example) or by the
- * user. The user’s choice overwrites automatic mode, of course. The
- * order of the values is important because we check with >=
- * FLOATING_AUTO_ON if a client is floating. */
- enum { FLOATING_AUTO_OFF = 0, FLOATING_USER_OFF = 1, FLOATING_AUTO_ON = 2, FLOATING_USER_ON = 3 } floating;
-
- /** Ensure TITLEBAR_TOP maps to 0 because we use calloc for
- * initialization later */
- enum { TITLEBAR_TOP = 0, TITLEBAR_LEFT, TITLEBAR_RIGHT, TITLEBAR_BOTTOM, TITLEBAR_OFF } titlebar_position;
-
- /** If a client is set as a dock, it is placed at the very bottom of
- * the screen and its requested size is used */
- bool dock;
-
- /* After leaving fullscreen mode, a client needs to be reconfigured
- * (configuration = setting X, Y, width and height). By setting the
- * force_reconfigure flag, render_layout() will reconfigure the
- * client. */
- bool force_reconfigure;
-
- /* When reparenting a window, an unmap-notify is sent. As we delete
- * windows when they’re unmapped, we need to ignore that
- * one. Therefore, this flag is set when reparenting. */
- bool awaiting_useless_unmap;
-
- /* XCB contexts */
- xcb_window_t frame; /**< Our window: The frame around the
- * client */
- xcb_gcontext_t titlegc; /**< The titlebar’s graphic context
- * inside the frame */
- xcb_window_t child; /**< The client’s window */
-
- /** The following entry provides the necessary list pointers to use
- * Client with LIST_* macros */
- CIRCLEQ_ENTRY(Client) clients;
- SLIST_ENTRY(Client) dock_clients;
- SLIST_ENTRY(Client) focus_clients;
- TAILQ_ENTRY(Client) floating_clients;
+struct xoutput {
+ /** Output id, so that we can requery the output directly later */
+ xcb_randr_output_t id;
+ /** Name of the output */
+ char *name;
+
+ /** Pointer to the Con which represents this output */
+ Con *con;
+
+ /** Whether the output is currently active (has a CRTC attached with a
+ * valid mode) */
+ bool active;
+
+ /** Internal flags, necessary for querying RandR screens (happens in
+ * two stages) */
+ bool changed;
+ bool to_be_disabled;
+
+ /** x, y, width, height */
+ Rect rect;
+
+ /** The bar window */
+ xcb_window_t bar;
+ xcb_gcontext_t bargc;
+
+ /** Contains all clients with _NET_WM_WINDOW_TYPE ==
+ * _NET_WM_WINDOW_TYPE_DOCK */
+ SLIST_HEAD(dock_clients_head, Client) dock_clients;
+
+ TAILQ_ENTRY(xoutput) outputs;