16#define MAX(x, y) ((x) > (y) ? (x) : (y))
89static con_state *state_for_frame(xcb_window_t window) {
92 if (
state->id == window) {
98 ELOG(
"No state found for window 0x%08x\n", window);
109 if (new_focus == old_focus) {
115 if (new_focus != XCB_WINDOW_NONE) {
119 if (old_focus != XCB_WINDOW_NONE) {
137 xcb_colormap_t win_colormap;
140 win_colormap = xcb_generate_id(
conn);
141 xcb_create_colormap(
conn, XCB_COLORMAP_ALLOC_NONE, win_colormap,
root, visual);
153 mask |= XCB_CW_BACK_PIXEL;
156 mask |= XCB_CW_BORDER_PIXEL;
160 mask |= XCB_CW_OVERRIDE_REDIRECT;
164 mask |= XCB_CW_EVENT_MASK;
167 mask |= XCB_CW_COLORMAP;
168 values[4] = win_colormap;
170 Rect dims = {-15, -15, 10, 10};
173 xcb_change_property(
conn,
174 XCB_PROP_MODE_REPLACE,
179 (strlen(
"i3-frame") + 1) * 2,
180 "i3-frame\0i3-frame\0");
184 state->mapped =
false;
185 state->initial =
true;
186 DLOG(
"Adding window 0x%08x to lists\n",
state->id);
190 DLOG(
"adding new state for window id 0x%08x\n",
state->id);
203 ELOG(
"window state not found\n");
207 DLOG(
"resetting state %p to initial\n",
state);
208 state->initial =
true;
209 state->child_mapped =
false;
211 memset(&(
state->window_rect), 0,
sizeof(
Rect));
222 ELOG(
"window state for con not found\n");
235 struct con_state *state_src, *state_dest;
237 if ((state_src = state_for_frame(src->
frame.
id)) == NULL) {
238 ELOG(
"window state for src not found\n");
242 if ((state_dest = state_for_frame(dest->
frame.
id)) == NULL) {
243 ELOG(
"window state for dest not found\n");
247 state_dest->
con = state_src->
con;
248 state_src->
con = NULL;
252 DLOG(
"COPYING RECT\n");
306 xcb_get_property_cookie_t cookie;
307 xcb_icccm_get_wm_protocols_reply_t protocols;
310 cookie = xcb_icccm_get_wm_protocols(
conn, window, A_WM_PROTOCOLS);
311 if (xcb_icccm_get_wm_protocols_reply(
conn, cookie, &protocols, NULL) != 1) {
316 for (uint32_t i = 0; i < protocols.atoms_len; i++) {
317 if (protocols.atoms[i] == atom) {
322 xcb_icccm_get_wm_protocols_reply_wipe(&protocols);
335 LOG(
"Killing specific window 0x%08x\n", window);
336 xcb_destroy_window(
conn, window);
338 LOG(
"Killing the X11 client which owns window 0x%08x\n", window);
339 xcb_kill_client(
conn, window);
348 xcb_client_message_event_t *ev = event;
350 ev->response_type = XCB_CLIENT_MESSAGE;
352 ev->type = A_WM_PROTOCOLS;
354 ev->data.data32[0] = A_WM_DELETE_WINDOW;
355 ev->data.data32[1] = XCB_CURRENT_TIME;
357 LOG(
"Sending WM_DELETE to the client\n");
358 xcb_send_event(
conn,
false, window, XCB_EVENT_MASK_NO_EVENT, (
char *)ev);
421 rectangles[count++] = (xcb_rectangle_t){
429 rectangles[count++] = (xcb_rectangle_t){
432 .width = -(br.
width + br.
x),
437 rectangles[count++] = (xcb_rectangle_t){
446 rectangles[count++] = (xcb_rectangle_t){
477 parent->
type == CT_OUTPUT ||
478 parent->
type == CT_DOCKAREA ||
479 con->
type == CT_FLOATING_CON) {
503 }
else if (con ==
TAILQ_FIRST(&(parent->focus_head))) {
552 if (con->
window != NULL) {
575 xcb_rectangle_t rectangles[4];
577 for (
size_t i = 0; i < rectangles_count; i++) {
582 rectangles[i].height);
605 DLOG(
"using con->frame_buffer (for con->name=%s) as dest_surface\n", con->
name);
608 DLOG(
"sticking to parent->frame_buffer = %p\n", dest_surface);
610 DLOG(
"dest_surface %p is %d x %d (id=0x%08x)\n", dest_surface, dest_surface->
width, dest_surface->
height, dest_surface->
id);
614 if (dest_surface->
id == XCB_NONE) {
632 DLOG(
"con->deco_rect = (x=%d, y=%d, w=%d, h=%d) for con->name=%s\n",
650 char *formatted_mark =
sstrdup(
"");
651 bool had_visible_mark =
false;
655 if (mark->
name[0] ==
'_') {
658 had_visible_mark =
true;
662 free(formatted_mark);
663 formatted_mark = buf;
666 if (had_visible_mark) {
672 : deco_width - mark_width - title_padding;
677 con->
deco_rect.
y + text_offset_y, mark_width);
680 mark_width += title_padding;
683 FREE(formatted_mark);
710 int total_icon_space = icon_size + 2 * icon_padding;
713 icon_size = icon_padding = total_icon_space = 0;
723 icon_offset_x = icon_padding;
724 title_offset_x = title_padding + total_icon_space;
735 icon_offset_x =
max(icon_padding, (deco_width - icon_padding - icon_size -
predict_text_width(title) - title_padding - mark_width) / 2);
736 title_offset_x =
max(title_padding, icon_offset_x + icon_padding + icon_size);
742 title_offset_x =
max(title_padding + mark_width, deco_width - title_padding -
predict_text_width(title) - total_icon_space);
744 icon_offset_x =
min(deco_width - icon_size - icon_padding - title_padding, title_offset_x +
predict_text_width(title) + icon_padding);
755 deco_width - mark_width - 2 * title_padding - total_icon_space);
792 TAILQ_FOREACH (current, &(con->floating_head), floating_windows) {
801 if ((con->
type != CT_ROOT && con->
type != CT_OUTPUT) &&
812 if (con->
window == NULL) {
818 if (should_be_hidden ==
state->is_hidden) {
822 if (should_be_hidden) {
823 DLOG(
"setting _NET_WM_STATE_HIDDEN for con = %p\n", con);
826 DLOG(
"removing _NET_WM_STATE_HIDDEN for con = %p\n", con);
830 state->is_hidden = should_be_hidden;
845 if (con_maximized_horz !=
state->is_maximized_horz) {
846 DLOG(
"setting _NET_WM_STATE_MAXIMIZED_HORZ for con %p(%s) to %d\n", con, con->
name, con_maximized_horz);
848 if (con_maximized_horz) {
854 state->is_maximized_horz = con_maximized_horz;
858 if (con_maximized_vert !=
state->is_maximized_vert) {
859 DLOG(
"setting _NET_WM_STATE_MAXIMIZED_VERT for con %p(%s) to %d\n", con, con->
name, con_maximized_vert);
861 if (con_maximized_vert) {
867 state->is_maximized_vert = con_maximized_vert;
878 xcb_shape_combine(
conn, XCB_SHAPE_SO_SET, shape_kind, shape_kind,
883 xcb_rectangle_t rectangles[4];
885 if (rectangles_count) {
886 xcb_shape_rectangles(
conn, XCB_SHAPE_SO_UNION, shape_kind,
887 XCB_CLIP_ORDERING_UNSORTED, con->
frame.
id,
888 0, 0, rectangles_count, rectangles);
898 xcb_shape_mask(
conn, XCB_SHAPE_SO_SET, shape_kind, con->
frame.
id, 0, 0, XCB_PIXMAP_NONE);
911 ELOG(
"window state for con %p not found\n",
con);
949 if (
state->name != NULL) {
953 XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, strlen(
state->name),
state->name);
960 uint32_t max_y = 0, max_height = 0;
963 if (dr->
y >= max_y && dr->
height >= max_height) {
977 bool need_reshape =
false;
982 DLOG(
"Reparenting child window\n");
987 uint32_t values[] = {XCB_NONE};
988 xcb_change_window_attributes(
conn,
state->old_frame, XCB_CW_EVENT_MASK, values);
989 xcb_change_window_attributes(
conn,
con->
window->
id, XCB_CW_EVENT_MASK, values);
994 xcb_change_window_attributes(
conn,
state->old_frame, XCB_CW_EVENT_MASK, values);
996 xcb_change_window_attributes(
conn,
con->
window->
id, XCB_CW_EVENT_MASK, values);
998 state->old_frame = XCB_NONE;
999 state->need_reparent =
false;
1002 DLOG(
"ignore_unmap for reparenting of con %p (win 0x%08x) is now %d\n",
1005 need_reshape =
true;
1022 DLOG(
"Con %p (layout %d), is_pixmap_needed = %s, rect.height = %d\n",
1029 is_pixmap_needed =
false;
1032 bool fake_notify =
false;
1052 if (is_pixmap_needed && (has_rect_changed ||
con->
frame_buffer.
id == XCB_NONE)) {
1072 DLOG(
"creating %d x %d pixmap for con %p (con->frame_buffer.id = (pixmap_t)0x%08x) (con->frame.id (drawable_t)0x%08x)\n", width, height,
con,
con->
frame_buffer.
id,
con->
frame.
id);
1120 DLOG(
"setting window rect (%d, %d, %d, %d)\n",
1134 xcb_void_cookie_t cookie;
1139 long data[] = {XCB_ICCCM_WM_STATE_NORMAL, XCB_NONE};
1141 A_WM_STATE, A_WM_STATE, 32, 2, data);
1151 xcb_change_window_attributes(
conn,
con->
window->
id, XCB_CW_EVENT_MASK, values);
1152 DLOG(
"mapping child window (serial %d)\n", cookie.sequence);
1153 state->child_mapped =
true;
1159 xcb_change_window_attributes(
conn,
con->
frame.
id, XCB_CW_EVENT_MASK, values);
1167 DLOG(
"mapping container %08x (serial %d)\n",
con->
frame.
id, cookie.sequence);
1175 DLOG(
"Sending fake configure notify\n");
1208 if (
state->unmap_now) {
1209 xcb_void_cookie_t cookie;
1212 long data[] = {XCB_ICCCM_WM_STATE_WITHDRAWN, XCB_NONE};
1214 A_WM_STATE, A_WM_STATE, 32, 2, data);
1218 DLOG(
"unmapping container %p / %s (serial %d)\n",
con,
con->
name, cookie.sequence);
1251 if (current ==
con) {
1272 xcb_query_pointer_cookie_t pointercookie;
1276 pointercookie = xcb_query_pointer(
conn,
root);
1279 DLOG(
"-- PUSHING WINDOW STACK --\n");
1283 uint32_t values[1] = {XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT};
1285 if (
state->mapped) {
1286 xcb_change_window_attributes(
conn,
state->id, XCB_CW_EVENT_MASK, values);
1289 bool order_changed =
false;
1290 bool stacking_changed =
false;
1303 static xcb_window_t *client_list_windows = NULL;
1304 static int client_list_count = 0;
1306 if (cnt != client_list_count) {
1307 client_list_windows =
srealloc(client_list_windows,
sizeof(xcb_window_t) * cnt);
1308 client_list_count = cnt;
1311 xcb_window_t *walk = client_list_windows;
1316 memcpy(walk++, &(
state->con->window->id),
sizeof(xcb_window_t));
1321 if (prev != old_prev) {
1322 order_changed =
true;
1324 if ((
state->initial || order_changed) && prev !=
CIRCLEQ_END(&state_head)) {
1325 stacking_changed =
true;
1327 mask |= XCB_CONFIG_WINDOW_SIBLING;
1328 mask |= XCB_CONFIG_WINDOW_STACK_MODE;
1329 uint32_t values[] = {
state->id, XCB_STACK_MODE_ABOVE};
1331 xcb_configure_window(
conn, prev->
id, mask, values);
1333 state->initial =
false;
1338 if (stacking_changed) {
1339 DLOG(
"Client list changed (%i clients)\n", cnt);
1342 walk = client_list_windows;
1347 *walk++ =
state->con->window->id;
1354 DLOG(
"PUSHING CHANGES\n");
1358 xcb_query_pointer_reply_t *pointerreply = xcb_query_pointer_reply(
conn, pointercookie, NULL);
1359 if (!pointerreply) {
1360 ELOG(
"Could not query pointer position, not warping pointer\n");
1367 if (current != target) {
1369 xcb_change_window_attributes(
conn,
root, XCB_CW_EVENT_MASK, (uint32_t[]){XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT});
1370 xcb_warp_pointer(
conn, XCB_NONE,
root, 0, 0, 0, 0, mid_x, mid_y);
1381 if (
state->mapped) {
1382 xcb_change_window_attributes(
conn,
state->id, XCB_CW_EVENT_MASK, values);
1402 DLOG(
"Updating focus by sending WM_TAKE_FOCUS to window 0x%08x (focused: %p / %s)\n",
1440 DLOG(
"Still no window focused, better set focus to the EWMH support window (%d)\n",
ewmh_window);
1449 DLOG(
"ENDING CHANGES\n");
1460 if (!
state->unmap_now) {
1463 xcb_change_window_attributes(
conn,
state->id, XCB_CW_EVENT_MASK, values);
1501 ELOG(
"window state not found\n");
1515 xcb_delete_property(
conn,
root, A_I3_SHMLOG_PATH);
1517 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root,
1518 A_I3_SHMLOG_PATH, A_UTF8_STRING, 8,
1528 pid_t pid = getpid();
1529 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
1532 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A_I3_PID, XCB_ATOM_CARDINAL, 32, 1, &pid);
1533 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8,
1535 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A_I3_LOG_STREAM_SOCKET_PATH, A_UTF8_STRING, 8,
1562 if (
state->mapped) {
1563 xcb_change_window_attributes(
conn,
state->id, XCB_CW_EVENT_MASK, values);
1574 ELOG(
"window state for con %p not found\n",
con);
1579 case XCB_SHAPE_SK_BOUNDING:
1582 case XCB_SHAPE_SK_INPUT:
1586 ELOG(
"Received unknown shape event kind for con %p. This is a bug.\n",
char * con_get_tree_representation(Con *con)
Create a string representing the subtree under con.
bool con_is_floating(Con *con)
Returns true if the node is floating.
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_is_hidden(Con *con)
This will only return true for containers which have some parent with a tabbed / stacked parent of wh...
bool con_is_maximized(Con *con, orientation_t orientation)
Returns true if the container is maximized in the given orientation.
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...
int con_border_style(Con *con)
Use this function to get a container’s border style.
i3String * con_parse_title_format(Con *con)
Returns the window title considering the current title format.
bool con_inside_focused(Con *con)
Checks if the given container is inside a focused container.
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
adjacent_t con_adjacent_borders(Con *con)
Returns adjacent borders of the window.
bool con_draw_decoration_into_frame(Con *con)
Returns whether the window decoration (title bar) should be drawn into the X11 frame window of this c...
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
char * current_configpath
void ewmh_update_active_window(xcb_window_t window)
Updates _NET_ACTIVE_WINDOW with the currently focused window.
void ewmh_update_client_list(xcb_window_t *list, int num_windows)
Updates the _NET_CLIENT_LIST hint.
void ewmh_update_focused(xcb_window_t window, bool is_focused)
Set or remove _NEW_WM_STATE_FOCUSED on the window.
xcb_window_t ewmh_window
The EWMH support window that is used to indicate that an EWMH-compliant window manager is present.
void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows)
Updates the _NET_CLIENT_LIST_STACKING hint.
struct pending_marks * marks
Output * get_output_containing(unsigned int x, unsigned int y)
Returns the active (!) output which contains the coordinates x, y or NULL if there is no output which...
bool rect_equals(Rect a, Rect b)
static void change_ewmh_focus(xcb_window_t new_focus, xcb_window_t old_focus)
static void x_shape_frame(Con *con, xcb_shape_sk_t shape_kind)
void x_con_init(Con *con)
Initializes the X11 part for the given container.
static void x_draw_title_border(Con *con, struct deco_render_params *p, surface_t *dest_surface)
static size_t x_get_border_rectangles(Con *con, xcb_rectangle_t rectangles[4])
static void x_push_node_unmaps(Con *con)
void x_move_win(Con *src, Con *dest)
Moves a child window from Container src to Container dest.
struct con_state con_state
void x_deco_recurse(Con *con)
Recursively calls x_draw_decoration.
xcb_window_t focused_id
Stores the X11 window ID of the currently focused window.
static void set_hidden_state(Con *con)
void update_shmlog_atom(void)
Set up the SHMLOG_PATH atom.
void x_reparent_child(Con *con, Con *old)
Reparents the child window of the given container (necessary for sticky containers).
static xcb_window_t last_focused
void x_con_reframe(Con *con)
void x_set_warp_to(Rect *rect)
Set warp_to coordinates.
void x_reinit(Con *con)
Re-initializes the associated X window state for this container.
void x_window_kill(xcb_window_t window, kill_window_t kill_window)
Kills the given X11 window using WM_DELETE_WINDOW (if supported).
void x_raise_con(Con *con)
Raises the specified container in the internal stack of X windows.
static void set_shape_state(Con *con, bool need_reshape)
static void _x_con_kill(Con *con)
void x_set_name(Con *con, const char *name)
Sets the WM_NAME property (so, no UTF8, but used only for debugging anyways) of the given name.
void x_draw_decoration(Con *con)
Draws the decoration of the given container onto its parent.
void x_push_node(Con *con)
This function pushes the properties of each node of the layout tree to X11 if they have changed (like...
void x_set_i3_atoms(void)
Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
static void x_unshape_frame(Con *con, xcb_shape_sk_t shape_kind)
void x_mask_event_mask(uint32_t mask)
Applies the given mask to the event mask of every i3 window decoration X11 window.
void x_push_changes(Con *con)
Pushes all changes (state of each node, see x_push_node() and the window stack) to X11.
static void x_draw_decoration_after_title(Con *con, struct deco_render_params *p, surface_t *dest_surface)
static bool is_con_attached(Con *con)
void x_con_kill(Con *con)
Kills the window decoration associated with the given container.
bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom)
Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
void x_set_shape(Con *con, xcb_shape_sk_t kind, bool enable)
Enables or disables nonrectangular shape of the container frame.
static void set_maximized_state(Con *con)
xcb_window_t create_window(xcb_connection_t *conn, Rect dims, uint16_t depth, xcb_visualid_t visual, uint16_t window_class, enum xcursor_cursor_t cursor, bool map, uint32_t mask, uint32_t *values)
Convenience wrapper around xcb_create_window which takes care of depth, generating an ID and checking...
xcb_visualid_t get_visualid_by_depth(uint16_t depth)
Get visualid with specified depth.
void xcb_set_window_rect(xcb_connection_t *conn, xcb_window_t window, Rect r)
Configures the given window to have the size/position specified by given rect.
void send_take_focus(xcb_window_t window, xcb_timestamp_t timestamp)
Sends the WM_TAKE_FOCUS ClientMessage to the given window.
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.
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 fake_absolute_configure_notify(Con *con)
Generates a configure_notify_event with absolute coordinates (relative to the X root window,...
xcb_visualtype_t * get_visualtype_by_id(xcb_visualid_t visual_id)
Get visual type specified by visualid.
char * current_socketpath
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,...
char * current_log_stream_socket_path
xcb_timestamp_t last_timestamp
The last timestamp we got from X11 (timestamps are included in some events and are used for some thin...
xcb_connection_t * conn
XCB connection and root screen.
xcb_screen_t * root_screen
adjacent_t
describes if the window is adjacent to the output (physical screen) edges.
kill_window_t
parameter to specify whether tree_close_internal() and x_window_kill() should kill only this specific...
void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_drawable_t drawable, xcb_visualtype_t *visual, int width, int height)
Initialize the surface to represent the given drawable.
struct _i3String i3String
Opaque data structure for storing strings.
void draw_util_copy_surface(surface_t *src, surface_t *dest, double src_x, double src_y, double dest_x, double dest_y, double width, double height)
Copies a surface onto another surface.
void draw_util_text(i3String *text, surface_t *surface, color_t fg_color, color_t bg_color, int x, int y, int max_width)
Draw the given text using libi3.
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
void draw_util_surface_free(xcb_connection_t *conn, surface_t *surface)
Destroys the surface.
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
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...
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...
void * srealloc(void *ptr, size_t size)
Safe-wrapper around realloc which exits if realloc returns NULL (meaning that there is no more memory...
void draw_util_image(cairo_surface_t *image, surface_t *surface, int x, int y, int width, int height)
Draw the given image using libi3.
#define I3STRING_FREE(str)
Securely i3string_free by setting the pointer to NULL to prevent accidentally using freed memory.
void draw_util_surface_set_size(surface_t *surface, int width, int height)
Resize the surface to the given size.
void draw_util_rectangle(surface_t *surface, color_t color, double x, double y, double w, double h)
Draws a filled rectangle.
i3String * i3string_from_utf8(const char *from_utf8)
Build an i3String from an UTF-8 encoded string.
int predict_text_width(i3String *text)
Predict the text width in pixels for the given text.
void draw_util_clear_surface(surface_t *surface, color_t color)
Clears a surface with the given color.
bool font_is_pango(void)
Returns true if and only if the current font is a pango font.
#define TAILQ_FOREACH(var, head, field)
#define CIRCLEQ_FOREACH_REVERSE(var, head, field)
#define CIRCLEQ_INSERT_HEAD(head, elm, field)
#define TAILQ_HEAD(name, type)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_PREV(elm, headname, field)
#define CIRCLEQ_HEAD_INITIALIZER(head)
#define TAILQ_FIRST(head)
#define CIRCLEQ_INSERT_TAIL(head, elm, field)
#define TAILQ_REMOVE(head, elm, field)
#define CIRCLEQ_ENTRY(type)
#define TAILQ_NEXT(elm, field)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
#define CIRCLEQ_HEAD(name, type)
#define CIRCLEQ_END(head)
#define CIRCLEQ_PREV(elm, field)
#define CIRCLEQ_REMOVE(head, elm, field)
#define CIRCLEQ_FOREACH(var, head, field)
#define TAILQ_ENTRY(type)
#define CHILD_EVENT_MASK
The XCB_CW_EVENT_MASK for the child (= real window)
#define FRAME_EVENT_MASK
The XCB_CW_EVENT_MASK for its frame.
enum Config::@5 title_align
Title alignment options.
hide_edge_borders_mode_t hide_edge_borders
Remove borders if they are adjacent to the screen edge.
struct Config::config_client client
warping_t mouse_warping
By default, when switching focus to a window on a different output (e.g.
bool show_marks
Specifies whether or not marks should be displayed in the window decoration.
struct Colortriple focused
struct Colortriple focused_tab_title
struct Colortriple unfocused
bool got_focused_tab_title
struct Colortriple urgent
struct Colortriple focused_inactive
Stores a rectangle, for example the size of a window, the child window etc.
Stores a width/height pair, used as part of deco_render_params to check whether the rects width/heigh...
Stores the parameters for rendering a window decoration.
struct Colortriple * color
struct width_height con_rect
struct width_height con_window_rect
An Output is a physical output on your graphics driver.
A 'Window' is a type which contains an xcb_window_t and all the related information (hints like _NET_...
bool input_shaped
The window has a nonrectangular input shape.
i3String * name
The name of the window.
cairo_surface_t * icon
Window icon, as Cairo surface.
bool name_x_changed
Flag to force re-rendering the decoration upon changes.
bool doesnt_accept_focus
Whether this window accepts focus.
bool shaped
The window has a nonrectangular shape.
bool needs_take_focus
Whether the application needs to receive WM_TAKE_FOCUS.
uint16_t depth
Depth of the window.
A 'Con' represents everything from the X11 root window down to a single X11 window.
uint8_t ignore_unmap
This counter contains the number of UnmapNotify events for this container (or, more precisely,...
int window_icon_padding
Whether the window icon should be displayed, and with what padding.
char * title_format
The format with which the window's name should be displayed.
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
int height
The height of the font, built from font_ascent + font_descent.