50 DLOG(
"Rendering node %p / %s / layout %d / children %d\n", con, con->
name,
53 if (con->
type == CT_WORKSPACE) {
63 params.
x += gaps.
left;
104 DLOG(
"bsr at %dx%d with size %dx%d\n",
123 DLOG(
"child will be at %dx%d with size %dx%d\n",
128 Con *fullscreen = NULL;
129 if (con->
type != CT_OUTPUT) {
142 if (con->
type != CT_ROOT) {
159 }
else if (con->
type == CT_ROOT) {
178 DLOG(
"child at (%d, %d) with (%d x %d)\n",
233 int i = 0, assigned = 0;
237 assigned += sizes[i++] = lround(percentage * total);
239 assert(assigned == total ||
240 (assigned > total && assigned - total <= p->children * 2) ||
241 (assigned < total && total - assigned <= p->children * 2));
242 int signal = assigned < total ? 1 : -1;
243 while (assigned != total) {
244 for (i = 0; i < p->
children && assigned != total; ++i) {
254 if (fullscreen == NULL) {
261 case PDF_LEAVE_FULLSCREEN:
265 return fullscreen->
window == NULL ||
285 DLOG(
"Rendering floating windows:\n");
292 if (!content ||
TAILQ_EMPTY(&(content->focus_head))) {
293 DLOG(
"Skipping this output because it is currently being destroyed.\n");
299 TAILQ_FOREACH (child, &(workspace->floating_head), floating_windows) {
303 DLOG(
"floating child at (%d,%d) with %d x %d\n",
317 Con *child, *dockchild;
327 if (child->
type == CT_CON) {
328 if (content != NULL) {
329 DLOG(
"More than one CT_CON on output container\n");
333 }
else if (child->
type != CT_DOCKAREA) {
334 DLOG(
"Child %p of type %d is inside the OUTPUT con\n", child, child->
type);
339 if (content == NULL) {
340 DLOG(
"Skipping this output because it is currently being destroyed.\n");
349 DLOG(
"Skipping this output because it is currently being destroyed.\n");
363 if (child->
type != CT_DOCKAREA) {
377 if (child->
type == CT_CON) {
395 DLOG(
"child at (%d, %d) with (%d x %d)\n",
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.
bool con_has_parent(Con *con, Con *parent)
Checks if the container has the given parent as an actual parent.
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
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 * output_get_content(Con *output)
Returns the output container below the given output container.
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 bool fullscreen_blocks_floating_render(Con *fullscreen, Con *floating)
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)
Rect rect_add(Rect a, Rect b)
Rect rect_sanitize_dimensions(Rect rect)
void x_raise_con(Con *con)
Raises the specified container in the internal stack of X windows.
void * smalloc(size_t size)
Safe-wrapper around malloc which exits if malloc returns NULL (meaning that there is no more memory a...
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
#define TAILQ_EMPTY(head)
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.
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().