i3
window.c
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * window.c: Updates window attributes (X11 hints/properties).
8  *
9  */
10 #include "all.h"
11 
12 /*
13  * Frees an i3Window and all its members.
14  *
15  */
16 void window_free(i3Window *win) {
17  FREE(win->class_class);
18  FREE(win->class_instance);
19  i3string_free(win->name);
20  FREE(win->ran_assignments);
21  FREE(win);
22 }
23 
24 /*
25  * Updates the WM_CLASS (consisting of the class and instance) for the
26  * given window.
27  *
28  */
29 void window_update_class(i3Window *win, xcb_get_property_reply_t *prop) {
30  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
31  DLOG("WM_CLASS not set.\n");
32  FREE(prop);
33  return;
34  }
35 
36  /* We cannot use asprintf here since this property contains two
37  * null-terminated strings (for compatibility reasons). Instead, we
38  * use strdup() on both strings */
39  const size_t prop_length = xcb_get_property_value_length(prop);
40  char *new_class = xcb_get_property_value(prop);
41  const size_t class_class_index = strnlen(new_class, prop_length) + 1;
42 
43  FREE(win->class_instance);
44  FREE(win->class_class);
45 
46  win->class_instance = sstrndup(new_class, prop_length);
47  if (class_class_index < prop_length)
48  win->class_class = sstrndup(new_class + class_class_index, prop_length - class_class_index);
49  else
50  win->class_class = NULL;
51  LOG("WM_CLASS changed to %s (instance), %s (class)\n",
52  win->class_instance, win->class_class);
53 
54  free(prop);
55 }
56 
57 /*
58  * Updates the name by using _NET_WM_NAME (encoded in UTF-8) for the given
59  * window. Further updates using window_update_name_legacy will be ignored.
60  *
61  */
62 void window_update_name(i3Window *win, xcb_get_property_reply_t *prop) {
63  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
64  DLOG("_NET_WM_NAME not specified, not changing\n");
65  FREE(prop);
66  return;
67  }
68 
69  i3string_free(win->name);
70 
71  /* Truncate the name at the first zero byte. See #3515. */
72  const int len = xcb_get_property_value_length(prop);
73  char *name = sstrndup(xcb_get_property_value(prop), len);
74  win->name = i3string_from_utf8(name);
75  free(name);
76 
77  Con *con = con_by_window_id(win->id);
78  if (con != NULL && con->title_format != NULL) {
79  i3String *name = con_parse_title_format(con);
81  I3STRING_FREE(name);
82  }
83  win->name_x_changed = true;
84  LOG("_NET_WM_NAME changed to \"%s\"\n", i3string_as_utf8(win->name));
85 
86  win->uses_net_wm_name = true;
87 
88  free(prop);
89 }
90 
91 /*
92  * Updates the name by using WM_NAME (encoded in COMPOUND_TEXT). We do not
93  * touch what the client sends us but pass it to xcb_image_text_8. To get
94  * proper unicode rendering, the application has to use _NET_WM_NAME (see
95  * window_update_name()).
96  *
97  */
98 void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop) {
99  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
100  DLOG("WM_NAME not set (_NET_WM_NAME is what you want anyways).\n");
101  FREE(prop);
102  return;
103  }
104 
105  /* ignore update when the window is known to already have a UTF-8 name */
106  if (win->uses_net_wm_name) {
107  free(prop);
108  return;
109  }
110 
111  i3string_free(win->name);
112  const int len = xcb_get_property_value_length(prop);
113  char *name = sstrndup(xcb_get_property_value(prop), len);
114  win->name = i3string_from_utf8(name);
115  free(name);
116 
117  Con *con = con_by_window_id(win->id);
118  if (con != NULL && con->title_format != NULL) {
119  i3String *name = con_parse_title_format(con);
121  I3STRING_FREE(name);
122  }
123 
124  LOG("WM_NAME changed to \"%s\"\n", i3string_as_utf8(win->name));
125  LOG("Using legacy window title. Note that in order to get Unicode window "
126  "titles in i3, the application has to set _NET_WM_NAME (UTF-8)\n");
127 
128  win->name_x_changed = true;
129 
130  free(prop);
131 }
132 
133 /*
134  * Updates the qubes vmname by using _QUBES_VMNAME (encoded in UTF-8) for the given
135  * window.
136  *
137  */
138 void window_update_qubes_vmname(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) {
139  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
140  win->qubes_vmname = i3string_from_utf8("dom0");
141  FREE(prop);
142  return;
143  }
144 
146 
147  /* Truncate the name at the first zero byte. See i3 #3515. */
148  const int len = xcb_get_property_value_length(prop);
149  char *qubes_vmname = sstrndup(xcb_get_property_value(prop), len);
150  win->qubes_vmname = i3string_from_utf8(qubes_vmname);
151  free(qubes_vmname);
152 
153  LOG("_QUBES_VMNAME set to \"%s\"\n", i3string_as_utf8(win->qubes_vmname));
154 
155  if (before_mgmt) {
156  free(prop);
157  return;
158  }
159 
160  run_assignments(win);
161 
162  free(prop);
163 }
164 
165 /*
166  * Updates the qubes label by using _QUBES_LABEL (encoded in UTF-8) for the given
167  * window.
168  *
169  */
170 void window_update_qubes_label(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt) {
171  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
172  win->qubes_label = 0;
173  FREE(prop);
174  return;
175  }
176 
177  win->qubes_label = *(int*) xcb_get_property_value(prop);
178 
179  if (before_mgmt) {
180  free(prop);
181  return;
182  }
183 
184  run_assignments(win);
185 
186  free(prop);
187 }
188 
189 /*
190  * Updates the CLIENT_LEADER (logical parent window).
191  *
192  */
193 void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
194  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
195  DLOG("CLIENT_LEADER not set on window 0x%08x.\n", win->id);
196  win->leader = XCB_NONE;
197  FREE(prop);
198  return;
199  }
200 
201  xcb_window_t *leader = xcb_get_property_value(prop);
202  if (leader == NULL) {
203  free(prop);
204  return;
205  }
206 
207  DLOG("Client leader changed to %08x\n", *leader);
208 
209  win->leader = *leader;
210 
211  free(prop);
212 }
213 
214 /*
215  * Updates the TRANSIENT_FOR (logical parent window).
216  *
217  */
218 void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop) {
219  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
220  DLOG("TRANSIENT_FOR not set on window 0x%08x.\n", win->id);
221  win->transient_for = XCB_NONE;
222  FREE(prop);
223  return;
224  }
225 
226  xcb_window_t transient_for;
227  if (!xcb_icccm_get_wm_transient_for_from_reply(&transient_for, prop)) {
228  free(prop);
229  return;
230  }
231 
232  DLOG("Transient for changed to 0x%08x (window 0x%08x)\n", transient_for, win->id);
233 
234  win->transient_for = transient_for;
235 
236  free(prop);
237 }
238 
239 /*
240  * Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges)
241  *
242  */
243 void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop) {
244  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
245  DLOG("_NET_WM_STRUT_PARTIAL not set.\n");
246  FREE(prop);
247  return;
248  }
249 
250  uint32_t *strut;
251  if (!(strut = xcb_get_property_value(prop))) {
252  free(prop);
253  return;
254  }
255 
256  DLOG("Reserved pixels changed to: left = %d, right = %d, top = %d, bottom = %d\n",
257  strut[0], strut[1], strut[2], strut[3]);
258 
259  win->reserved = (struct reservedpx){strut[0], strut[1], strut[2], strut[3]};
260 
261  free(prop);
262 }
263 
264 /*
265  * Updates the WM_WINDOW_ROLE
266  *
267  */
268 void window_update_role(i3Window *win, xcb_get_property_reply_t *prop) {
269  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
270  DLOG("WM_WINDOW_ROLE not set.\n");
271  FREE(prop);
272  return;
273  }
274 
275  char *new_role;
276  sasprintf(&new_role, "%.*s", xcb_get_property_value_length(prop),
277  (char *)xcb_get_property_value(prop));
278  FREE(win->role);
279  win->role = new_role;
280  LOG("WM_WINDOW_ROLE changed to \"%s\"\n", win->role);
281 
282  free(prop);
283 }
284 
285 /*
286  * Updates the _NET_WM_WINDOW_TYPE property.
287  *
288  */
289 void window_update_type(i3Window *window, xcb_get_property_reply_t *reply) {
290  xcb_atom_t new_type = xcb_get_preferred_window_type(reply);
291  free(reply);
292  if (new_type == XCB_NONE) {
293  DLOG("cannot read _NET_WM_WINDOW_TYPE from window.\n");
294  return;
295  }
296 
297  window->window_type = new_type;
298  LOG("_NET_WM_WINDOW_TYPE changed to %i.\n", window->window_type);
299 
300  run_assignments(window);
301 }
302 
303 /*
304  * Updates the WM_NORMAL_HINTS
305  *
306  */
307 bool window_update_normal_hints(i3Window *win, xcb_get_property_reply_t *reply, xcb_get_geometry_reply_t *geom) {
308  bool changed = false;
309  xcb_size_hints_t size_hints;
310 
311  /* If the hints were already in this event, use them, if not, request them */
312  bool success;
313  if (reply != NULL) {
314  success = xcb_icccm_get_wm_size_hints_from_reply(&size_hints, reply);
315  } else {
316  success = xcb_icccm_get_wm_normal_hints_reply(conn, xcb_icccm_get_wm_normal_hints_unchecked(conn, win->id), &size_hints, NULL);
317  }
318  if (!success) {
319  DLOG("Could not get WM_NORMAL_HINTS\n");
320  return false;
321  }
322 
323 #define ASSIGN_IF_CHANGED(original, new) \
324  do { \
325  if (original != new) { \
326  original = new; \
327  changed = true; \
328  } \
329  } while (0)
330 
331  if ((size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)) {
332  DLOG("Minimum size: %d (width) x %d (height)\n", size_hints.min_width, size_hints.min_height);
333 
334  ASSIGN_IF_CHANGED(win->min_width, size_hints.min_width);
335  ASSIGN_IF_CHANGED(win->min_height, size_hints.min_height);
336  }
337 
338  if ((size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)) {
339  DLOG("Maximum size: %d (width) x %d (height)\n", size_hints.max_width, size_hints.max_height);
340 
341  int max_width = max(0, size_hints.max_width);
342  int max_height = max(0, size_hints.max_height);
343 
344  ASSIGN_IF_CHANGED(win->max_width, max_width);
345  ASSIGN_IF_CHANGED(win->max_height, max_height);
346  } else {
347  DLOG("Clearing maximum size \n");
348 
349  ASSIGN_IF_CHANGED(win->max_width, 0);
350  ASSIGN_IF_CHANGED(win->max_height, 0);
351  }
352 
353  if ((size_hints.flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)) {
354  DLOG("Size increments: %d (width) x %d (height)\n", size_hints.width_inc, size_hints.height_inc);
355 
356  if (size_hints.width_inc > 0 && size_hints.width_inc < 0xFFFF) {
357  ASSIGN_IF_CHANGED(win->width_increment, size_hints.width_inc);
358  } else {
360  }
361 
362  if (size_hints.height_inc > 0 && size_hints.height_inc < 0xFFFF) {
363  ASSIGN_IF_CHANGED(win->height_increment, size_hints.height_inc);
364  } else {
366  }
367  } else {
368  DLOG("Clearing size increments\n");
369 
372  }
373 
374  /* The base width / height is the desired size of the window. */
375  if (size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE &&
376  (win->base_width >= 0) && (win->base_height >= 0)) {
377  DLOG("Base size: %d (width) x %d (height)\n", size_hints.base_width, size_hints.base_height);
378 
379  ASSIGN_IF_CHANGED(win->base_width, size_hints.base_width);
380  ASSIGN_IF_CHANGED(win->base_height, size_hints.base_height);
381  } else {
382  DLOG("Clearing base size\n");
383 
384  ASSIGN_IF_CHANGED(win->base_width, 0);
386  }
387 
388  if (geom != NULL &&
389  (size_hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION || size_hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION) &&
390  (size_hints.flags & XCB_ICCCM_SIZE_HINT_US_SIZE || size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)) {
391  DLOG("Setting geometry x=%d y=%d w=%d h=%d\n", size_hints.x, size_hints.y, size_hints.width, size_hints.height);
392  geom->x = size_hints.x;
393  geom->y = size_hints.y;
394  geom->width = size_hints.width;
395  geom->height = size_hints.height;
396  }
397 
398  /* If no aspect ratio was set or if it was invalid, we ignore the hints */
399  if (size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT &&
400  (size_hints.min_aspect_num >= 0) && (size_hints.min_aspect_den > 0) &&
401  (size_hints.max_aspect_num >= 0) && (size_hints.max_aspect_den > 0)) {
402  /* Convert numerator/denominator to a double */
403  double min_aspect = (double)size_hints.min_aspect_num / size_hints.min_aspect_den;
404  double max_aspect = (double)size_hints.max_aspect_num / size_hints.max_aspect_den;
405  DLOG("Aspect ratio set: minimum %f, maximum %f\n", min_aspect, max_aspect);
406  if (fabs(win->min_aspect_ratio - min_aspect) > DBL_EPSILON) {
407  win->min_aspect_ratio = min_aspect;
408  changed = true;
409  }
410  if (fabs(win->max_aspect_ratio - max_aspect) > DBL_EPSILON) {
411  win->max_aspect_ratio = max_aspect;
412  changed = true;
413  }
414  } else {
415  DLOG("Clearing aspect ratios\n");
416 
419  }
420 
421  return changed;
422 }
423 
424 /*
425  * Updates the WM_HINTS (we only care about the input focus handling part).
426  *
427  */
428 void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *urgency_hint) {
429  if (urgency_hint != NULL)
430  *urgency_hint = false;
431 
432  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
433  DLOG("WM_HINTS not set.\n");
434  FREE(prop);
435  return;
436  }
437 
438  xcb_icccm_wm_hints_t hints;
439 
440  if (!xcb_icccm_get_wm_hints_from_reply(&hints, prop)) {
441  DLOG("Could not get WM_HINTS\n");
442  free(prop);
443  return;
444  }
445 
446  if (hints.flags & XCB_ICCCM_WM_HINT_INPUT) {
447  win->doesnt_accept_focus = !hints.input;
448  LOG("WM_HINTS.input changed to \"%d\"\n", hints.input);
449  }
450 
451  if (urgency_hint != NULL)
452  *urgency_hint = (xcb_icccm_wm_hints_get_urgency(&hints) != 0);
453 
454  free(prop);
455 }
456 
457 /*
458  * Updates the MOTIF_WM_HINTS. The container's border style should be set to
459  * `motif_border_style' if border style is not BS_NORMAL.
460  *
461  * i3 only uses this hint when it specifies a window should have no
462  * title bar, or no decorations at all, which is how most window managers
463  * handle it.
464  *
465  * The EWMH spec intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but
466  * it is still in use by popular widget toolkits such as GTK+ and Java AWT.
467  *
468  */
469 void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style) {
470  /* This implementation simply mirrors Gnome's Metacity. Official
471  * documentation of this hint is nowhere to be found.
472  * For more information see:
473  * https://people.gnome.org/~tthurman/docs/metacity/xprops_8h-source.html
474  * https://stackoverflow.com/questions/13787553/detect-if-a-x11-window-has-decorations
475  */
476 #define MWM_HINTS_FLAGS_FIELD 0
477 #define MWM_HINTS_DECORATIONS_FIELD 2
478 
479 #define MWM_HINTS_DECORATIONS (1 << 1)
480 #define MWM_DECOR_ALL (1 << 0)
481 #define MWM_DECOR_BORDER (1 << 1)
482 #define MWM_DECOR_TITLE (1 << 3)
483 
484  if (motif_border_style != NULL)
485  *motif_border_style = BS_NORMAL;
486 
487  if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
488  FREE(prop);
489  return;
490  }
491 
492  /* The property consists of an array of 5 uint32_t's. The first value is a
493  * bit mask of what properties the hint will specify. We are only interested
494  * in MWM_HINTS_DECORATIONS because it indicates that the third value of the
495  * array tells us which decorations the window should have, each flag being
496  * a particular decoration. Notice that X11 (Xlib) often mentions 32-bit
497  * fields which in reality are implemented using unsigned long variables
498  * (64-bits long on amd64 for example). On the other hand,
499  * xcb_get_property_value() behaves strictly according to documentation,
500  * i.e. returns 32-bit data fields. */
501  uint32_t *motif_hints = (uint32_t *)xcb_get_property_value(prop);
502 
503  if (motif_border_style != NULL &&
505  if (motif_hints[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_ALL ||
507  *motif_border_style = BS_NORMAL;
508  else if (motif_hints[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_BORDER)
509  *motif_border_style = BS_PIXEL;
510  else
511  *motif_border_style = BS_NONE;
512  }
513 
514  FREE(prop);
515 
516 #undef MWM_HINTS_FLAGS_FIELD
517 #undef MWM_HINTS_DECORATIONS_FIELD
518 #undef MWM_HINTS_DECORATIONS
519 #undef MWM_DECOR_ALL
520 #undef MWM_DECOR_BORDER
521 #undef MWM_DECOR_TITLE
522 }
int min_height
Definition: data.h:502
struct _i3String i3String
Opaque data structure for storing strings.
Definition: libi3.h:48
void window_free(i3Window *win)
Frees an i3Window and all its members.
Definition: window.c:16
bool name_x_changed
Flag to force re-rendering the decoration upon changes.
Definition: data.h:459
xcb_window_t leader
Holds the xcb_window_t (just an ID) for the leader window (logical parent for toolwindows and similar...
Definition: data.h:433
void window_update_role(i3Window *win, xcb_get_property_reply_t *prop)
Updates the WM_WINDOW_ROLE.
Definition: window.c:268
char * sstrndup(const char *str, size_t size)
Safe-wrapper around strndup which exits if strndup returns NULL (meaning that there is no more memory...
i3String * qubes_vmname
The name of the qubes vm.
Definition: data.h:448
int base_width
Definition: data.h:493
#define MWM_HINTS_DECORATIONS
#define LOG(fmt,...)
Definition: libi3.h:94
char * class_class
Definition: data.h:441
bool window_update_normal_hints(i3Window *win, xcb_get_property_reply_t *reply, xcb_get_geometry_reply_t *geom)
Updates the WM_NORMAL_HINTS.
Definition: window.c:307
xcb_atom_t xcb_get_preferred_window_type(xcb_get_property_reply_t *reply)
Returns the first supported _NET_WM_WINDOW_TYPE atom.
Definition: xcb.c:133
int base_height
Definition: data.h:494
void window_update_qubes_label(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt)
Updates the qubes label by using _QUBES_LABEL (encoded in UTF-8) for the given window.
Definition: window.c:170
#define ASSIGN_IF_CHANGED(original, new)
Definition: data.h:64
#define MWM_HINTS_DECORATIONS_FIELD
void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop)
Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges)
Definition: window.c:243
char * title_format
The format with which the window&#39;s name should be displayed.
Definition: data.h:690
A &#39;Window&#39; is a type which contains an xcb_window_t and all the related information (hints like _NET_...
Definition: data.h:428
Definition: data.h:65
void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *urgency_hint)
Updates the WM_HINTS (we only care about the input focus handling part).
Definition: window.c:428
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...
bool uses_net_wm_name
Whether the application used _NET_WM_NAME.
Definition: data.h:462
A &#39;Con&#39; represents everything from the X11 root window down to a single X11 window.
Definition: data.h:641
int max(int a, int b)
Definition: util.c:31
Definition: data.h:66
i3String * name
The name of the window.
Definition: data.h:445
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...
Definition: con.c:647
int height_increment
Definition: data.h:498
xcb_connection_t * conn
XCB connection and root screen.
Definition: main.c:44
i3String * i3string_from_utf8(const char *from_utf8)
Build an i3String from an UTF-8 encoded string.
int max_width
Definition: data.h:505
void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style)
Updates the MOTIF_WM_HINTS.
Definition: window.c:469
Assignment ** ran_assignments
Definition: data.h:439
#define FREE(pointer)
Definition: util.h:47
#define MWM_DECOR_BORDER
int min_width
Definition: data.h:501
#define MWM_DECOR_ALL
void window_update_type(i3Window *window, xcb_get_property_reply_t *reply)
Updates the _NET_WM_WINDOW_TYPE property.
Definition: window.c:289
void run_assignments(i3Window *window)
Checks the list of assignments for the given window and runs all matching ones (unless they have alre...
Definition: assignments.c:17
int max_height
Definition: data.h:506
xcb_atom_t window_type
The _NET_WM_WINDOW_TYPE for this window.
Definition: data.h:472
const char * i3string_as_utf8(i3String *str)
Returns the UTF-8 encoded version of the i3String.
void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop)
Updates the name by using WM_NAME (encoded in COMPOUND_TEXT).
Definition: window.c:98
#define MWM_HINTS_FLAGS_FIELD
void window_update_class(i3Window *win, xcb_get_property_reply_t *prop)
Updates the WM_CLASS (consisting of the class and instance) for the given window. ...
Definition: window.c:29
void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop)
Updates the TRANSIENT_FOR (logical parent window).
Definition: window.c:218
void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop)
Updates the CLIENT_LEADER (logical parent window).
Definition: window.c:193
int width_increment
Definition: data.h:497
double min_aspect_ratio
Definition: data.h:509
#define I3STRING_FREE(str)
Securely i3string_free by setting the pointer to NULL to prevent accidentally using freed memory...
Definition: libi3.h:236
double max_aspect_ratio
Definition: data.h:510
xcb_window_t id
Definition: data.h:429
bool doesnt_accept_focus
Whether this window accepts focus.
Definition: data.h:469
#define DLOG(fmt,...)
Definition: libi3.h:104
border_style_t
Definition: data.h:64
char * class_instance
Definition: data.h:442
void window_update_qubes_vmname(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt)
Updates the qubes vmname by using _QUBES_VMNAME (encoded in UTF-8) for the given window.
Definition: window.c:138
void ewmh_update_visible_name(xcb_window_t window, const char *name)
Updates _NET_WM_VISIBLE_NAME.
Definition: ewmh.c:214
Stores the reserved pixels on each screen edge read from a _NET_WM_STRUT_PARTIAL. ...
Definition: data.h:187
void window_update_name(i3Window *win, xcb_get_property_reply_t *prop)
Updates the name by using _NET_WM_NAME (encoded in UTF-8) for the given window.
Definition: window.c:62
struct reservedpx reserved
Pixels the window reserves.
Definition: data.h:486
int qubes_label
The qubes label.
Definition: data.h:451
i3String * con_parse_title_format(Con *con)
Returns the window title considering the current title format.
Definition: con.c:2262
xcb_window_t transient_for
Definition: data.h:434
#define MWM_DECOR_TITLE
char * role
The WM_WINDOW_ROLE of this window (for example, the pidgin buddy window sets "buddy list")...
Definition: data.h:456
void i3string_free(i3String *str)
Free an i3String.