]> Dogcows Code - chaz/openbox/commitdiff
no un-needed rendering
authorDana Jansens <danakj@orodu.net>
Wed, 13 Jun 2007 12:37:52 +0000 (12:37 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 13 Jun 2007 12:37:52 +0000 (12:37 +0000)
openbox/frame.c
openbox/frame.h
openbox/framerender.c

index 7d7ac901680de3e6d61d42655ee209ee6859c04c..aab30f1f182ae6791d318ce0fe28adfc3d75a03c 100644 (file)
@@ -248,6 +248,7 @@ void frame_show(ObFrame *self)
 {
     if (!self->visible) {
         self->visible = TRUE;
+        framerender_frame(self);
         XMapWindow(ob_display, self->client->window);
         XMapWindow(ob_display, self->window);
     }
@@ -773,6 +774,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                     self->size.left, self->size.top);
 
         if (resized) {
+            self->need_render = TRUE;
             framerender_frame(self);
             frame_adjust_shape(self);
         }
@@ -871,23 +873,27 @@ void frame_adjust_client_area(ObFrame *self)
 
 void frame_adjust_state(ObFrame *self)
 {
+    self->need_render = TRUE;
     framerender_frame(self);
 }
 
 void frame_adjust_focus(ObFrame *self, gboolean hilite)
 {
     self->focused = hilite;
+    self->need_render = TRUE;
     framerender_frame(self);
     XFlush(ob_display);
 }
 
 void frame_adjust_title(ObFrame *self)
 {
+    self->need_render = TRUE;
     framerender_frame(self);
 }
 
 void frame_adjust_icon(ObFrame *self)
 {
+    self->need_render = TRUE;
     framerender_frame(self);
 }
 
index 2f7d1e746bf08ce408454a06ec0ae46cf11fb92c..cf840bdf1b4aabee568579411a8bd38a2787992e 100644 (file)
@@ -185,6 +185,7 @@ struct _ObFrame
     gboolean  iconify_hover;
 
     gboolean  focused;
+    gboolean  need_render;
 
     gboolean  flashing;
     gboolean  flash_on;
index a02567bd0a24df31e007a2845d026b4e3dd75371..fe789d9618585af727dbd736e6e0a0e731d592d9 100644 (file)
@@ -36,6 +36,11 @@ void framerender_frame(ObFrame *self)
 {
     if (frame_iconify_animating(self))
         return; /* delay redrawing until the animation is done */
+    if (!self->need_render)
+        return;
+    if (!self->visible)
+        return;
+    self->need_render = FALSE;
 
     {
         gulong px;
This page took 0.031617 seconds and 4 git commands to generate.