RrColorPixel(ob_rr_theme->osd_border_color));
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->obwidth);
+ /* Setting the window type so xcompmgr can tell what it is */
+ PROP_SET32(dock->frame, net_wm_window_type, atom,
+ prop_atoms.net_wm_window_type_dock);
+
g_hash_table_insert(window_map, &dock->frame, dock);
stacking_add(DOCK_AS_WINDOW(dock));
}
void dock_configure()
{
GList *it;
- gint spot;
+ gint hspot, vspot;
gint gravity;
- gint minw, minh;
+ gint l, r, t, b;
gint strw, strh;
Rect *a;
- RrMinSize(dock->a_frame, &minw, &minh);
+ RrMargins(dock->a_frame, &l, &t, &r, &b);
dock->w = dock->h = 0;
}
}
- spot = (config_dock_orient == OB_ORIENTATION_HORZ ? minw : minh) / 2;
+ dock->w += l + r;
+ dock->h += t + b;
+
+ hspot = l;
+ vspot = t;
/* position the apps */
for (it = dock->dock_apps; it; it = g_list_next(it)) {
ObDockApp *app = it->data;
switch (config_dock_orient) {
case OB_ORIENTATION_HORZ:
- app->x = spot;
+ app->x = hspot;
app->y = (dock->h - app->h) / 2;
- spot += app->w;
+ hspot += app->w;
break;
case OB_ORIENTATION_VERT:
app->x = (dock->w - app->w) / 2;
- app->y = spot;
- spot += app->h;
+ app->y = vspot;
+ vspot += app->h;
break;
}
break;
case OB_DIRECTION_NORTH:
STRUT_PARTIAL_SET(dock_strut, 0, strh, 0, 0,
- dock->x, dock->x + dock->w - 1,
- 0, 0, 0, 0, 0, 0);
+ 0, 0, dock->x, dock->x + dock->w - 1,
+ 0, 0, 0, 0);
break;
case OB_DIRECTION_NORTHEAST:
switch (config_dock_orient) {
}
}
- dock->w += minw;
- dock->h += minh;
-
/* not used for actually sizing shit */
dock->w -= ob_rr_theme->obwidth * 2;
dock->h -= ob_rr_theme->obwidth * 2;