]> git.sur5r.net Git - i3/i3/blobdiff - include/data.h
Re-Implement support for RandR changes
[i3/i3] / include / data.h
index 79e0e18a04107933d9436f280b6cf361436db349..6174e4e427b90d82470be62cbec23464af06fbf5 100644 (file)
@@ -42,6 +42,7 @@ typedef struct Window i3Window;
  *****************************************************************************/
 typedef enum { D_LEFT, D_RIGHT, D_UP, D_DOWN } direction_t;
 typedef enum { NO_ORIENTATION = 0, HORIZ, VERT } orientation_t;
+typedef enum { BS_NORMAL = 0, BS_NONE = 1, BS_1PIXEL = 3 } border_style_t;
 
 enum {
     BIND_NONE = 0,
@@ -186,6 +187,9 @@ struct xoutput {
     /** 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;
@@ -198,6 +202,7 @@ struct xoutput {
     /** x, y, width, height */
     Rect rect;
 
+#if 0
     /** The bar window */
     xcb_window_t bar;
     xcb_gcontext_t bargc;
@@ -205,6 +210,7 @@ struct xoutput {
     /** Contains all clients with _NET_WM_WINDOW_TYPE ==
      * _NET_WM_WINDOW_TYPE_DOCK */
     SLIST_HEAD(dock_clients_head, Client) dock_clients;
+#endif
 
     TAILQ_ENTRY(xoutput) outputs;
 };
@@ -212,6 +218,11 @@ struct xoutput {
 struct Window {
     xcb_window_t id;
 
+    /** Holds the xcb_window_t (just an ID) for the leader window (logical
+     * parent for toolwindows and similar floating windows) */
+    xcb_window_t leader;
+    xcb_window_t transient_for;
+
     char *class_class;
     char *class_instance;
 
@@ -273,11 +284,36 @@ struct Con {
 
     char *name;
 
+    /** the workspace number, if this Con is of type CT_WORKSPACE and the
+     * workspace is not a named workspace (for named workspaces, num == -1) */
+    int num;
+
+    /* a sticky-group is an identifier which bundles several containers to a
+     * group. The contents are shared between all of them, that is they are
+     * displayed on whichever of the containers is currently visible */
+    char *sticky_group;
+
     /* user-definable mark to jump to this container later */
     char *mark;
 
     double percent;
 
+    /* proportional width/height, calculated from WM_NORMAL_HINTS, used to
+     * apply an aspect ratio to windows (think of MPlayer) */
+    int proportional_width;
+    int proportional_height;
+    /* the wanted size of the window, used in combination with size
+     * increments (see below). */
+    int base_width;
+    int base_height;
+
+    /* the x11 border pixel attribute */
+    int border_width;
+
+    /* minimum increment size specified for the window (in pixels) */
+    int width_increment;
+    int height_increment;
+
     struct Window *window;
 
     /* Should this container be marked urgent? This gets set when the window
@@ -298,6 +334,7 @@ struct Con {
 
     enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode;
     enum { L_DEFAULT = 0, L_STACKED = 1, L_TABBED = 2 } layout;
+    border_style_t border_style;
     /** 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 _NET_WM_WINDOW_TYPE appropriately) or by the
@@ -311,6 +348,12 @@ struct Con {
         FLOATING_USER_ON = 3
     } floating;
 
+    /** This counter contains the number of UnmapNotify events for this
+     * container (or, more precisely, for its ->frame) which should be ignored.
+     * UnmapNotify events need to be ignored when they are caused by i3 itself,
+     * for example when reparenting or when unmapping the window on a workspace
+     * change. */
+    uint8_t ignore_unmap;
 
     TAILQ_ENTRY(Con) nodes;
     TAILQ_ENTRY(Con) focused;