X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fframe-draw.c;h=fbe58061bafed48a608e1407bbaf4a1aeeda6e52;hp=925a8583dd9afc47b4ec3fb471d62cbfe6f14570;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=720e6978185b09f2b2f60a6b96018238085a7238 diff --git a/ioncore/frame-draw.c b/ioncore/frame-draw.c index 925a858..fbe5806 100644 --- a/ioncore/frame-draw.c +++ b/ioncore/frame-draw.c @@ -1,7 +1,7 @@ /* * ion/ioncore/frame-draw.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ @@ -42,8 +42,6 @@ GR_DEFATTR(dragged); GR_DEFATTR(not_dragged); GR_DEFATTR(activity); GR_DEFATTR(no_activity); -GR_DEFATTR(quasiactive); -GR_DEFATTR(not_quasiactive); static void ensure_create_attrs() @@ -59,8 +57,6 @@ 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; } @@ -187,6 +183,22 @@ void frame_managed_geom(const WFrame *frame, WRectangle *geom) } +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]; @@ -302,6 +314,8 @@ void frame_recalc_bar(WFrame *frame, bool complete) if(frame->barmode==FRAME_BAR_SHAPED) frame_shaped_recalc_bar_size(frame, complete); + else if(complete) + frame_clear_shape(frame); i=0; @@ -576,21 +590,5 @@ void frame_activated(WFrame *frame) } -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)); - } -} - - /*}}}*/