18 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
19 DLOG(
"WM_CLASS not set.\n");
27 char *new_class = xcb_get_property_value(prop);
33 if ((strlen(new_class) + 1) < xcb_get_property_value_length(prop))
36 LOG(
"WM_CLASS changed to %s (instance), %s (class)\n",
55 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
56 DLOG(
"_NET_WM_NAME not specified, not changing\n");
63 if (asprintf(&new_name,
"%.*s", xcb_get_property_value_length(prop),
64 (
char*)xcb_get_property_value(prop)) == -1) {
66 DLOG(
"Could not get window name\n");
73 if (ucs2_name == NULL) {
74 LOG(
"Could not convert _NET_WM_NAME to UCS-2, ignoring new hint\n");
82 win->
name_x = (
char*)ucs2_name;
107 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
108 DLOG(
"WM_NAME not set (_NET_WM_NAME is what you want anyways).\n");
120 if (asprintf(&new_name,
"%.*s", xcb_get_property_value_length(prop),
121 (
char*)xcb_get_property_value(prop)) == -1) {
122 perror(
"asprintf()");
123 DLOG(
"Could not get legacy window name\n");
128 LOG(
"WM_NAME changed to \"%s\"\n", new_name);
129 LOG(
"Using legacy window title. Note that in order to get Unicode window "
130 "titles in i3, the application has to set _NET_WM_NAME (UTF-8)\n");
154 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
155 DLOG(
"CLIENT_LEADER not set.\n");
160 xcb_window_t *leader = xcb_get_property_value(prop);
161 if (leader == NULL) {
166 DLOG(
"Client leader changed to %08x\n", *leader);
178 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
179 DLOG(
"TRANSIENT_FOR not set.\n");
184 xcb_window_t transient_for;
190 DLOG(
"Transient for changed to %08x\n", transient_for);
202 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
203 DLOG(
"_NET_WM_STRUT_PARTIAL not set.\n");
209 if (!(strut = xcb_get_property_value(prop))) {
214 DLOG(
"Reserved pixels changed to: left = %d, right = %d, top = %d, bottom = %d\n",
215 strut[0], strut[1], strut[2], strut[3]);
227 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
228 DLOG(
"WM_WINDOW_ROLE not set.\n");
234 if (asprintf(&new_role,
"%.*s", xcb_get_property_value_length(prop),
235 (
char*)xcb_get_property_value(prop)) == -1) {
236 perror(
"asprintf()");
237 DLOG(
"Could not get WM_WINDOW_ROLE\n");
242 win->
role = new_role;
243 LOG(
"WM_WINDOW_ROLE changed to \"%s\"\n", win->
role);
260 if (prop == NULL || xcb_get_property_value_length(prop) == 0) {
261 DLOG(
"WM_HINTS not set.\n");
269 DLOG(
"Could not get WM_HINTS\n");
275 LOG(
"WM_HINTS.input changed to \"%d\"\n", hints.input);