47 DLOG(
"Rendering node %p / %s / layout %d / children %d\n", con, con->
name,
73 DLOG(
"child will be at %dx%d with size %dx%d\n", inset->
x, inset->
y, inset->
width, inset->
height);
77 Con *fullscreen = NULL;
78 if (con->
type != CT_OUTPUT) {
91 if (con->
type != CT_ROOT) {
107 }
else if (con->
type == CT_ROOT) {
124 DLOG(
"child at (%d, %d) with (%d x %d)\n",
165 int i = 0, assigned = 0;
169 assigned += sizes[i++] = lround(percentage * total);
171 assert(assigned == total ||
172 (assigned > total && assigned - total <= p->children * 2) ||
173 (assigned < total && total - assigned <= p->children * 2));
174 int signal = assigned < total ? 1 : -1;
175 while (assigned != total) {
176 for (i = 0; i < p->
children && assigned != total; ++i) {
197 DLOG(
"Rendering floating windows:\n");
204 DLOG(
"Skipping this output because it is currently being destroyed.\n");
211 if (fullscreen != NULL) {
222 Con *transient_con = floating_child;
223 bool is_transient_for =
false;
224 while (transient_con != NULL &&
225 transient_con->
window != NULL &&
227 DLOG(
"transient_con = 0x%08x, transient_con->window->transient_for = 0x%08x, fullscreen_id = 0x%08x\n",
230 is_transient_for =
true;
234 if (next_transient == NULL)
239 if (transient_con == next_transient)
241 transient_con = next_transient;
244 if (!is_transient_for)
247 DLOG(
"Rendering floating child even though in fullscreen mode: " 248 "floating->transient_for (0x%08x) --> fullscreen->id (0x%08x)\n",
252 DLOG(
"floating child at (%d,%d) with %d x %d\n",
266 Con *child, *dockchild;
276 if (child->
type == CT_CON) {
277 if (content != NULL) {
278 DLOG(
"More than one CT_CON on output container\n");
282 }
else if (child->
type != CT_DOCKAREA) {
283 DLOG(
"Child %p of type %d is inside the OUTPUT con\n", child, child->
type);
288 if (content == NULL) {
289 DLOG(
"Skipping this output because it is currently being destroyed.\n");
298 DLOG(
"Skipping this output because it is currently being destroyed.\n");
312 if (child->
type != CT_DOCKAREA)
324 if (child->
type == CT_CON) {
342 DLOG(
"child at (%d, %d) with (%d x %d)\n",
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...
This is used to keep a state to pass around when rendering a con in render_con(). ...
static void render_root(Con *con, Con *fullscreen)
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_EMPTY(head)
static void render_con_dockarea(Con *con, Con *child, render_params *p)
void x_raise_con(Con *con)
Raises the specified container in the internal stack of X windows.
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
static void render_con_stacked(Con *con, Con *child, render_params *p, int i)
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
Stores a rectangle, for example the size of a window, the child window etc.
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...
static void render_output(Con *con)
void render_con(Con *con)
"Renders" the given container (and its children), meaning that all rects are updated correctly...
A 'Con' represents everything from the X11 root window down to a single X11 window.
#define TAILQ_FIRST(head)
int con_num_children(Con *con)
Returns the number of children of this container.
xcb_window_t transient_for
fullscreen_mode_t fullscreen_mode
enum Config::@8 popup_during_fullscreen
What should happen when a new popup is opened during fullscreen mode.
bool con_is_internal(Con *con)
Returns true if the container is internal, such as __i3_scratch.
Con * output_get_content(Con *output)
Returns the output container below the given output container.
border_style_t border_style
Rect rect_add(Rect a, Rect b)
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
static void render_con_split(Con *con, Con *child, render_params *p, int i)
static int * precalculate_sizes(Con *con, render_params *p)
int height
The height of the font, built from font_ascent + font_descent.
struct Rect geometry
the geometry this window requested when getting mapped
static void render_con_tabbed(Con *con, Con *child, render_params *p, int i)
uint32_t con_rect_size_in_orientation(Con *con)
Returns given container's rect size depending on its orientation.
Con * con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode)
Returns the first fullscreen node below this node.
int render_deco_height(void)
Returns the height for the decorations.
Con * con_get_fullscreen_covering_ws(Con *ws)
Returns the fullscreen node that covers the given workspace if it exists.
#define TAILQ_FOREACH(var, head, field)