/*
* ion/ioncore/frame-draw.c
*
- * Copyright (c) Tuomo Valkonen 1999-2007.
+ * Copyright (c) Tuomo Valkonen 1999-2008.
*
* See the included file LICENSE for details.
*/
GR_DEFATTR(not_dragged);
GR_DEFATTR(activity);
GR_DEFATTR(no_activity);
-GR_DEFATTR(quasiactive);
-GR_DEFATTR(not_quasiactive);
static void ensure_create_attrs()
GR_ALLOCATTR(not_dragged);
GR_ALLOCATTR(no_activity);
GR_ALLOCATTR(activity);
- GR_ALLOCATTR(quasiactive);
- GR_ALLOCATTR(not_quasiactive);
GR_ALLOCATTR_END;
}
}
+int frame_shaded_height(const WFrame *frame)
+{
+ if(frame->barmode==FRAME_BAR_NONE){
+ return 0;
+ }else if(!BAR_INSIDE_BORDER(frame)){
+ return frame->bar_h;
+ }else {
+ GrBorderWidths bdw;
+
+ grbrush_get_border_widths(frame->brush, &bdw);
+
+ return frame->bar_h+bdw.top+bdw.bottom;
+ }
+}
+
+
void frame_set_shape(WFrame *frame)
{
WRectangle gs[2];
if(frame->barmode==FRAME_BAR_SHAPED)
frame_shaped_recalc_bar_size(frame, complete);
+ else if(complete)
+ frame_clear_shape(frame);
i=0;
}
-void frame_quasiactivity_change(WFrame *frame)
-{
- bool is=(frame->quasiact_source!=NULL);
-
- ensure_create_attrs();
-
- if(is){
- gr_stylespec_set(&frame->baseattr, GR_ATTR(quasiactive));
- gr_stylespec_unset(&frame->baseattr, GR_ATTR(not_quasiactive));
- }else{
- gr_stylespec_set(&frame->baseattr, GR_ATTR(not_quasiactive));
- gr_stylespec_unset(&frame->baseattr, GR_ATTR(quasiactive));
- }
-}
-
-
/*}}}*/