summaryrefslogtreecommitdiff
path: root/plugingui/widget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/widget.cc')
-rw-r--r--plugingui/widget.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugingui/widget.cc b/plugingui/widget.cc
index 65d269b..6106f7c 100644
--- a/plugingui/widget.cc
+++ b/plugingui/widget.cc
@@ -35,15 +35,17 @@ namespace GUI {
Widget::Widget(Widget *parent)
: pixbuf(1, 1)
+ , parent(parent)
+ , _window(nullptr)
{
_width = _height = 10;
- this->parent = parent;
if(parent)
{
parent->addChild(this);
_window = parent->window();
}
+
_width = _height = 0;
_visible = true;
}
@@ -173,7 +175,7 @@ Window *Widget::window()
void Widget::repaint_r(RepaintEvent *e)
{
- Painter p(this); // make sure pixbuf refcount is incremented.
+ Painter p(*this); // make sure pixbuf refcount is incremented.
repaintEvent(e);