]> git.sur5r.net Git - i3/i3/blob - include/window.h
Merge pull request #1638 from hwangcc23/fix-1489
[i3/i3] / include / window.h
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 #pragma once
11
12 /**
13  * Updates the WM_CLASS (consisting of the class and instance) for the
14  * given window.
15  *
16  */
17 void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt);
18
19 /**
20  * Updates the name by using _NET_WM_NAME (encoded in UTF-8) for the given
21  * window. Further updates using window_update_name_legacy will be ignored.
22  *
23  */
24 void window_update_name(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt);
25
26 /**
27  * Updates the name by using WM_NAME (encoded in COMPOUND_TEXT). We do not
28  * touch what the client sends us but pass it to xcb_image_text_8. To get
29  * proper unicode rendering, the application has to use _NET_WM_NAME (see
30  * window_update_name()).
31  *
32  */
33 void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt);
34
35 /**
36  * Updates the CLIENT_LEADER (logical parent window).
37  *
38  */
39 void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop);
40
41 /**
42  * Updates the TRANSIENT_FOR (logical parent window).
43  *
44  */
45 void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop);
46
47 /**
48  * Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges)
49  *
50  */
51 void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop);
52
53 /**
54  * Updates the WM_WINDOW_ROLE
55  *
56  */
57 void window_update_role(i3Window *win, xcb_get_property_reply_t *prop, bool before_mgmt);
58
59 /**
60  * Updates the _NET_WM_WINDOW_TYPE property.
61  *
62  */
63 void window_update_type(i3Window *window, xcb_get_property_reply_t *reply);
64
65 /**
66  * Updates the WM_HINTS (we only care about the input focus handling part).
67  *
68  */
69 void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *urgency_hint);
70
71 /**
72  * Updates the MOTIF_WM_HINTS. The container's border style should be set to
73  * `motif_border_style' if border style is not BS_NORMAL.
74  *
75  * i3 only uses this hint when it specifies a window should have no
76  * title bar, or no decorations at all, which is how most window managers
77  * handle it.
78  *
79  * The EWMH spec intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but
80  * it is still in use by popular widget toolkits such as GTK+ and Java AWT.
81  *
82  */
83 void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style);