summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-28 18:58:02 +0000
committerracarr <racarr>2007-01-28 18:58:02 +0000
commitb0a006e517453cf7e9167e392910abed7aa267ed (patch)
tree715e4882cd6a0aeb153745975b3465f927b5a993
parent86588f48cd5df1ba67dc6cf43fc74787c64c47cd (diff)
downloadberyl-desktop-manager-b0a006e517453cf7e9167e392910abed7aa267ed.tar.gz
beryl-desktop-manager-b0a006e517453cf7e9167e392910abed7aa267ed.tar.bz2
Add needsPainting attrib to BDMPaintAttrib so widget can update this and then BDM can check if widget->attrib->needsPainting and then on each image check image->attrib->needsPainting and likewise for each text
-rw-r--r--src/bdm.c23
-rw-r--r--src/bdm.h4
2 files changed, 18 insertions, 9 deletions
diff --git a/src/bdm.c b/src/bdm.c
index c895e3c..682e52a 100644
--- a/src/bdm.c
+++ b/src/bdm.c
@@ -55,17 +55,22 @@ static void updateWidgets(cairo_t * cr,ScreenArea * area)
for (widget=widgetList->head;widget;widget=widget->next)
{
widget->updateWidget();
- for (image = widget->getImages(); image; image = image->next)
+ if (widget->attrib->needsPainting)
{
- renderImage(cr,image,area);
- }
- // DO TEXT
- /*
- for (text = widget->getText(); text; text=text->next)
- {
- renderText(cr,text,area);
+ for (image = widget->getImages(); image; image = image->next)
+ {
+ if (image->attrib->needsPainting)
+ renderImage(cr,image,area);
+ }
+ // DO TEXT
+ /*
+ for (text = widget->getText(); text; text=text->next)
+ {
+ if (text->attrib->needsPainting)
+ renderText(cr,text,area);
+ }
+ */
}
- */
}
}
diff --git a/src/bdm.h b/src/bdm.h
index c5f705b..e1c1231 100644
--- a/src/bdm.h
+++ b/src/bdm.h
@@ -74,6 +74,8 @@ typedef struct _BDMPaintAttribs
double xrot;
int alpha;
+
+ int needsPainting;
} BDMPaintAttribs;
typedef struct _BDMImage BDMImage;
@@ -128,6 +130,8 @@ struct _BDMWidget
BDMPaintAttribs * attrib;
BDMImage * images;
BDMText * text;
+ BDMWidget * next;
+ BDMWidget * prev;
BDMWidgetInitProc initWidget;
BDMWidgetFiniProc finiWidget;