use the osd theme stuff for the dock instead of active titlebar
This commit is contained in:
parent
b068bf8528
commit
d3c22b58cb
1 changed files with 26 additions and 27 deletions
|
@ -57,12 +57,11 @@ void dock_startup(gboolean reconfig)
|
||||||
GList *it;
|
GList *it;
|
||||||
|
|
||||||
XSetWindowBorder(ob_display, dock->frame,
|
XSetWindowBorder(ob_display, dock->frame,
|
||||||
RrColorPixel(ob_rr_theme->
|
RrColorPixel(ob_rr_theme->osd_border_color));
|
||||||
frame_focused_border_color));
|
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->obwidth);
|
||||||
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->fbwidth);
|
|
||||||
|
|
||||||
RrAppearanceFree(dock->a_frame);
|
RrAppearanceFree(dock->a_frame);
|
||||||
dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title);
|
dock->a_frame = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
|
||||||
|
|
||||||
stacking_add(DOCK_AS_WINDOW(dock));
|
stacking_add(DOCK_AS_WINDOW(dock));
|
||||||
|
|
||||||
|
@ -90,10 +89,10 @@ void dock_startup(gboolean reconfig)
|
||||||
RrVisual(ob_rr_inst),
|
RrVisual(ob_rr_inst),
|
||||||
CWOverrideRedirect | CWEventMask,
|
CWOverrideRedirect | CWEventMask,
|
||||||
&attrib);
|
&attrib);
|
||||||
dock->a_frame = RrAppearanceCopy(ob_rr_theme->a_focused_title);
|
dock->a_frame = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
|
||||||
XSetWindowBorder(ob_display, dock->frame,
|
XSetWindowBorder(ob_display, dock->frame,
|
||||||
RrColorPixel(ob_rr_theme->frame_focused_border_color));
|
RrColorPixel(ob_rr_theme->osd_border_color));
|
||||||
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->fbwidth);
|
XSetWindowBorderWidth(ob_display, dock->frame, ob_rr_theme->obwidth);
|
||||||
|
|
||||||
g_hash_table_insert(window_map, &dock->frame, dock);
|
g_hash_table_insert(window_map, &dock->frame, dock);
|
||||||
stacking_add(DOCK_AS_WINDOW(dock));
|
stacking_add(DOCK_AS_WINDOW(dock));
|
||||||
|
@ -262,8 +261,8 @@ void dock_configure()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used for calculating offsets */
|
/* used for calculating offsets */
|
||||||
dock->w += ob_rr_theme->fbwidth * 2;
|
dock->w += ob_rr_theme->obwidth * 2;
|
||||||
dock->h += ob_rr_theme->fbwidth * 2;
|
dock->h += ob_rr_theme->obwidth * 2;
|
||||||
|
|
||||||
a = screen_physical_area();
|
a = screen_physical_area();
|
||||||
|
|
||||||
|
@ -350,51 +349,51 @@ void dock_configure()
|
||||||
case OB_DIRECTION_NORTHWEST:
|
case OB_DIRECTION_NORTHWEST:
|
||||||
switch (config_dock_orient) {
|
switch (config_dock_orient) {
|
||||||
case OB_ORIENTATION_HORZ:
|
case OB_ORIENTATION_HORZ:
|
||||||
dock->y -= dock->h - ob_rr_theme->fbwidth;
|
dock->y -= dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_ORIENTATION_VERT:
|
case OB_ORIENTATION_VERT:
|
||||||
dock->x -= dock->w - ob_rr_theme->fbwidth;
|
dock->x -= dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_NORTH:
|
case OB_DIRECTION_NORTH:
|
||||||
dock->y -= dock->h - ob_rr_theme->fbwidth;
|
dock->y -= dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_NORTHEAST:
|
case OB_DIRECTION_NORTHEAST:
|
||||||
switch (config_dock_orient) {
|
switch (config_dock_orient) {
|
||||||
case OB_ORIENTATION_HORZ:
|
case OB_ORIENTATION_HORZ:
|
||||||
dock->y -= dock->h - ob_rr_theme->fbwidth;
|
dock->y -= dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_ORIENTATION_VERT:
|
case OB_ORIENTATION_VERT:
|
||||||
dock->x += dock->w - ob_rr_theme->fbwidth;
|
dock->x += dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_WEST:
|
case OB_DIRECTION_WEST:
|
||||||
dock->x -= dock->w - ob_rr_theme->fbwidth;
|
dock->x -= dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_EAST:
|
case OB_DIRECTION_EAST:
|
||||||
dock->x += dock->w - ob_rr_theme->fbwidth;
|
dock->x += dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_SOUTHWEST:
|
case OB_DIRECTION_SOUTHWEST:
|
||||||
switch (config_dock_orient) {
|
switch (config_dock_orient) {
|
||||||
case OB_ORIENTATION_HORZ:
|
case OB_ORIENTATION_HORZ:
|
||||||
dock->y += dock->h - ob_rr_theme->fbwidth;
|
dock->y += dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_ORIENTATION_VERT:
|
case OB_ORIENTATION_VERT:
|
||||||
dock->x -= dock->w - ob_rr_theme->fbwidth;
|
dock->x -= dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
} break;
|
} break;
|
||||||
case OB_DIRECTION_SOUTH:
|
case OB_DIRECTION_SOUTH:
|
||||||
dock->y += dock->h - ob_rr_theme->fbwidth;
|
dock->y += dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_SOUTHEAST:
|
case OB_DIRECTION_SOUTHEAST:
|
||||||
switch (config_dock_orient) {
|
switch (config_dock_orient) {
|
||||||
case OB_ORIENTATION_HORZ:
|
case OB_ORIENTATION_HORZ:
|
||||||
dock->y += dock->h - ob_rr_theme->fbwidth;
|
dock->y += dock->h - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
case OB_ORIENTATION_VERT:
|
case OB_ORIENTATION_VERT:
|
||||||
dock->x += dock->w - ob_rr_theme->fbwidth;
|
dock->x += dock->w - ob_rr_theme->obwidth;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -403,8 +402,8 @@ void dock_configure()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config_dock_floating && config_dock_hide) {
|
if (!config_dock_floating && config_dock_hide) {
|
||||||
strw = ob_rr_theme->fbwidth;
|
strw = ob_rr_theme->obwidth;
|
||||||
strh = ob_rr_theme->fbwidth;
|
strh = ob_rr_theme->obwidth;
|
||||||
} else {
|
} else {
|
||||||
strw = dock->w;
|
strw = dock->w;
|
||||||
strh = dock->h;
|
strh = dock->h;
|
||||||
|
@ -503,8 +502,8 @@ void dock_configure()
|
||||||
dock->h += minh;
|
dock->h += minh;
|
||||||
|
|
||||||
/* not used for actually sizing shit */
|
/* not used for actually sizing shit */
|
||||||
dock->w -= ob_rr_theme->fbwidth * 2;
|
dock->w -= ob_rr_theme->obwidth * 2;
|
||||||
dock->h -= ob_rr_theme->fbwidth * 2;
|
dock->h -= ob_rr_theme->obwidth * 2;
|
||||||
|
|
||||||
if (dock->dock_apps) {
|
if (dock->dock_apps) {
|
||||||
g_assert(dock->w > 0);
|
g_assert(dock->w > 0);
|
||||||
|
@ -519,8 +518,8 @@ void dock_configure()
|
||||||
XUnmapWindow(ob_display, dock->frame);
|
XUnmapWindow(ob_display, dock->frame);
|
||||||
|
|
||||||
/* but they are useful outside of this function! */
|
/* but they are useful outside of this function! */
|
||||||
dock->w += ob_rr_theme->fbwidth * 2;
|
dock->w += ob_rr_theme->obwidth * 2;
|
||||||
dock->h += ob_rr_theme->fbwidth * 2;
|
dock->h += ob_rr_theme->obwidth * 2;
|
||||||
|
|
||||||
screen_update_areas();
|
screen_update_areas();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue