49 DLOG(
"Rendering node %p / %s / layout %d / children %d\n", con, con->
name,
52 if (con->
type == CT_WORKSPACE) {
62 params.
x += gaps.
left;
103 DLOG(
"bsr at %dx%d with size %dx%d\n",
122 DLOG(
"child will be at %dx%d with size %dx%d\n",
127 Con *fullscreen = NULL;
128 if (con->
type != CT_OUTPUT) {
141 if (con->
type != CT_ROOT) {
157 }
else if (con->
type == CT_ROOT) {
176 DLOG(
"child at (%d, %d) with (%d x %d)\n",
230 int i = 0, assigned = 0;
234 assigned += sizes[i++] = lround(percentage * total);
236 assert(assigned == total ||
237 (assigned > total && assigned - total <= p->children * 2) ||
238 (assigned < total && total - assigned <= p->children * 2));
239 int signal = assigned < total ? 1 : -1;
240 while (assigned != total) {
241 for (i = 0; i < p->
children && assigned != total; ++i) {
262 DLOG(
"Rendering floating windows:\n");
268 if (!content ||
TAILQ_EMPTY(&(content->focus_head))) {
269 DLOG(
"Skipping this output because it is currently being destroyed.\n");
275 TAILQ_FOREACH (child, &(workspace->floating_head), floating_windows) {
276 if (fullscreen != NULL) {
288 DLOG(
"Rendering floating child even though in fullscreen mode: "
289 "floating->transient_for (0x%08x) --> fullscreen->id (0x%08x)\n",
295 DLOG(
"floating child at (%d,%d) with %d x %d\n",
309 Con *child, *dockchild;
319 if (child->
type == CT_CON) {
320 if (content != NULL) {
321 DLOG(
"More than one CT_CON on output container\n");
325 }
else if (child->
type != CT_DOCKAREA) {
326 DLOG(
"Child %p of type %d is inside the OUTPUT con\n", child, child->
type);
331 if (content == NULL) {
332 DLOG(
"Skipping this output because it is currently being destroyed.\n");
341 DLOG(
"Skipping this output because it is currently being destroyed.\n");
355 if (child->
type != CT_DOCKAREA)
368 if (child->
type == CT_CON) {
386 DLOG(
"child at (%d, %d) with (%d x %d)\n",
void x_raise_con(Con *con)
Raises the specified container in the internal stack of X windows.
Rect rect_add(Rect a, Rect b)
Rect rect_sanitize_dimensions(Rect rect)
void render_con(Con *con)
"Renders" the given container (and its children), meaning that all rects are updated correctly.
int render_deco_height(void)
Returns the height for the decorations.
static void render_con_stacked(Con *con, Con *child, render_params *p, int i)
static void render_output(Con *con)
static void render_root(Con *con, Con *fullscreen)
static void render_con_dockarea(Con *con, Con *child, render_params *p)
static int * precalculate_sizes(Con *con, render_params *p)
static void render_con_split(Con *con, Con *child, render_params *p, int i)
static void render_con_tabbed(Con *con, Con *child, render_params *p, int i)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
gaps_t calculate_effective_gaps(Con *con)
Calculates the effective gap sizes for a container.
bool gaps_has_adjacent_container(Con *con, direction_t direction)
bool gaps_should_inset_con(Con *con, int children)
Con * con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode)
Returns the first fullscreen node below this node.
bool con_find_transient_for_window(Con *start, xcb_window_t target)
Start from a container and traverse the transient_for linked list.
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...
Con * con_get_fullscreen_covering_ws(Con *ws)
Returns the fullscreen node that covers the given workspace if it exists.
uint32_t con_rect_size_in_orientation(Con *con)
Returns given container's rect size depending on its orientation.
bool con_is_internal(Con *con)
Returns true if the container is internal, such as __i3_scratch.
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
int con_num_children(Con *con)
Returns the number of children of this container.
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
#define TAILQ_EMPTY(head)
void * smalloc(size_t size)
Safe-wrapper around malloc which exits if malloc returns NULL (meaning that there is no more memory a...
enum Config::@6 popup_during_fullscreen
What should happen when a new popup is opened during fullscreen mode.
Stores a rectangle, for example the size of a window, the child window etc.
xcb_window_t transient_for
A 'Con' represents everything from the X11 root window down to a single X11 window.
border_style_t border_style
struct Rect geometry
the geometry this window requested when getting mapped
fullscreen_mode_t fullscreen_mode
int height
The height of the font, built from font_ascent + font_descent.
This is used to keep a state to pass around when rendering a con in render_con().