2 #define I3__FILE__ "window.c"
20 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
21 DLOG(
"WM_CLASS not set.\n");
29 char *new_class = xcb_get_property_value(prop);
35 if ((strlen(new_class) + 1) < xcb_get_property_value_length(prop))
38 LOG(
"WM_CLASS changed to %s (instance), %s (class)\n",
57 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
58 DLOG(
"_NET_WM_NAME not specified, not changing\n");
65 xcb_get_property_value_length(prop));
89 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
90 DLOG(
"WM_NAME not set (_NET_WM_NAME is what you want anyways).\n");
103 xcb_get_property_value_length(prop));
106 LOG(
"Using legacy window title. Note that in order to get Unicode window "
107 "titles in i3, the application has to set _NET_WM_NAME (UTF-8)\n");
126 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
127 DLOG(
"CLIENT_LEADER not set.\n");
132 xcb_window_t *leader = xcb_get_property_value(prop);
133 if (leader == NULL) {
138 DLOG(
"Client leader changed to %08x\n", *leader);
150 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
151 DLOG(
"TRANSIENT_FOR not set.\n");
156 xcb_window_t transient_for;
162 DLOG(
"Transient for changed to %08x\n", transient_for);
174 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
175 DLOG(
"_NET_WM_STRUT_PARTIAL not set.\n");
181 if (!(strut = xcb_get_property_value(prop))) {
186 DLOG(
"Reserved pixels changed to: left = %d, right = %d, top = %d, bottom = %d\n",
187 strut[0], strut[1], strut[2], strut[3]);
199 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
200 DLOG(
"WM_WINDOW_ROLE not set.\n");
206 if (asprintf(&new_role,
"%.*s", xcb_get_property_value_length(prop),
207 (
char*)xcb_get_property_value(prop)) == -1) {
208 perror(
"asprintf()");
209 DLOG(
"Could not get WM_WINDOW_ROLE\n");
214 win->
role = new_role;
215 LOG(
"WM_WINDOW_ROLE changed to \"%s\"\n", win->
role);
232 if (urgency_hint != NULL)
233 *urgency_hint =
false;
235 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
236 DLOG(
"WM_HINTS not set.\n");
244 DLOG(
"Could not get WM_HINTS\n");
250 LOG(
"WM_HINTS.input changed to \"%d\"\n", hints.input);
252 if (urgency_hint != NULL)