]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/infowin.c
Update cfg_kludge_flash for Flash 10
[ion3.git] / ioncore / infowin.c
index d23823ea4981384f10096b0e370ebadbda0d16a9..66029b2a41ff5ad675769d8e0f9dc4d5d3b0758c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ion/ioncore/infowin.h
  *
- * Copyright (c) Tuomo Valkonen 1999-2007
+ * Copyright (c) Tuomo Valkonen 1999-2009
  *
  * See the included file LICENSE for details.
  */
@@ -51,8 +51,6 @@ bool infowin_init(WInfoWin *p, WWindow *parent, const WFitParams *fp,
     if(p->brush==NULL)
         goto fail3;
     
-    p->wwin.region.flags|=REGION_SKIP_FOCUS;
-    
     /* Enable save unders */
     attr.save_under=True;
     XChangeWindowAttributes(ioncore_g.dpy, p->wwin.win, CWSaveUnder, &attr);
@@ -200,18 +198,22 @@ void infowin_set_text(WInfoWin *p, const char *str, int maxw)
 {
     bool set=FALSE;
     
-    if(maxw>0 && p->brush!=NULL){
-        char *tmp=grbrush_make_label(p->brush, str, maxw);
-        if(tmp!=NULL){
-            infowin_do_set_text(p, tmp);
-            free(tmp);
-            set=TRUE;
+    if(str==NULL){
+        INFOWIN_BUFFER(p)[0]='\0';
+    }else{
+        if(maxw>0 && p->brush!=NULL){
+            char *tmp=grbrush_make_label(p->brush, str, maxw);
+            if(tmp!=NULL){
+                infowin_do_set_text(p, tmp);
+                free(tmp);
+                set=TRUE;
+            }
         }
+        
+        if(!set)
+            infowin_do_set_text(p, str);
     }
     
-    if(!set)
-        infowin_do_set_text(p, str);
-
     infowin_resize(p);
     
     /* sometimes unnecessary */