self->desktop = settings->desktop - 1;
}
+ if (settings->opacity != -1)
+ self->opacity = settings->opacity;
+
if (settings->layer == -1) {
self->below = TRUE;
self->above = FALSE;
self->max_horz = self->session->max_horz;
self->max_vert = self->session->max_vert;
self->undecorated = self->session->undecorated;
+
+ self->opacity = self->session->opacity;
}
static gboolean client_restore_session_stacking(ObClient *self)
gboolean demands_attention = self->demands_attention;
gboolean max_horz = self->max_horz;
gboolean max_vert = self->max_vert;
+ guint8 opacity = self->opacity;
Rect oldarea;
gint l;
/* make sure client_setup_decor_and_functions() is called at least once */
client_setup_decor_and_functions(self, FALSE);
+ /* make the client semi-transparent */
+ client_set_opacity(self, opacity);
+
/* if the window hasn't been configured yet, then do so now, in fact the
x,y,w,h may _not_ be the same as the area rect, which can end up
meaning that the client isn't properly moved/resized by the fullscreen
focus_cycle_addremove(NULL, TRUE);
}
+void client_set_opacity(ObClient *self, guint8 opacity)
+{
+ OBT_PROP_SET32(self->window, NET_WM_WINDOW_OPACITY, CARDINAL,
+ opacity * 16777216);
+}
+
gboolean client_is_direct_child(ObClient *parent, ObClient *child)
{
while (child != parent && (child = client_direct_parent(child)));