]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/frame-draw.c
[svn-upgrade] Integrating new upstream version, ion3 (20071220)
[ion3.git] / ioncore / frame-draw.c
index 925a8583dd9afc47b4ec3fb471d62cbfe6f14570..8591f2a254b3f84ca03fe99d4d5b6d76c51ad5a7 100644 (file)
@@ -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));
-    }
-}
-
-
 /*}}}*/