if (resized) {
framerender_frame(self);
-
frame_adjust_shape(self);
}
if (!STRUT_EQUAL(self->size, oldsize)) {
- guint32 vals[4];
+ gulong vals[4];
vals[0] = self->size.left;
vals[1] = self->size.right;
vals[2] = self->size.top;
if (focus_cycle_target == self->client)
focus_cycle_draw_indicator();
}
+ if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR))
+ XResizeWindow(ob_display, self->label, self->label_width,
+ ob_rr_theme->label_height);
}
void frame_adjust_state(ObFrame *self)
ob_rr_theme->padding + 1);
break;
case 'D':
- if (d) { *lc = ' '; break; } /* rm duplicates */
+ if (d) { *lc = ' '; break; }
+ if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) && config_theme_hidedisabled)
+ break;
d = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
break;
case 'S':
- if (s) { *lc = ' '; break; } /* rm duplicates */
+ if (s) { *lc = ' '; break; }
+ if (!(self->decorations & OB_FRAME_DECOR_SHADE) && config_theme_hidedisabled)
+ break;
s = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
break;
case 'I':
- if (i) { *lc = ' '; break; } /* rm duplicates */
+ if (i) { *lc = ' '; break; }
+ if (!(self->decorations & OB_FRAME_DECOR_ICONIFY) && config_theme_hidedisabled)
+ break;
i = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
break;
case 'L':
- if (l) { *lc = ' '; break; } /* rm duplicates */
+ if (l) { *lc = ' '; break; }
l = TRUE;
break;
case 'M':
- if (m) { *lc = ' '; break; } /* rm duplicates */
+ if (m) { *lc = ' '; break; }
+ if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) && config_theme_hidedisabled)
+ break;
m = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
break;
case 'C':
- if (c) { *lc = ' '; break; } /* rm duplicates */
+ if (c) { *lc = ' '; break; }
+ if (!(self->decorations & OB_FRAME_DECOR_CLOSE) && config_theme_hidedisabled)
+ break;
c = TRUE;
self->label_width -= (ob_rr_theme->button_size +
ob_rr_theme->padding + 1);
}
if (self->label_width < 1) self->label_width = 1;
- XResizeWindow(ob_display, self->label, self->label_width,
- ob_rr_theme->label_height);
-
if (!n) XUnmapWindow(ob_display, self->icon);
if (!d) XUnmapWindow(ob_display, self->desk);
if (!s) XUnmapWindow(ob_display, self->shade);