25 while (parent && parent->
type != CT_WORKSPACE && parent->
type != CT_DOCKAREA) {
44 new->current_border_width = -1;
46 new->depth = window->
depth;
47 new->window->aspect_ratio = 0.0;
51 DLOG(
"opening window\n");
77 Con *current = previous;
78 struct nodes_head *nodes_head = &(parent->nodes_head);
79 struct focus_head *focus_head = &(parent->focus_head);
83 if (con->
type == CT_WORKSPACE) {
84 DLOG(
"it's a workspace. num = %d\n", con->
num);
89 if (con->
num < current->
num) {
93 while (current->
num != -1 && con->
num > current->
num) {
107 goto add_to_focus_head;
110 if (con->
type == CT_FLOATING_CON) {
111 DLOG(
"Inserting into floating containers\n");
117 if (loop->
type == CT_FLOATING_CON)
131 if (con->
window != NULL &&
132 parent->
type == CT_WORKSPACE &&
134 DLOG(
"Parent is a workspace. Applying default layout...\n");
138 nodes_head = &(target->nodes_head);
139 focus_head = &(target->focus_head);
148 if (current && parent->
type != CT_OUTPUT) {
149 DLOG(
"Inserting con = %p after con %p\n", con, current);
183 if (con->
type == CT_FLOATING_CON) {
199 DLOG(
"con_focus = %p\n", con);
228 DLOG(
"Closing con = %p.\n", con);
231 if (con->
type == CT_OUTPUT || con->
type == CT_ROOT) {
232 DLOG(
"con = %p is of type %d, not closing anything.\n", con, con->
type);
236 if (con->
type == CT_WORKSPACE) {
237 DLOG(
"con = %p is a workspace, closing all children instead.\n", con);
238 Con *child, *nextchild;
239 for (child =
TAILQ_FIRST(&(con->focus_head)); child;) {
241 DLOG(
"killing child = %p.\n", child);
304 while (current != NULL && current->
type != CT_WORKSPACE) {
341 if (con->
type == CT_WORKSPACE)
345 DLOG(
"container %p does not accept windows, it is a split container.\n", con);
350 return (con->
window == NULL);
360 while (result != NULL && result->
type != CT_OUTPUT)
364 assert(result != NULL);
374 while (result != NULL && result->
type != CT_WORKSPACE)
385 DLOG(
"Searching for parent of Con %p with orientation %d\n", con, orientation);
387 if (parent->
type == CT_FLOATING_CON)
390 DLOG(
"Need to go one level further up\n");
394 (parent->
type == CT_FLOATING_CON ||
395 parent->
type == CT_OUTPUT ||
401 DLOG(
"Result: %p\n", parent);
421 Con *current, *child;
432 current = entry->
con;
452 TAILQ_FOREACH(child, &(current->floating_head), floating_windows) {
467 return (con->
name[0] ==
'_' && con->
name[1] ==
'_');
476 DLOG(
"checking if con %p is floating\n", con);
477 return (con->
floating >= FLOATING_AUTO_ON);
501 if (con->
type == CT_FLOATING_CON)
504 if (con->
floating >= FLOATING_AUTO_ON)
507 if (con->
type == CT_WORKSPACE || con->
type == CT_OUTPUT)
573 if (strcmp(current->
name, mark) == 0)
588 DLOG(
"Toggling mark \"%s\" on con = %p.\n", mark, con);
603 DLOG(
"Setting mark \"%s\" on con = %p.\n", mark, con);
607 DLOG(
"Removing all existing marks on con = %p.\n", con);
634 DLOG(
"Unmarking all containers.\n");
636 if (con != NULL && current != con)
655 DLOG(
"Removing mark \"%s\".\n", name);
657 if (current == NULL) {
658 DLOG(
"No container found with this mark, so there is nothing to do.\n");
662 DLOG(
"Found mark on con = %p. Removing it now.\n", current);
667 if (strcmp(mark->
name, name) != 0)
695 if (store_match != NULL)
696 *store_match = match;
704 TAILQ_FOREACH(child, &(con->floating_head), floating_windows) {
708 if (store_match != NULL)
709 *store_match = match;
790 int children_with_percent = 0;
794 ++children_with_percent;
800 if (children_with_percent != children) {
803 if (children_with_percent == 0)
804 total += (child->
percent = 1.0);
806 total += (child->
percent = total / children_with_percent);
815 child->
percent = 1.0 / children;
816 }
else if (total != 1.0) {
829 if (con->
type == CT_WORKSPACE) {
830 DLOG(
"You cannot make a workspace fullscreen.\n");
834 DLOG(
"toggling fullscreen for %p / %s\n", con, con->
name);
863 DLOG(
"Setting _NET_WM_STATE_FULLSCREEN for con = %p / window = %d.\n", con, con->
window->
id);
866 DLOG(
"Removing _NET_WM_STATE_FULLSCREEN for con = %p / window = %d.\n", con, con->
window->
id);
883 if (con->
type == CT_WORKSPACE) {
884 DLOG(
"You cannot make a workspace fullscreen.\n");
891 DLOG(
"enabling global fullscreen for %p / %s\n", con, con->
name);
893 DLOG(
"enabling fullscreen for %p / %s\n", con, con->
name);
896 DLOG(
"fullscreen already enabled for %p / %s\n", con, con->
name);
904 if (fullscreen == NULL)
906 if (fullscreen != NULL)
914 if (fullscreen_mode ==
CF_GLOBAL && cur_ws != con_ws)
917 if (fullscreen_mode !=
CF_GLOBAL && cur_ws != con_ws)
929 if (con->
type == CT_WORKSPACE) {
930 DLOG(
"You cannot make a workspace fullscreen.\n");
934 DLOG(
"disabling fullscreen for %p / %s\n", con, con->
name);
937 DLOG(
"fullscreen already disabled for %p / %s\n", con, con->
name);
945 Con *orig_target = target;
950 LOG(
"Cannot move out of a fullscreen container.\n");
955 DLOG(
"Container is floating, using parent instead.\n");
961 if (con->
type == CT_WORKSPACE) {
964 while (!
TAILQ_EMPTY(&(source_ws->floating_head))) {
975 ELOG(
"Workspace failed to move its contents into a container!\n");
981 bool urgent = con->
urgent;
995 if (target->
type != CT_WORKSPACE) {
996 DLOG(
"target originally = %p / %s / type %d\n", target, target->
name, target->
type);
1004 if (floatingcon != NULL) {
1005 DLOG(
"floatingcon, going up even further\n");
1006 target = floatingcon->
parent;
1009 if (con->
type == CT_FLOATING_CON) {
1011 DLOG(
"This is a floating window, using workspace %p / %s\n", ws, ws->
name);
1015 if (source_output != dest_output) {
1018 if (fix_coordinates && con->
type == CT_FLOATING_CON) {
1021 DLOG(
"Not fixing coordinates, fix_coordinates flag = %d\n", fix_coordinates);
1046 DLOG(
"Re-attaching container to %p / %s\n", target, target->
name);
1050 _con_attach(con, target, behind_focused ? NULL : orig_target, !behind_focused);
1086 if (!ignore_focus && source_ws == current_ws)
1092 xcb_get_property_cookie_t cookie;
1093 xcb_get_property_reply_t *startup_id_reply;
1101 cookie = xcb_get_property(
conn,
false, child->
window->
id,
1102 A__NET_STARTUP_ID, XCB_GET_PROPERTY_TYPE_ANY, 0, 512);
1103 startup_id_reply = xcb_get_property_reply(
conn, cookie, NULL);
1106 if (sequence != NULL)
1112 cookie = xcb_get_property(
conn,
false, con->
window->
id,
1113 A__NET_STARTUP_ID, XCB_GET_PROPERTY_TYPE_ANY, 0, 512);
1114 startup_id_reply = xcb_get_property_reply(
conn, cookie, NULL);
1117 if (sequence != NULL)
1127 CALL(parent, on_remove_child);
1140 if (target == NULL) {
1141 DLOG(
"found no container with mark \"%s\"\n", mark);
1147 DLOG(
"target container is floating, moving container to target's workspace.\n");
1152 if (con->
type == CT_WORKSPACE) {
1153 DLOG(
"target container is a workspace, simply moving the container there.\n");
1162 DLOG(
"target is a split container, descending to the currently focused child.\n");
1166 if (con == target || con == target->
parent) {
1167 DLOG(
"cannot move the container to or inside itself, aborting.\n");
1195 assert(workspace->
type == CT_WORKSPACE);
1198 if (workspace == source_ws) {
1199 DLOG(
"Not moving, already there\n");
1204 _con_move_to_con(con, target,
true, fix_coordinates, dont_warp, ignore_focus);
1216 DLOG(
"Moving con %p to output %s\n", con, output->
name);
1239 DLOG(
"Someone called con_orientation() on a con with L_DEFAULT, this is a bug in the code.\n");
1245 DLOG(
"con_orientation() called on dockarea/output (%d) container %p\n", con->
layout, con);
1250 DLOG(
"con_orientation() ran into default\n");
1265 if (con->
type == CT_FLOATING_CON) {
1266 DLOG(
"selecting next for CT_FLOATING_CON\n");
1268 DLOG(
"next = %p\n", next);
1270 next =
TAILQ_PREV(con, floating_head, floating_windows);
1271 DLOG(
"using prev, next = %p\n", next);
1276 DLOG(
"no more floating containers for next = %p, restoring workspace focus\n", next);
1280 DLOG(
"skipping container itself, we want the next client\n");
1284 if (next ==
TAILQ_END(&(ws->focus_head))) {
1285 DLOG(
"Focus list empty, returning ws\n");
1298 DLOG(
"selecting workspace for dock client\n");
1306 DLOG(
"Using first entry %p\n", first);
1330 DLOG(
"con_get_next(way=%c, orientation=%d)\n", way, orientation);
1334 DLOG(
"need to go one level further up\n");
1336 LOG(
"that's a workspace, we can't go further up\n");
1347 if (next ==
TAILQ_END(&(parent->nodes_head)))
1352 if (next ==
TAILQ_END(&(cur->nodes_head)))
1355 DLOG(
"next = %p\n", next);
1390 if (child->
type == CT_FLOATING_CON)
1396 }
while (before != next && next !=
focused);
1411 DLOG(
"con_descend_direction(%p, orientation %d, direction %d)\n", con, orientation, direction);
1413 if (orientation ==
HORIZ) {
1419 most =
TAILQ_LAST(&(con->nodes_head), nodes_head);
1420 }
else if (orientation ==
VERT) {
1425 if (current->
type != CT_FLOATING_CON) {
1437 if (direction ==
D_UP || direction ==
D_DOWN) {
1438 if (orientation ==
VERT) {
1441 if (direction ==
D_UP)
1442 most =
TAILQ_LAST(&(con->nodes_head), nodes_head);
1445 }
else if (orientation ==
HORIZ) {
1450 if (current->
type != CT_FLOATING_CON) {
1476 return (
Rect){0, 0, 0, 0};
1491 DLOG(
"Effective border width is set to: %d\n", border_width);
1495 return (
Rect){0, 0, 0, 0};
1497 result = (
Rect){border_width, 0, -(2 * border_width), -(border_width)};
1499 result = (
Rect){border_width, border_width, -(2 * border_width), -(2 * border_width)};
1504 result.
x -= border_width;
1505 result.
width += border_width;
1508 result.
width += border_width;
1511 result.
y -= border_width;
1512 result.
height += border_width;
1515 result.
height += border_width;
1556 DLOG(
"this one is fullscreen! overriding BS_NONE\n");
1590 DLOG(
"This is a floating container\n");
1598 parent->
rect.
y += deco_height;
1609 parent->
rect.
y -= deco_height;
1620 DLOG(
"con_set_layout(%p, %d), con->type = %d\n",
1621 con, layout, con->
type);
1626 if (con->
type != CT_WORKSPACE)
1639 if (con->
type == CT_WORKSPACE &&
1642 DLOG(
"Setting workspace_layout to %d\n", layout);
1645 DLOG(
"Creating new split container\n");
1659 if (old_focused ==
TAILQ_END(&(con->focus_head)))
1661 if (old_focused != NULL &&
1666 DLOG(
"Moving cons\n");
1675 DLOG(
"Attaching new split to ws\n");
1715 if (con->
type != CT_WORKSPACE)
1717 DLOG(
"con_toggle_layout(%p, %s), parent = %p\n", con, toggle_mode, parent);
1719 if (strcmp(toggle_mode,
"split") == 0) {
1735 if (strcmp(toggle_mode,
"all") == 0)
1740 if (strcmp(toggle_mode,
"all") == 0) {
1762 DLOG(
"on_remove_child\n");
1766 if (con->
type == CT_OUTPUT ||
1767 con->
type == CT_ROOT ||
1768 con->
type == CT_DOCKAREA ||
1770 DLOG(
"not handling, type = %d, name = %s\n", con->
type, con->
name);
1775 if (con->
type == CT_WORKSPACE) {
1777 LOG(
"Closing old workspace (%p / %s), it is empty\n", con, con->
name);
1781 const unsigned char *payload;
1783 y(get_buf, &payload, &length);
1784 ipc_send_event(
"workspace", I3_IPC_EVENT_WORKSPACE, (
const char *)payload);
1798 if (children == 0) {
1799 DLOG(
"Container empty, closing\n");
1811 DLOG(
"Determining minimum size for con %p\n", con);
1814 DLOG(
"leaf node, returning 75x50\n");
1815 return (
Rect){0, 0, 75, 50};
1818 if (con->
type == CT_FLOATING_CON) {
1819 DLOG(
"floating con\n");
1825 uint32_t max_width = 0, max_height = 0, deco_height = 0;
1830 max_width =
max(max_width, min.
width);
1831 max_height =
max(max_height, min.
height);
1833 DLOG(
"stacked/tabbed now, returning %d x %d + deco_rect = %d\n",
1834 max_width, max_height, deco_height);
1835 return (
Rect){0, 0, max_width, max_height + deco_height};
1854 DLOG(
"split container, returning width = %d x height = %d\n", width,
height);
1858 ELOG(
"Unhandled case, type = %d, layout = %d, split = %d\n",
1900 if (fs->
type == CT_WORKSPACE)
1959 if (con->
type == CT_WORKSPACE)
1962 bool new_urgency_value = con->
urgent;
1963 while (parent && parent->
type != CT_WORKSPACE && parent->
type != CT_DOCKAREA) {
1964 if (new_urgency_value) {
1981 if (urgent &&
focused == con) {
1982 DLOG(
"Ignoring urgency flag for current client\n");
1986 const bool old_urgent = con->
urgent;
1991 DLOG(
"Discarding urgency WM_HINT because timer is running\n");
2011 if (con->
urgent != old_urgent) {
2012 LOG(
"Urgency flag changed to %d\n", con->
urgent);
2055 ELOG(
"BUG: Code not updated to account for new layout type\n");
2066 (
TAILQ_FIRST(&(con->nodes_head)) == child ?
"" :
" "), child_txt);
2077 return complete_buf;
2099 instance =
sstrdup(
"i3-frame");
2107 {.
name =
"%title", .value = title},
2108 {.name =
"%class", .value =
class},
2109 {.name =
"%instance", .value = instance}};
2110 const size_t num =
sizeof(placeholders) /
sizeof(
placeholder_t);
2115 FREE(formatted_str);
2117 for (
size_t i = 0; i < num; i++) {
2118 FREE(placeholders[i].value);
Rect con_border_style_rect(Con *con)
Returns a "relative" Rect which contains the amount of pixels that need to be added to the original R...
void con_fix_percent(Con *con)
Updates the percent attribute of the children of the given container.
int con_num_visible_children(Con *con)
Returns the number of visible non-floating children of this container.
bool con_move_to_mark(Con *con, const char *mark)
Moves the given container to the given mark.
void con_detach(Con *con)
Detaches the given container from its current parent.
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
Rect con_minimum_size(Con *con)
Determines the minimum size of the given con by looking at its children (for split/stacked/tabbed con...
bool tree_close_internal(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool force_set_focus)
Closes the given container including all children.
char * format_placeholders(char *format, placeholder_t *placeholders, int num)
Replaces occurrences of the defined placeholders in the format string.
void xcb_remove_property_atom(xcb_connection_t *conn, xcb_window_t window, xcb_atom_t property, xcb_atom_t atom)
Remove an atom from a list of atoms the given property defines without removing any other potentially...
void ipc_send_window_event(const char *property, Con *con)
For the window events we send, along the usual "change" field, also the window container, in "container".
Rect rect_sub(Rect a, Rect b)
void workspace_show(Con *workspace)
Switches to the given workspace.
#define TAILQ_LAST(head, headname)
int num
the workspace number, if this Con is of type CT_WORKSPACE and the workspace is not a named workspace ...
layout_t workspace_layout
#define TAILQ_ENTRY(type)
Stores internal information about a startup sequence, like the workspace it was initiated on...
void ipc_send_event(const char *event, uint32_t message_type, const char *payload)
Sends the specified event to all IPC clients which are currently connected and subscribed to this kin...
bool con_has_mark(Con *con, const char *mark)
Returns true if and only if the given containers holds the mark.
#define TAILQ_NEXT(elm, field)
void con_move_to_output(Con *con, Output *output)
Moves the given container to the currently focused container on the visible workspace on the given ou...
uint16_t depth
Depth of the window.
#define TAILQ_PREV(elm, headname, field)
Con * workspace_encapsulate(Con *ws)
Creates a new container and re-parents all of children from the given workspace into it...
void x_set_warp_to(Rect *rect)
Set warp_to coordinates.
Con * con_new_skeleton(Con *parent, i3Window *window)
Create a new container (and attach it to the given parent, if not NULL).
layout_t last_split_layout
fullscreen_mode_t
Fullscreen modes.
#define TAILQ_HEAD(name, type)
int con_num_windows(Con *con)
Count the number of windows (i.e., leaf containers).
bool workspace_is_visible(Con *ws)
Returns true if the workspace is currently visible.
fullscreen_mode_t fullscreen_mode
void con_focus(Con *con)
Sets input focus to the given container.
An Output is a physical output on your graphics driver.
bool match_matches_window(Match *match, i3Window *window)
Check if a match data structure matches the given window.
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
layout_t
Container layouts.
void xcb_add_property_atom(xcb_connection_t *conn, xcb_window_t window, xcb_atom_t property, xcb_atom_t atom)
Add an atom to a list of atoms the given property defines.
char * workspace
workspace on which this startup was initiated
Con * output_get_content(Con *output)
Returns the output container below the given output container.
void con_unmark(Con *con, const char *name)
void startup_sequence_delete(struct Startup_Sequence *sequence)
Deletes a startup sequence, ignoring whether its timeout has elapsed.
int render_deco_height(void)
i3String * i3string_from_utf8(const char *from_utf8)
Build an i3String from an UTF-8 encoded string.
void x_con_init(Con *con)
Initializes the X11 part for the given container.
Con * con_inside_floating(Con *con)
Checks if the given container is either floating or inside some floating container.
Con * con_by_window_id(xcb_window_t window)
Returns the container with the given client window ID or NULL if no such container exists...
Stores a rectangle, for example the size of a window, the child window etc.
void con_mark(Con *con, const char *mark, mark_mode_t mode)
Assigns a mark to the container.
#define TAILQ_INSERT_TAIL(head, elm, field)
static void con_on_remove_child(Con *con)
#define CALL(obj, member,...)
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
void con_mark_toggle(Con *con, const char *mark, mark_mode_t mode)
Toggles the mark on a container.
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
const char * i3string_as_utf8(i3String *str)
Returns the UTF-8 encoded version of the i3String.
void con_toggle_fullscreen(Con *con, int fullscreen_mode)
Toggles fullscreen mode for the given container.
xcb_connection_t * conn
XCB connection and root screen.
#define TAILQ_HEAD_INITIALIZER(head)
hide_edge_borders_mode_t hide_edge_borders
Remove borders if they are adjacent to the screen edge.
#define TAILQ_FOREACH(var, head, field)
void floating_fix_coordinates(Con *con, Rect *old_rect, Rect *new_rect)
Fixes the coordinates of the floating window whenever the window gets reassigned to a different outpu...
Con * con_get_workspace(Con *con)
Gets the workspace container this node is on.
Con * con_get_output(Con *con)
Gets the output container (first container with CT_OUTPUT in hierarchy) this node is on...
int con_num_children(Con *con)
Returns the number of children of this container.
bool con_is_floating(Con *con)
Returns true if the node is floating.
int sasprintf(char **strp, const char *fmt,...)
Safe-wrapper around asprintf which exits if it returns -1 (meaning that there is no more memory avail...
Con * con_next_focused(Con *con)
Returns the container which will be focused next when the given container is not available anymore...
kill_window_t
parameter to specify whether tree_close_internal() and x_window_kill() should kill only this specific...
adjacent_t con_adjacent_borders(Con *con)
Returns adjacent borders of the window.
void workspace_update_urgent_flag(Con *ws)
Goes through all clients on the given workspace and updates the workspace’s urgent flag accordingly...
#define TAILQ_FIRST(head)
orientation_t con_orientation(Con *con)
Returns the orientation of the given container (for stacked containers, vertical orientation is used ...
bool con_is_docked(Con *con)
Returns true if the container is a docked container.
void * scalloc(size_t num, size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
static bool _con_move_to_con(Con *con, Con *target, bool behind_focused, bool fix_coordinates, bool dont_warp, bool ignore_focus)
static void _con_attach(Con *con, Con *parent, Con *previous, bool ignore_focus)
Con * con_by_frame_id(xcb_window_t frame)
Returns the container with the given frame ID or NULL if no such container exists.
A "match" is a data structure which acts like a mask or expression to match certain windows or not...
border_style_t border_style
void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool dont_warp, bool ignore_focus)
Moves the given container to the currently focused container on the given workspace.
#define TAILQ_REMOVE(head, elm, field)
bool con_has_managed_window(Con *con)
Returns true when this con is a leaf node with a managed X11 window (e.g., excluding dock containers)...
bool con_accepts_window(Con *con)
Returns true if this node accepts a window (if the node swallows windows, it might already have swall...
void con_set_urgency(Con *con, bool urgent)
Set urgency flag to the container, all the parent containers and the workspace.
bool con_is_split(Con *con)
Returns true if a container should be considered split.
bool con_is_internal(Con *con)
Returns true if the container is internal, such as __i3_scratch.
bool con_fullscreen_permits_focusing(Con *con)
Returns true if changing the focus to con would be allowed considering the fullscreen focus constrain...
bool font_is_pango(void)
Returns true if and only if the current font is a pango font.
Con * con
Pointer to the Con which represents this output.
border_style_t default_border
The default border style for new windows.
Rect rect_add(Rect a, Rect b)
bool con_is_sticky(Con *con)
Returns whether the container or any of its children is sticky.
struct Startup_Sequence * startup_sequence_get(i3Window *cwindow, xcb_get_property_reply_t *startup_id_reply, bool ignore_mapped_leader)
Gets the stored startup sequence for the _NET_STARTUP_ID of a given window.
Con * con_for_window(Con *con, i3Window *window, Match **store_match)
Returns the first container below 'con' which wants to swallow this window TODO: priority.
void ewmh_update_wm_desktop(void)
Updates _NET_WM_DESKTOP for all windows.
A 'Window' is a type which contains an xcb_window_t and all the related information (hints like _NET_...
void tree_flatten(Con *con)
tree_flatten() removes pairs of redundant split containers, e.g.
yajl_gen ipc_marshal_workspace_event(const char *change, Con *current, Con *old)
Generates a json workspace event.
void con_set_layout(Con *con, layout_t layout)
This function changes the layout of a given container.
struct all_cons_head all_cons
bool con_has_children(Con *con)
Returns true if this node has regular or floating children.
char * con_get_tree_representation(Con *con)
Create a string representing the subtree under con.
void con_disable_fullscreen(Con *con)
Disables fullscreen mode for the given container, if necessary.
char * pango_escape_markup(char *input)
Escapes the given string if a pango font is currently used.
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
int default_floating_border_width
void * smalloc(size_t size)
Safe-wrapper around malloc which exits if malloc returns NULL (meaning that there is no more memory a...
Con * con_by_mark(const char *mark)
Returns the container with the given mark or NULL if no such container exists.
void con_toggle_layout(Con *con, const char *toggle_mode)
This function toggles the layout of a given container.
Helper structure for usage in format_placeholders().
Con * con_get_next(Con *con, char way, orientation_t orientation)
Get the next/previous container in the specified orientation.
int con_border_style(Con *con)
Use this function to get a container’s border style.
static void con_set_fullscreen_mode(Con *con, fullscreen_mode_t fullscreen_mode)
Con * con_new(Con *parent, i3Window *window)
Con * con_descend_direction(Con *con, direction_t direction)
A 'Con' represents everything from the X11 root window down to a single X11 window.
void con_enable_fullscreen(Con *con, fullscreen_mode_t fullscreen_mode)
Enables fullscreen mode for the given container, if necessary.
struct timeval urgent
When this window was marked urgent.
#define GREP_FIRST(dest, head, condition)
enum Con::@21 floating
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whet...
void con_set_border_style(Con *con, int border_style, int border_width)
Sets the given border style on con, correctly keeping the position/size of a floating window...
void con_close(Con *con, kill_window_t kill_window)
Closes the given container.
bool con_has_urgent_child(Con *con)
Checks if the given container has an urgent child.
struct ev_timer * urgency_timer
Con * con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode)
Returns the first fullscreen node below this node.
Con * con_parent_with_orientation(Con *con, orientation_t orientation)
Searches parenst of the given 'con' until it reaches one with the specified 'orientation'.
void i3string_set_markup(i3String *str, bool pango_markup)
Set whether the i3String should use Pango markup.
char * name
Name of the output.
void con_attach(Con *con, Con *parent, bool ignore_focus)
Attaches the given container to the given parent.
Con * con_descend_tiling_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
struct _i3String i3String
Opaque data structure for storing strings.
#define TAILQ_EMPTY(head)
i3String * name
The name of the window.
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
void con_force_split_parents_redraw(Con *con)
force parent split containers to be redrawn
char * title_format
The format with which the window's name should be displayed.
#define TAILQ_INSERT_HEAD(head, elm, field)
i3String * con_parse_title_format(Con *con)
Returns the window title considering the current title format.
void con_update_parents_urgency(Con *con)
Make all parent containers urgent if con is urgent or clear the urgent flag of all parent containers ...
Con * workspace_attach_to(Con *ws)
Called when a new con (with a window, not an empty or split con) should be attached to the workspace ...
bool con_inside_focused(Con *con)
Checks if the given container is inside a focused container.
bool con_is_hidden(Con *con)
This will only return true for containers which have some parent with a tabbed / stacked parent of wh...
adjacent_t
describes if the window is adjacent to the output (physical screen) edges.