all repos — openbox @ 8c05970840ed3a7c7ecc4a63f8f226791b495326

openbox fork - make it a bit more like ryudo

fix how the dock is placed, its struts, and set a window type hint on it
Dana Jansens danakj@orodu.net
commit

8c05970840ed3a7c7ecc4a63f8f226791b495326

parent

809619497d73598a9f3c2bd2e4b8968297af6bfd

1 files changed, 18 insertions(+), 13 deletions(-)

jump to
M openbox/dock.copenbox/dock.c

@@ -94,6 +94,10 @@ XSetWindowBorder(ob_display, dock->frame,

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)); }

@@ -214,13 +218,13 @@

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;

@@ -239,21 +243,25 @@ break;

} } - 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; }

@@ -435,8 +443,8 @@ }

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) {

@@ -497,9 +505,6 @@ }

break; } } - - dock->w += minw; - dock->h += minh; /* not used for actually sizing shit */ dock->w -= ob_rr_theme->obwidth * 2;