X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=25c470489596c8b12a42d3e3d91cfd9c9c0b87df;hb=173b9b764887929b7ff5d30b3e33f0602b0afda6;hp=0975214cbf4ddef804dc7e849d49a9c171b4fec8;hpb=b01dd0b20fedb27681ceda53deb8c7f2f83eabc3;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 0975214c..25c47048 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -98,7 +98,7 @@ ObFrame *frame_new(ObClient *client) mask = 0; if (visual) { /* client has a 32-bit visual */ - mask |= CWColormap | CWBackPixel | CWBorderPixel; + mask = CWColormap | CWBackPixel | CWBorderPixel; /* create a colormap with the visual */ self->colormap = attrib.colormap = XCreateColormap(obt_display, obt_root(ob_screen), @@ -114,7 +114,7 @@ ObFrame *frame_new(ObClient *client) mask = 0; if (visual) { /* client has a 32-bit visual */ - mask |= CWColormap | CWBackPixel | CWBorderPixel; + mask = CWColormap | CWBackPixel | CWBorderPixel; attrib.colormap = RrColormap(ob_rr_inst); } @@ -188,7 +188,7 @@ ObFrame *frame_new(ObClient *client) set_theme_statics(self); - return (ObFrame*)self; + return self; } static void set_theme_statics(ObFrame *self) @@ -1150,7 +1150,7 @@ static void layout_title(ObFrame *self) self->label_width = self->width - (ob_rr_theme->paddingx + 1) * 2; self->leftmost = self->rightmost = OB_FRAME_CONTEXT_NONE; - /* figure out what's being show, find each element's position, and the + /* figure out what's being shown, find each element's position, and the width of the label do the ones before the label, then after the label, @@ -1690,7 +1690,7 @@ static gboolean frame_animate_iconify(gpointer p) g_get_current_time(&now); time = frame_animate_iconify_time_left(self, &now); - if (time == 0 || iconifying) { + if ((time > 0 && iconifying) || (time == 0 && !iconifying)) { /* start where the frame is supposed to be */ x = self->area.x; y = self->area.y; @@ -1721,12 +1721,11 @@ static gboolean frame_animate_iconify(gpointer p) h = self->size.top; /* just the titlebar */ } + XMoveResizeWindow(obt_display, self->window, x, y, w, h); + XFlush(obt_display); + if (time == 0) frame_end_iconify_animation(self); - else { - XMoveResizeWindow(obt_display, self->window, x, y, w, h); - XFlush(obt_display); - } return time > 0; /* repeat until we're out of time */ }