49 DLOG(
"Rendering node %p / %s / layout %d / children %d\n", con, con->
name,
77 DLOG(
"child will be at %dx%d with size %dx%d\n", inset->
x, inset->
y, inset->
width, inset->
height);
81 Con *fullscreen = NULL;
82 if (con->
type != CT_OUTPUT) {
95 if (con->
type != CT_ROOT) {
111 }
else if (con->
type == CT_ROOT) {
130 DLOG(
"child at (%d, %d) with (%d x %d)\n",
172 int i = 0, assigned = 0;
176 assigned += sizes[i++] = lround(percentage * total);
178 assert(assigned == total ||
179 (assigned > total && assigned - total <= p->children * 2) ||
180 (assigned < total && total - assigned <= p->children * 2));
181 int signal = assigned < total ? 1 : -1;
182 while (assigned != total) {
183 for (i = 0; i < p->
children && assigned != total; ++i) {
204 DLOG(
"Rendering floating windows:\n");
210 if (!content ||
TAILQ_EMPTY(&(content->focus_head))) {
211 DLOG(
"Skipping this output because it is currently being destroyed.\n");
217 TAILQ_FOREACH (child, &(workspace->floating_head), floating_windows) {
218 if (fullscreen != NULL) {
229 Con *transient_con = floating_child;
230 bool is_transient_for =
false;
231 while (transient_con != NULL &&
232 transient_con->
window != NULL &&
234 DLOG(
"transient_con = 0x%08x, transient_con->window->transient_for = 0x%08x, fullscreen_id = 0x%08x\n",
237 is_transient_for =
true;
241 if (next_transient == NULL)
246 if (transient_con == next_transient)
248 transient_con = next_transient;
251 if (!is_transient_for)
254 DLOG(
"Rendering floating child even though in fullscreen mode: "
255 "floating->transient_for (0x%08x) --> fullscreen->id (0x%08x)\n",
259 DLOG(
"floating child at (%d,%d) with %d x %d\n",
273 Con *child, *dockchild;
283 if (child->
type == CT_CON) {
284 if (content != NULL) {
285 DLOG(
"More than one CT_CON on output container\n");
289 }
else if (child->
type != CT_DOCKAREA) {
290 DLOG(
"Child %p of type %d is inside the OUTPUT con\n", child, child->
type);
295 if (content == NULL) {
296 DLOG(
"Skipping this output because it is currently being destroyed.\n");
305 DLOG(
"Skipping this output because it is currently being destroyed.\n");
319 if (child->
type != CT_DOCKAREA)
332 if (child->
type == CT_CON) {
350 DLOG(
"child at (%d, %d) with (%d x %d)\n",
Con * con_get_fullscreen_covering_ws(Con *ws)
Returns the fullscreen node that covers the given workspace if it exists.
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.
Con * con_get_fullscreen_con(Con *con, fullscreen_mode_t fullscreen_mode)
Returns the first fullscreen node below this node.
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
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...
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 * 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 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.
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().