i3
data.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * include/data.h: This file defines all data structures used by i3
8  *
9  */
10 #pragma once
11 
12 #define PCRE2_CODE_UNIT_WIDTH 8
13 
14 #define SN_API_NOT_YET_FROZEN 1
15 #include <libsn/sn-launcher.h>
16 
17 #include <xcb/randr.h>
18 #include <pcre2.h>
19 #include <sys/time.h>
20 #include <cairo/cairo.h>
21 
22 #include "queue.h"
23 
24 /*
25  * To get the big concept: There are helper structures like struct
26  * Workspace_Assignment. Every struct which is also defined as type (see
27  * forward definitions) is considered to be a major structure, thus important.
28  *
29  * The following things are all stored in a 'Con', from very high level (the
30  * biggest Cons) to very small (a single window):
31  *
32  * 1) X11 root window (as big as all your outputs combined)
33  * 2) output (like LVDS1)
34  * 3) content container, dockarea containers
35  * 4) workspaces
36  * 5) split containers
37  * ... (you can arbitrarily nest split containers)
38  * 6) X11 window containers
39  *
40  */
41 
42 /* Forward definitions */
43 typedef struct Binding Binding;
44 typedef struct Rect Rect;
45 typedef struct xoutput Output;
46 typedef struct Con Con;
47 typedef struct Match Match;
48 typedef struct Assignment Assignment;
49 typedef struct Window i3Window;
50 typedef struct gaps_t gaps_t;
51 typedef struct mark_t mark_t;
52 
53 /******************************************************************************
54  * Helper types
55  *****************************************************************************/
56 typedef enum { D_LEFT,
60 typedef enum { NO_ORIENTATION = 0,
63 typedef enum { BEFORE,
65 typedef enum {
66  BS_NONE = 0,
67  BS_PIXEL = 1,
68  BS_NORMAL = 2,
70 
73 typedef enum { DONT_KILL_WINDOW = 0,
76 
78 typedef enum { ADJ_NONE = 0,
83 
84 typedef enum { SMART_BORDERS_OFF,
87 
88 typedef enum { SMART_GAPS_OFF,
91 
92 typedef enum { HEBM_NONE = ADJ_NONE,
96  HEBM_SMART = (1 << 5),
98 
99 typedef enum { MM_REPLACE,
101 
105 typedef enum {
108  L_TABBED = 2,
110  L_OUTPUT = 4,
111  L_SPLITV = 5,
112  L_SPLITH = 6
114 
118 typedef enum {
120  B_MOUSE = 1
122 
126 typedef enum {
131  I3_XKB_GROUP_MASK_4 = (1 << 3)
133 
140 typedef uint32_t i3_event_state_mask_t;
141 
145 typedef enum {
149 
150 struct gaps_t {
151  int inner;
152  int top;
153  int right;
154  int bottom;
155  int left;
156 };
157 
158 typedef enum {
159  GAPS_INNER = (1 << 0),
160  GAPS_TOP = (1 << 1),
161  GAPS_RIGHT = (1 << 2),
162  GAPS_BOTTOM = (1 << 3),
163  GAPS_LEFT = (1 << 4),
167 } gaps_mask_t;
168 
172 typedef enum {
178 
189 struct Rect {
190  uint32_t x;
191  uint32_t y;
192  uint32_t width;
193  uint32_t height;
194 };
195 
201 struct reservedpx {
202  uint32_t left;
203  uint32_t right;
204  uint32_t top;
205  uint32_t bottom;
206 };
207 
213 struct width_height {
214  uint32_t w;
215  uint32_t h;
216 };
217 
227  struct width_height con_rect;
233 };
234 
240  char *name;
241  char *output;
244 
246 };
247 
248 struct Ignore_Event {
249  int sequence;
251  time_t added;
252 
253  SLIST_ENTRY(Ignore_Event) ignore_events;
254 };
255 
263  char *id;
265  char *workspace;
267  SnLauncherContext *context;
270  time_t delete_at;
271 
273 };
274 
284 struct regex {
285  char *pattern;
286  pcre2_code *regex;
287 };
288 
295  xcb_keycode_t keycode;
298 };
299 
300 /******************************************************************************
301  * Major types
302  *****************************************************************************/
303 
310 struct Binding {
311  /* The type of input this binding is for. (Mouse bindings are not yet
312  * implemented. All bindings are currently assumed to be keyboard bindings.) */
314 
317  enum {
318  /* This binding will only be executed upon KeyPress events */
320  /* This binding will be executed either upon a KeyRelease event, or… */
322  /* …upon a KeyRelease event, even if the modifiers don’t match. This
323  * state is triggered from get_binding() when the corresponding
324  * KeyPress (!) happens, so that users can release the modifier keys
325  * before releasing the actual key. */
328 
331  bool border;
332 
337 
341 
343  uint32_t keycode;
344 
349 
353  char *symbol;
354 
358  TAILQ_HEAD(keycodes_head, Binding_Keycode) keycodes_head;
359 
361  char *command;
362 
364 };
365 
373 struct Autostart {
375  char *command;
381 };
382 
383 struct output_name {
384  char *name;
386 };
387 
395 struct xoutput {
397  xcb_randr_output_t id;
398 
401  bool active;
402 
405  bool changed;
407  bool primary;
408 
412  SLIST_HEAD(names_head, output_name) names_head;
413 
416 
419 
421 };
422 
428 struct Window {
429  xcb_window_t id;
430 
433  xcb_window_t leader;
434  xcb_window_t transient_for;
435 
438  uint32_t nr_assignments;
440 
441  char *class_class;
443 
446 
450  char *role;
451 
453  char *machine;
454 
457 
460 
463 
467 
469  xcb_atom_t window_type;
470 
472  uint32_t wm_desktop;
473 
475  enum { W_NODOCK = 0,
478 
480  struct timeval urgent;
481 
483  struct reservedpx reserved;
484 
486  uint16_t depth;
487 
488  /* the wanted size of the window, used in combination with size
489  * increments (see below). */
492 
493  /* minimum increment size specified for the window (in pixels) */
496 
497  /* Minimum size specified for the window. */
500 
501  /* Maximum size specified for the window. */
504 
505  /* aspect ratio from WM_NORMAL_HINTS (MPlayer uses this for example) */
508 
510  cairo_surface_t *icon;
511 
513  bool shaped;
516 
517  /* Time when the window became managed. Used to determine whether a window
518  * should be swallowed after initial management. */
520 
521  /* The window has been swallowed. */
522  bool swallowed;
523 };
524 
533 struct Match {
534  /* Set if a criterion was specified incorrectly. */
535  char *error;
536 
537  struct regex *title;
539  struct regex *class;
540  struct regex *instance;
541  struct regex *mark;
543  struct regex *workspace;
544  struct regex *machine;
545  xcb_atom_t window_type;
546  enum {
548  U_LATEST = 0,
549  U_OLDEST = 1
551  enum {
553  M_NODOCK = 0,
556  M_DOCK_BOTTOM = 3
557  } dock;
558  xcb_window_t id;
559  enum { WM_ANY = 0,
568 
569  /* Where the window looking for a match should be inserted:
570  *
571  * M_HERE = the matched container will be replaced by the window
572  * (layout saving)
573  * M_ASSIGN_WS = the matched container will be inserted in the target_ws.
574  * M_BELOW = the window will be inserted as a child of the matched container
575  * (dockareas)
576  *
577  */
578  enum { M_HERE = 0,
581 
582  TAILQ_ENTRY(Match) matches;
583 
584  /* Whether this match was generated when restarting i3 inplace.
585  * Leads to not setting focus when managing a new window, because the old
586  * focus stack should be restored. */
588 };
589 
598 struct Assignment {
610  enum {
611  A_ANY = 0,
612  A_COMMAND = (1 << 0),
613  A_TO_WORKSPACE = (1 << 1),
614  A_NO_FOCUS = (1 << 2),
616  A_TO_OUTPUT = (1 << 4)
617  } type;
618 
621 
623  union {
624  char *command;
625  char *workspace;
626  char *output;
627  } dest;
628 
630 };
631 
633 typedef enum { CF_NONE = 0,
636 
637 struct mark_t {
638  char *name;
639 
641 };
642 
647 struct Con {
648  bool mapped;
649 
650  /* Should this container be marked urgent? This gets set when the window
651  * inside this container (if any) sets the urgency hint, for example. */
652  bool urgent;
653 
659  uint8_t ignore_unmap;
660 
661  /* The surface used for the frame window. */
665 
666  enum {
667  CT_ROOT = 0,
669  CT_CON = 2,
672  CT_DOCKAREA = 5
673  } type;
674 
677  int num;
678 
681 
682  struct Con *parent;
683 
684  /* The position and size for this con. These coordinates are absolute. Note
685  * that the rect of a container does not include the decoration. */
686  struct Rect rect;
687  /* The position and size of the actual client window. These coordinates are
688  * relative to the container's rect. */
689  struct Rect window_rect;
690  /* The position and size of the container's decoration. These coordinates
691  * are relative to the container's parent's rect. */
692  struct Rect deco_rect;
694  struct Rect geometry;
695 
696  char *name;
697 
700 
705 
706  /* a sticky-group is an identifier which bundles several containers to a
707  * group. The contents are shared between all of them, that is they are
708  * displayed on whichever of the containers is currently visible */
710 
711  /* user-definable marks to jump to this container later */
712  TAILQ_HEAD(marks_head, mark_t) marks_head;
713  /* cached to decide whether a redraw is needed */
715 
716  double percent;
717 
718  /* the x11 border pixel attribute */
721 
722  struct Window *window;
723 
724  /* timer used for disabling urgency */
725  struct ev_timer *urgency_timer;
726 
729 
730  /* Only workspace-containers can have floating clients */
731  TAILQ_HEAD(floating_head, Con) floating_head;
732 
733  TAILQ_HEAD(nodes_head, Con) nodes_head;
734  TAILQ_HEAD(focus_head, Con) focus_head;
735 
736  TAILQ_HEAD(swallow_head, Match) swallow_head;
737 
739 
740  /* Whether this window should stick to the glass. This corresponds to
741  * the _NET_WM_STATE_STICKY atom and will only be respected if the
742  * window is floating. */
743  bool sticky;
744 
745  /* layout is the layout of this container: one of split[v|h], stacked or
746  * tabbed. Special containers in the tree (above workspaces) have special
747  * layouts like dockarea or output.
748  *
749  * last_split_layout is one of splitv or splith to support the old "layout
750  * default" command which by now should be "layout splitv" or "layout
751  * splith" explicitly.
752  *
753  * workspace_layout is only for type == CT_WORKSPACE cons. When you change
754  * the layout of a workspace without any children, i3 cannot just set the
755  * layout (because workspaces need to be splitv/splith to allow focus
756  * parent and opening new containers). Instead, it stores the requested
757  * layout in workspace_layout and creates a new split container with that
758  * layout whenever a new container is attached to the workspace. */
760 
762  /* When the border style of a con changes because of motif hints, we don't
763  * want to set more decoration that the user wants. The user's preference is determined by these:
764  * 1. For new tiling windows, as set by `default_border`
765  * 2. For new floating windows, as set by `default_floating_border`
766  * 3. For all windows that the user runs the `border` command, whatever is
767  * the result of that command for that window. */
769 
776  enum {
780  FLOATING_USER_ON = 3
782 
783  TAILQ_ENTRY(Con) nodes;
786  TAILQ_ENTRY(Con) floating_windows;
787 
789  void (*on_remove_child)(Con *);
790 
791  enum {
792  /* Not a scratchpad window. */
794 
795  /* Just moved to scratchpad, not resized by the user yet.
796  * Window will be auto-centered and sized appropriately. */
798 
799  /* The user changed position/size of the scratchpad window. */
802 
803  /* The ID of this container before restarting. Necessary to correctly
804  * interpret back-references in the JSON (such as the focus stack). */
805  int old_id;
806 
807  /* Depth of the container window */
808  uint16_t depth;
809 
810  /* The colormap for this con if a custom one is used. */
811  xcb_colormap_t colormap;
812 };
struct pending_marks * marks
struct autostarts_always_head autostarts_always
Definition: main.c:94
struct autostarts_head autostarts
Definition: main.c:91
struct assignments_head assignments
Definition: main.c:97
struct ws_assignments_head ws_assignments
Definition: main.c:101
struct bindings_head * bindings
Definition: main.c:87
struct outputs_head outputs
Definition: randr.c:22
struct Con * focused
Definition: tree.c:13
struct all_cons_head all_cons
Definition: tree.c:15
hide_edge_borders_mode_t
Definition: data.h:92
@ HEBM_VERTICAL
Definition: data.h:93
@ HEBM_SMART_NO_GAPS
Definition: data.h:97
@ HEBM_HORIZONTAL
Definition: data.h:94
@ HEBM_BOTH
Definition: data.h:95
@ HEBM_SMART
Definition: data.h:96
@ HEBM_NONE
Definition: data.h:92
smart_gaps_t
Definition: data.h:88
@ SMART_GAPS_INVERSE_OUTER
Definition: data.h:90
@ SMART_GAPS_ON
Definition: data.h:89
@ SMART_GAPS_OFF
Definition: data.h:88
i3_xkb_group_mask_t
Bitmask for matching XCB_XKB_GROUP_1 to XCB_XKB_GROUP_4.
Definition: data.h:126
@ I3_XKB_GROUP_MASK_2
Definition: data.h:129
@ I3_XKB_GROUP_MASK_3
Definition: data.h:130
@ I3_XKB_GROUP_MASK_4
Definition: data.h:131
@ I3_XKB_GROUP_MASK_1
Definition: data.h:128
@ I3_XKB_GROUP_MASK_ANY
Definition: data.h:127
smart_borders_t
Definition: data.h:84
@ SMART_BORDERS_ON
Definition: data.h:85
@ SMART_BORDERS_NO_GAPS
Definition: data.h:86
@ SMART_BORDERS_OFF
Definition: data.h:84
position_t
Definition: data.h:63
@ AFTER
Definition: data.h:64
@ BEFORE
Definition: data.h:63
gaps_mask_t
Definition: data.h:158
@ GAPS_HORIZONTAL
Definition: data.h:165
@ GAPS_LEFT
Definition: data.h:163
@ GAPS_VERTICAL
Definition: data.h:164
@ GAPS_RIGHT
Definition: data.h:161
@ GAPS_INNER
Definition: data.h:159
@ GAPS_OUTER
Definition: data.h:166
@ GAPS_BOTTOM
Definition: data.h:162
@ GAPS_TOP
Definition: data.h:160
uint32_t i3_event_state_mask_t
The lower 16 bits contain a xcb_key_but_mask_t, the higher 16 bits contain an i3_xkb_group_mask_t.
Definition: data.h:140
warping_t
Mouse pointer warping modes.
Definition: data.h:145
@ POINTER_WARPING_OUTPUT
Definition: data.h:146
@ POINTER_WARPING_NONE
Definition: data.h:147
layout_t
Container layouts.
Definition: data.h:105
@ L_STACKED
Definition: data.h:107
@ L_TABBED
Definition: data.h:108
@ L_DOCKAREA
Definition: data.h:109
@ L_OUTPUT
Definition: data.h:110
@ L_SPLITH
Definition: data.h:112
@ L_SPLITV
Definition: data.h:111
@ L_DEFAULT
Definition: data.h:106
mark_mode_t
Definition: data.h:99
@ MM_ADD
Definition: data.h:100
@ MM_REPLACE
Definition: data.h:99
focus_wrapping_t
Focus wrapping modes.
Definition: data.h:172
@ FOCUS_WRAPPING_OFF
Definition: data.h:173
@ FOCUS_WRAPPING_ON
Definition: data.h:174
@ FOCUS_WRAPPING_FORCE
Definition: data.h:175
@ FOCUS_WRAPPING_WORKSPACE
Definition: data.h:176
orientation_t
Definition: data.h:60
@ VERT
Definition: data.h:62
@ HORIZ
Definition: data.h:61
@ NO_ORIENTATION
Definition: data.h:60
adjacent_t
describes if the window is adjacent to the output (physical screen) edges.
Definition: data.h:78
@ ADJ_LEFT_SCREEN_EDGE
Definition: data.h:79
@ ADJ_LOWER_SCREEN_EDGE
Definition: data.h:82
@ ADJ_RIGHT_SCREEN_EDGE
Definition: data.h:80
@ ADJ_UPPER_SCREEN_EDGE
Definition: data.h:81
@ ADJ_NONE
Definition: data.h:78
fullscreen_mode_t
Fullscreen modes.
Definition: data.h:633
@ CF_OUTPUT
Definition: data.h:634
@ CF_GLOBAL
Definition: data.h:635
@ CF_NONE
Definition: data.h:633
border_style_t
Definition: data.h:65
@ BS_NONE
Definition: data.h:66
@ BS_PIXEL
Definition: data.h:67
@ BS_NORMAL
Definition: data.h:68
input_type_t
Binding input types.
Definition: data.h:118
@ B_KEYBOARD
Definition: data.h:119
@ B_MOUSE
Definition: data.h:120
kill_window_t
parameter to specify whether tree_close_internal() and x_window_kill() should kill only this specific...
Definition: data.h:73
@ KILL_CLIENT
Definition: data.h:75
@ KILL_WINDOW
Definition: data.h:74
@ DONT_KILL_WINDOW
Definition: data.h:73
direction_t
Definition: data.h:56
@ D_RIGHT
Definition: data.h:57
@ D_LEFT
Definition: data.h:56
@ D_UP
Definition: data.h:58
@ D_DOWN
Definition: data.h:59
struct _i3String i3String
Opaque data structure for storing strings.
Definition: libi3.h:49
Part of the struct Config.
Definition: configuration.h:54
Definition: data.h:150
int inner
Definition: data.h:151
int left
Definition: data.h:155
int right
Definition: data.h:153
int top
Definition: data.h:152
int bottom
Definition: data.h:154
Stores a rectangle, for example the size of a window, the child window etc.
Definition: data.h:189
uint32_t height
Definition: data.h:193
uint32_t x
Definition: data.h:190
uint32_t y
Definition: data.h:191
uint32_t width
Definition: data.h:192
Stores the reserved pixels on each screen edge read from a _NET_WM_STRUT_PARTIAL.
Definition: data.h:201
uint32_t top
Definition: data.h:204
uint32_t bottom
Definition: data.h:205
uint32_t right
Definition: data.h:203
uint32_t left
Definition: data.h:202
Stores a width/height pair, used as part of deco_render_params to check whether the rects width/heigh...
Definition: data.h:213
uint32_t w
Definition: data.h:214
uint32_t h
Definition: data.h:215
Stores the parameters for rendering a window decoration.
Definition: data.h:224
int border_style
Definition: data.h:226
struct Colortriple * color
Definition: data.h:225
bool con_is_leaf
Definition: data.h:232
color_t background
Definition: data.h:230
layout_t parent_layout
Definition: data.h:231
struct width_height con_rect
Definition: data.h:227
Rect con_deco_rect
Definition: data.h:229
struct width_height con_window_rect
Definition: data.h:228
Stores which workspace (by name or number) goes to which output and its gaps config.
Definition: data.h:239
gaps_mask_t gaps_mask
Definition: data.h:243
TAILQ_ENTRY(Workspace_Assignment) ws_assignments
int sequence
Definition: data.h:249
SLIST_ENTRY(Ignore_Event) ignore_events
time_t added
Definition: data.h:251
int response_type
Definition: data.h:250
Stores internal information about a startup sequence, like the workspace it was initiated on.
Definition: data.h:261
TAILQ_ENTRY(Startup_Sequence) sequences
char * id
startup ID for this sequence, generated by libstartup-notification
Definition: data.h:263
time_t delete_at
time at which this sequence should be deleted (after it was marked as completed)
Definition: data.h:270
char * workspace
workspace on which this startup was initiated
Definition: data.h:265
SnLauncherContext * context
libstartup-notification context for this launch
Definition: data.h:267
Regular expression wrapper.
Definition: data.h:284
char * pattern
Definition: data.h:285
pcre2_code * regex
Definition: data.h:286
Stores a resolved keycode (from a keysym), including the modifier mask.
Definition: data.h:294
i3_event_state_mask_t modifiers
Definition: data.h:296
xcb_keycode_t keycode
Definition: data.h:295
TAILQ_ENTRY(Binding_Keycode) keycodes
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
Definition: data.h:310
bool whole_window
If this is true for a mouse binding, the binding should be executed when the button is pressed over a...
Definition: data.h:336
@ B_UPON_KEYPRESS
Definition: data.h:319
@ B_UPON_KEYRELEASE_IGNORE_MODS
Definition: data.h:326
@ B_UPON_KEYRELEASE
Definition: data.h:321
char * command
Command, like in command mode.
Definition: data.h:361
bool border
If this is true for a mouse binding, the binding should be executed when the button is pressed over t...
Definition: data.h:331
uint32_t keycode
Keycode to bind.
Definition: data.h:343
TAILQ_HEAD(keycodes_head, Binding_Keycode) keycodes_head
Only in use if symbol != NULL.
char * symbol
Symbol the user specified in configfile, if any.
Definition: data.h:353
enum Binding::@10 release
If true, the binding should be executed upon a KeyRelease event, not a KeyPress (the default).
bool exclude_titlebar
If this is true for a mouse binding, the binding should only be executed if the button press was not ...
Definition: data.h:340
TAILQ_ENTRY(Binding) bindings
i3_event_state_mask_t event_state_mask
Bitmask which is applied against event->state for KeyPress and KeyRelease events to determine whether...
Definition: data.h:348
input_type_t input_type
Definition: data.h:313
Holds a command specified by either an:
Definition: data.h:373
TAILQ_ENTRY(Autostart) autostarts
bool no_startup_id
no_startup_id flag for start_application().
Definition: data.h:378
TAILQ_ENTRY(Autostart) autostarts_always
char * command
Command, like in command mode.
Definition: data.h:375
SLIST_ENTRY(output_name) names
char * name
Definition: data.h:384
An Output is a physical output on your graphics driver.
Definition: data.h:395
Con * con
Pointer to the Con which represents this output.
Definition: data.h:415
bool changed
Internal flags, necessary for querying RandR screens (happens in two stages)
Definition: data.h:405
bool to_be_disabled
Definition: data.h:406
bool active
Whether the output is currently active (has a CRTC attached with a valid mode)
Definition: data.h:401
TAILQ_ENTRY(xoutput) outputs
xcb_randr_output_t id
Output id, so that we can requery the output directly later.
Definition: data.h:397
bool primary
Definition: data.h:407
Rect rect
x, y, width, height
Definition: data.h:418
SLIST_HEAD(names_head, output_name) names_head
List of names for the output.
A 'Window' is a type which contains an xcb_window_t and all the related information (hints like _NET_...
Definition: data.h:428
double max_aspect_ratio
Definition: data.h:507
time_t managed_since
Definition: data.h:519
@ W_DOCK_TOP
Definition: data.h:476
@ W_DOCK_BOTTOM
Definition: data.h:477
@ W_NODOCK
Definition: data.h:475
char * class_instance
Definition: data.h:442
bool uses_net_wm_name
Whether the application used _NET_WM_NAME.
Definition: data.h:459
bool input_shaped
The window has a nonrectangular input shape.
Definition: data.h:515
struct timeval urgent
When this window was marked urgent.
Definition: data.h:480
int base_height
Definition: data.h:491
i3String * name
The name of the window.
Definition: data.h:445
int height_increment
Definition: data.h:495
int max_height
Definition: data.h:503
cairo_surface_t * icon
Window icon, as Cairo surface.
Definition: data.h:510
double min_aspect_ratio
Definition: data.h:506
bool name_x_changed
Flag to force re-rendering the decoration upon changes.
Definition: data.h:456
int max_width
Definition: data.h:502
xcb_window_t id
Definition: data.h:429
int min_height
Definition: data.h:499
enum Window::@11 dock
Whether the window says it is a dock window.
char * machine
WM_CLIENT_MACHINE of the window.
Definition: data.h:453
xcb_atom_t window_type
The _NET_WM_WINDOW_TYPE for this window.
Definition: data.h:469
Assignment ** ran_assignments
Definition: data.h:439
bool doesnt_accept_focus
Whether this window accepts focus.
Definition: data.h:466
bool shaped
The window has a nonrectangular shape.
Definition: data.h:513
int width_increment
Definition: data.h:494
bool needs_take_focus
Whether the application needs to receive WM_TAKE_FOCUS.
Definition: data.h:462
char * class_class
Definition: data.h:441
xcb_window_t transient_for
Definition: data.h:434
char * role
The WM_WINDOW_ROLE of this window (for example, the pidgin buddy window sets "buddy list").
Definition: data.h:450
uint32_t wm_desktop
The _NET_WM_DESKTOP for this window.
Definition: data.h:472
struct reservedpx reserved
Pixels the window reserves.
Definition: data.h:483
int base_width
Definition: data.h:490
xcb_window_t leader
Holds the xcb_window_t (just an ID) for the leader window (logical parent for toolwindows and similar...
Definition: data.h:433
uint16_t depth
Depth of the window.
Definition: data.h:486
int min_width
Definition: data.h:498
bool swallowed
Definition: data.h:522
uint32_t nr_assignments
Pointers to the Assignments which were already ran for this Window (assignments run only once)
Definition: data.h:438
A "match" is a data structure which acts like a mask or expression to match certain windows or not.
Definition: data.h:533
struct regex * window_role
Definition: data.h:542
bool match_all_windows
Definition: data.h:567
xcb_atom_t window_type
Definition: data.h:545
@ U_LATEST
Definition: data.h:548
@ U_DONTCHECK
Definition: data.h:547
@ U_OLDEST
Definition: data.h:549
struct regex * title
Definition: data.h:537
@ M_DOCK_BOTTOM
Definition: data.h:556
@ M_DOCK_TOP
Definition: data.h:555
@ M_DONTCHECK
Definition: data.h:552
@ M_NODOCK
Definition: data.h:553
@ M_DOCK_ANY
Definition: data.h:554
struct regex * instance
Definition: data.h:540
enum Match::@12 urgent
@ WM_FLOATING
Definition: data.h:565
@ WM_TILING_USER
Definition: data.h:561
@ WM_ANY
Definition: data.h:559
@ WM_TILING
Definition: data.h:562
@ WM_TILING_AUTO
Definition: data.h:560
@ WM_FLOATING_AUTO
Definition: data.h:563
@ WM_FLOATING_USER
Definition: data.h:564
struct regex * application
Definition: data.h:538
enum Match::@14 window_mode
struct regex * mark
Definition: data.h:541
struct regex * machine
Definition: data.h:544
bool restart_mode
Definition: data.h:587
struct regex * workspace
Definition: data.h:543
TAILQ_ENTRY(Match) matches
enum Match::@15 insert_where
@ M_ASSIGN_WS
Definition: data.h:579
@ M_HERE
Definition: data.h:578
@ M_BELOW
Definition: data.h:580
xcb_window_t id
Definition: data.h:558
Con * con_id
Definition: data.h:566
char * error
Definition: data.h:535
enum Match::@13 dock
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Definition: data.h:598
Match match
the criteria to check if a window matches
Definition: data.h:620
union Assignment::@17 dest
destination workspace/command/output, depending on the type
char * output
Definition: data.h:626
char * command
Definition: data.h:624
char * workspace
Definition: data.h:625
TAILQ_ENTRY(Assignment) assignments
enum Assignment::@16 type
type of this assignment:
@ A_COMMAND
Definition: data.h:612
@ A_TO_WORKSPACE
Definition: data.h:613
@ A_TO_WORKSPACE_NUMBER
Definition: data.h:615
@ A_ANY
Definition: data.h:611
@ A_NO_FOCUS
Definition: data.h:614
@ A_TO_OUTPUT
Definition: data.h:616
Definition: data.h:637
char * name
Definition: data.h:638
TAILQ_ENTRY(mark_t) marks
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:647
struct Con * parent
Definition: data.h:682
enum Con::@20 scratchpad_state
struct Rect deco_rect
Definition: data.h:692
enum Con::@18 type
int border_width
Definition: data.h:719
layout_t workspace_layout
Definition: data.h:759
double percent
Definition: data.h:716
TAILQ_ENTRY(Con) all_cons
layout_t last_split_layout
Definition: data.h:759
struct Rect rect
Definition: data.h:686
gaps_t gaps
Only applicable for containers of type CT_WORKSPACE.
Definition: data.h:680
int current_border_width
Definition: data.h:720
bool sticky
Definition: data.h:743
xcb_colormap_t colormap
Definition: data.h:811
border_style_t max_user_border_style
Definition: data.h:768
TAILQ_HEAD(floating_head, Con) floating_head
bool pixmap_recreated
Definition: data.h:664
TAILQ_HEAD(nodes_head, Con) nodes_head
TAILQ_ENTRY(Con) floating_windows
layout_t layout
Definition: data.h:759
bool mapped
Definition: data.h:648
int num
the workspace number, if this Con is of type CT_WORKSPACE and the workspace is not a named workspace ...
Definition: data.h:677
struct ev_timer * urgency_timer
Definition: data.h:725
@ CT_ROOT
Definition: data.h:667
@ CT_WORKSPACE
Definition: data.h:671
@ CT_CON
Definition: data.h:669
@ CT_FLOATING_CON
Definition: data.h:670
@ CT_OUTPUT
Definition: data.h:668
@ CT_DOCKAREA
Definition: data.h:672
@ SCRATCHPAD_NONE
Definition: data.h:793
@ SCRATCHPAD_CHANGED
Definition: data.h:800
@ SCRATCHPAD_FRESH
Definition: data.h:797
uint8_t ignore_unmap
This counter contains the number of UnmapNotify events for this container (or, more precisely,...
Definition: data.h:659
struct Rect window_rect
Definition: data.h:689
TAILQ_ENTRY(Con) focused
int window_icon_padding
Whether the window icon should be displayed, and with what padding.
Definition: data.h:704
struct Window * window
Definition: data.h:722
int old_id
Definition: data.h:805
char * title_format
The format with which the window's name should be displayed.
Definition: data.h:699
TAILQ_HEAD(marks_head, mark_t) marks_head
surface_t frame
Definition: data.h:662
border_style_t border_style
Definition: data.h:761
TAILQ_HEAD(focus_head, Con) focus_head
char * name
Definition: data.h:696
struct Rect geometry
the geometry this window requested when getting mapped
Definition: data.h:694
char * sticky_group
Definition: data.h:709
uint16_t depth
Definition: data.h:808
surface_t frame_buffer
Definition: data.h:663
TAILQ_ENTRY(Con) nodes
@ FLOATING_USER_ON
Definition: data.h:780
@ FLOATING_AUTO_ON
Definition: data.h:779
@ FLOATING_USER_OFF
Definition: data.h:778
@ FLOATING_AUTO_OFF
Definition: data.h:777
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
Definition: data.h:728
void(* on_remove_child)(Con *)
callbacks
Definition: data.h:789
bool mark_changed
Definition: data.h:714
TAILQ_HEAD(swallow_head, Match) swallow_head
enum Con::@19 floating
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whet...
fullscreen_mode_t fullscreen_mode
Definition: data.h:738
bool urgent
Definition: data.h:652
Definition: libi3.h:426