X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fwidget.hh;h=07b6c0845ba1d38039bfa6acab9d6641eb6e0466;hb=838f76cd216aaadce186ab5dd4302845d89dd2f8;hp=2e4de47e1adb503e929f852ea82c18060eefdea6;hpb=99cd843fc6dc7a7f55b6c90fd1162f233853aad2;p=chaz%2Fopenbox diff --git a/otk/widget.hh b/otk/widget.hh index 2e4de47e..07b6c084 100644 --- a/otk/widget.hh +++ b/otk/widget.hh @@ -52,7 +52,7 @@ public: inline bool visible() const { return _visible; } virtual void update(); - virtual void refresh() { _dirty = true; render(); } + virtual void refresh() { if (_visible) { _dirty = true; render(); } } virtual void setBevel(int b); inline int bevel() const { return _bevel; } @@ -77,7 +77,7 @@ public: virtual void exposeHandler(const XExposeEvent &e); virtual void configureHandler(const XConfigureEvent &e); - virtual void styleChanged(const RenderStyle &) {calcDefaultSizes();update();} + virtual void styleChanged(const RenderStyle &style); protected: virtual void addChild(Widget *w) { assert(w); _children.push_back(w); } @@ -85,7 +85,7 @@ protected: //! Find the default min/max sizes for the widget. Useful after the in-use //! style has changed. - virtual void calcDefaultSizes() {}; + virtual void calcDefaultSizes(); virtual void setMinSize(const Size &s); @@ -100,9 +100,11 @@ protected: void createWindow(bool overrideredir); RenderTexture *_texture; + + EventDispatcher *dispatcher() const { return _dispatcher; } private: - void internal_moveresize(int x, int y, unsigned w, unsigned int h); + void internal_moveresize(int x, int y, int w, int h); int _screen; Widget *_parent;