no un-needed rendering
This commit is contained in:
parent
383f1ee85f
commit
44bc0dab88
3 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ struct _ObFrame
|
|||
gboolean iconify_hover;
|
||||
|
||||
gboolean focused;
|
||||
gboolean need_render;
|
||||
|
||||
gboolean flashing;
|
||||
gboolean flash_on;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue