diff options
author | rathnor <rathnor> | 2003-10-09 16:48:09 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-10-09 16:48:09 (GMT) |
commit | 018665d7a3ae8cb642880176d415f57fc178c299 (patch) | |
tree | 05a21b11a9f28bd8b456e080be52148de30f5018 /src | |
parent | 075dc35b5eeb875e971842e8230338395367e08f (diff) | |
download | fluxbox-018665d7a3ae8cb642880176d415f57fc178c299.zip fluxbox-018665d7a3ae8cb642880176d415f57fc178c299.tar.bz2 |
drawing optimisations and fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/Container.cc | 8 | ||||
-rw-r--r-- | src/FbTk/Color.hh | 12 | ||||
-rw-r--r-- | src/FbTk/GContext.cc | 64 | ||||
-rw-r--r-- | src/FbTk/GContext.hh | 63 | ||||
-rw-r--r-- | src/FbTk/ImageControl.cc | 29 | ||||
-rw-r--r-- | src/FbTk/ImageControl.hh | 21 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 13 | ||||
-rw-r--r-- | src/IconbarTool.cc | 8 | ||||
-rw-r--r-- | src/fluxbox.cc | 9 |
9 files changed, 129 insertions, 98 deletions
diff --git a/src/Container.cc b/src/Container.cc index d1d9fd7..5b985eb 100644 --- a/src/Container.cc +++ b/src/Container.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: Container.cc,v 1.4 2003/09/15 20:13:24 fluxgen Exp $ | 23 | // $Id: Container.cc,v 1.5 2003/10/09 16:48:09 rathnor Exp $ |
24 | 24 | ||
25 | #include "FbTk/Button.hh" | 25 | #include "FbTk/Button.hh" |
26 | #include "Container.hh" | 26 | #include "Container.hh" |
@@ -128,7 +128,8 @@ void Container::removeItem(int index) { | |||
128 | void Container::removeAll() { | 128 | void Container::removeAll() { |
129 | m_selected = 0; | 129 | m_selected = 0; |
130 | m_item_list.clear(); | 130 | m_item_list.clear(); |
131 | clear(); | 131 | if (!m_update_lock) |
132 | clear(); | ||
132 | 133 | ||
133 | } | 134 | } |
134 | 135 | ||
@@ -162,7 +163,8 @@ void Container::setSelected(int pos) { | |||
162 | } | 163 | } |
163 | 164 | ||
164 | void Container::exposeEvent(XExposeEvent &event) { | 165 | void Container::exposeEvent(XExposeEvent &event) { |
165 | clearArea(event.x, event.y, event.width, event.height); | 166 | if (!m_update_lock) |
167 | clearArea(event.x, event.y, event.width, event.height); | ||
166 | } | 168 | } |
167 | 169 | ||
168 | void Container::repositionItems() { | 170 | void Container::repositionItems() { |
diff --git a/src/FbTk/Color.hh b/src/FbTk/Color.hh index f9c1600..b699dcc 100644 --- a/src/FbTk/Color.hh +++ b/src/FbTk/Color.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Color.hh,v 1.4 2003/05/10 13:29:13 fluxgen Exp $ | 25 | // $Id: Color.hh,v 1.5 2003/10/09 16:48:09 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_COLOR_HH | 27 | #ifndef FBTK_COLOR_HH |
28 | #define FBTK_COLOR_HH | 28 | #define FBTK_COLOR_HH |
@@ -49,11 +49,11 @@ public: | |||
49 | // TODO | 49 | // TODO |
50 | //Color &operator = (const Color &col_copy); | 50 | //Color &operator = (const Color &col_copy); |
51 | 51 | ||
52 | bool isAllocated() const { return m_allocated; } | 52 | inline bool isAllocated() const { return m_allocated; } |
53 | unsigned short red() const { return m_red; } | 53 | inline unsigned short red() const { return m_red; } |
54 | unsigned short green() const { return m_green; } | 54 | inline unsigned short green() const { return m_green; } |
55 | unsigned short blue() const { return m_blue; } | 55 | inline unsigned short blue() const { return m_blue; } |
56 | unsigned long pixel() const { return m_pixel; } | 56 | inline unsigned long pixel() const { return m_pixel; } |
57 | 57 | ||
58 | private: | 58 | private: |
59 | void free(); | 59 | void free(); |
diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc index f3fcaf4..6b41726 100644 --- a/src/FbTk/GContext.cc +++ b/src/FbTk/GContext.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: GContext.cc,v 1.3 2003/09/11 19:57:38 fluxgen Exp $ | 22 | // $Id: GContext.cc,v 1.4 2003/10/09 16:48:09 rathnor Exp $ |
23 | 23 | ||
24 | #include "GContext.hh" | 24 | #include "GContext.hh" |
25 | 25 | ||
@@ -32,74 +32,30 @@ | |||
32 | namespace FbTk { | 32 | namespace FbTk { |
33 | 33 | ||
34 | GContext::GContext(const FbTk::FbDrawable &drawable): | 34 | GContext::GContext(const FbTk::FbDrawable &drawable): |
35 | m_gc(XCreateGC(FbTk::App::instance()->display(), | 35 | m_display(FbTk::App::instance()->display()), |
36 | m_gc(XCreateGC(m_display, | ||
36 | drawable.drawable(), | 37 | drawable.drawable(), |
37 | 0, 0)) { | 38 | 0, 0)) { |
38 | setGraphicsExposure(false); | 39 | setGraphicsExposure(false); |
39 | } | 40 | } |
40 | 41 | ||
41 | GContext::GContext(Drawable drawable): | 42 | GContext::GContext(Drawable drawable): |
42 | m_gc(XCreateGC(FbTk::App::instance()->display(), | 43 | m_display(FbTk::App::instance()->display()), |
44 | m_gc(XCreateGC(m_display, | ||
43 | drawable, | 45 | drawable, |
44 | 0, 0)) { | 46 | 0, 0)) |
47 | { | ||
45 | setGraphicsExposure(false); | 48 | setGraphicsExposure(false); |
46 | } | 49 | } |
47 | 50 | ||
48 | GContext::~GContext() { | 51 | GContext::~GContext() { |
49 | if (m_gc) | 52 | if (m_gc) |
50 | XFreeGC(FbTk::App::instance()->display(), m_gc); | 53 | XFreeGC(m_display, m_gc); |
51 | } | ||
52 | |||
53 | void GContext::setForeground(const FbTk::Color &color) { | ||
54 | setForeground(color.pixel()); | ||
55 | } | ||
56 | |||
57 | void GContext::setForeground(long pixel_value) { | ||
58 | XSetForeground(FbTk::App::instance()->display(), m_gc, | ||
59 | pixel_value); | ||
60 | } | ||
61 | |||
62 | void GContext::setBackground(const FbTk::Color &color) { | ||
63 | setBackground(color.pixel()); | ||
64 | } | ||
65 | |||
66 | void GContext::setBackground(long pixel_value) { | ||
67 | XSetBackground(FbTk::App::instance()->display(), m_gc, | ||
68 | pixel_value); | ||
69 | } | 54 | } |
70 | 55 | ||
71 | /// not implemented! | 56 | /// not implemented! |
72 | void GContext::setFont(const FbTk::Font &font) { | 57 | //void GContext::setFont(const FbTk::Font &font) { |
73 | //!! TODO | 58 | //!! TODO |
74 | } | 59 | //} |
75 | |||
76 | void GContext::setFont(int fid) { | ||
77 | XSetFont(FbTk::App::instance()->display(), m_gc, fid); | ||
78 | } | ||
79 | void GContext::setClipMask(const FbTk::FbPixmap &mask) { | ||
80 | XSetClipMask(FbTk::App::instance()->display(), m_gc, | ||
81 | mask.drawable()); | ||
82 | } | ||
83 | |||
84 | void GContext::setClipOrigin(int x, int y) { | ||
85 | XSetClipOrigin(FbTk::App::instance()->display(), m_gc, | ||
86 | x, y); | ||
87 | } | ||
88 | |||
89 | void GContext::setGraphicsExposure(bool flag) { | ||
90 | XSetGraphicsExposures(FbTk::App::instance()->display(), m_gc, | ||
91 | flag); | ||
92 | } | ||
93 | |||
94 | void GContext::setFunction(int func) { | ||
95 | XSetFunction(FbTk::App::instance()->display(), m_gc, | ||
96 | func); | ||
97 | } | ||
98 | |||
99 | void GContext::setSubwindowMode(int mode) { | ||
100 | XSetSubwindowMode(FbTk::App::instance()->display(), m_gc, | ||
101 | mode); | ||
102 | } | ||
103 | |||
104 | 60 | ||
105 | } // end namespace FbTk | 61 | } // end namespace FbTk |
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh index 6175b2d..c192879 100644 --- a/src/FbTk/GContext.hh +++ b/src/FbTk/GContext.hh | |||
@@ -19,19 +19,20 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: GContext.hh,v 1.3 2003/09/11 19:57:38 fluxgen Exp $ | 22 | // $Id: GContext.hh,v 1.4 2003/10/09 16:48:09 rathnor Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_GCONTEXT_HH | 24 | #ifndef FBTK_GCONTEXT_HH |
25 | #define FBTK_GCONTEXT_HH | 25 | #define FBTK_GCONTEXT_HH |
26 | 26 | ||
27 | #include "Color.hh" | ||
28 | #include "FbPixmap.hh" | ||
29 | |||
27 | #include <X11/Xlib.h> | 30 | #include <X11/Xlib.h> |
28 | 31 | ||
29 | namespace FbTk { | 32 | namespace FbTk { |
30 | 33 | ||
31 | class FbDrawable; | 34 | class FbDrawable; |
32 | class FbPixmap; | ||
33 | class Font; | 35 | class Font; |
34 | class Color; | ||
35 | 36 | ||
36 | /// wrapper for X GC | 37 | /// wrapper for X GC |
37 | class GContext { | 38 | class GContext { |
@@ -43,23 +44,55 @@ public: | |||
43 | 44 | ||
44 | virtual ~GContext(); | 45 | virtual ~GContext(); |
45 | 46 | ||
46 | void setForeground(const FbTk::Color &color); | 47 | inline void setForeground(const FbTk::Color &color) { |
47 | void setForeground(long pixel_value); | 48 | setForeground(color.pixel()); |
48 | void setBackground(const FbTk::Color &color); | 49 | } |
49 | void setBackground(long pixel_value); | 50 | |
51 | inline void setForeground(long pixel_value) { | ||
52 | XSetForeground(m_display, m_gc, | ||
53 | pixel_value); | ||
54 | } | ||
55 | |||
56 | inline void setBackground(const FbTk::Color &color) { | ||
57 | setBackground(color.pixel()); | ||
58 | } | ||
59 | |||
60 | inline void setBackground(long pixel_value) { | ||
61 | XSetBackground(m_display, m_gc, pixel_value); | ||
62 | } | ||
63 | |||
50 | /// not implemented | 64 | /// not implemented |
51 | void setFont(const FbTk::Font &font); | 65 | inline void setFont(const FbTk::Font &font) {} |
66 | |||
52 | /// set font id | 67 | /// set font id |
53 | void setFont(int fid); | 68 | inline void setFont(int fid) { |
54 | void setClipMask(const FbTk::FbPixmap &pm); | 69 | XSetFont(m_display, m_gc, fid); |
55 | void setClipOrigin(int x, int y); | 70 | } |
56 | void setGraphicsExposure(bool value); | 71 | |
57 | void setFunction(int func); | 72 | inline void setClipMask(const FbTk::FbPixmap &mask) { |
58 | void setSubwindowMode(int mode); | 73 | XSetClipMask(m_display, m_gc, mask.drawable()); |
74 | } | ||
75 | |||
76 | inline void setClipOrigin(int x, int y) { | ||
77 | XSetClipOrigin(m_display, m_gc, x, y); | ||
78 | } | ||
79 | |||
80 | inline void setGraphicsExposure(bool value) { | ||
81 | XSetGraphicsExposures(m_display, m_gc, value); | ||
82 | } | ||
83 | |||
84 | inline void setFunction(int func) { | ||
85 | XSetFunction(m_display, m_gc, func); | ||
86 | } | ||
87 | |||
88 | inline void setSubwindowMode(int mode) { | ||
89 | XSetSubwindowMode(m_display, m_gc, mode); | ||
90 | } | ||
59 | 91 | ||
60 | GC gc() const { return m_gc; } | 92 | inline GC gc() const { return m_gc; } |
61 | 93 | ||
62 | private: | 94 | private: |
95 | Display *m_display; // worth caching | ||
63 | GC m_gc; | 96 | GC m_gc; |
64 | }; | 97 | }; |
65 | 98 | ||
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc index 915dc1c..2ceb106 100644 --- a/src/FbTk/ImageControl.cc +++ b/src/FbTk/ImageControl.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: ImageControl.cc,v 1.5 2003/08/18 11:37:14 fluxgen Exp $ | 25 | // $Id: ImageControl.cc,v 1.6 2003/10/09 16:48:09 rathnor Exp $ |
26 | 26 | ||
27 | #include "ImageControl.hh" | 27 | #include "ImageControl.hh" |
28 | 28 | ||
@@ -152,6 +152,21 @@ ImageControl::~ImageControl() { | |||
152 | Pixmap ImageControl::searchCache(unsigned int width, unsigned int height, | 152 | Pixmap ImageControl::searchCache(unsigned int width, unsigned int height, |
153 | unsigned long texture_type, | 153 | unsigned long texture_type, |
154 | const FbTk::Color &color, const FbTk::Color &color_to) const { | 154 | const FbTk::Color &color, const FbTk::Color &color_to) const { |
155 | Cache tmp; | ||
156 | tmp.width = width; | ||
157 | tmp.height = height; | ||
158 | tmp.texture = texture_type; | ||
159 | tmp.pixel1 = color.pixel(); | ||
160 | tmp.pixel2 = color_to.pixel(); | ||
161 | CacheList::iterator it = cache.find(&tmp); | ||
162 | if (it == cache.end()) { | ||
163 | return None; | ||
164 | } else { | ||
165 | (*it)->count++; | ||
166 | return (*it)->pixmap; | ||
167 | } | ||
168 | |||
169 | /* | ||
155 | CacheList::iterator it = cache.begin(); | 170 | CacheList::iterator it = cache.begin(); |
156 | CacheList::iterator it_end = cache.end(); | 171 | CacheList::iterator it_end = cache.end(); |
157 | for (; it != it_end; ++it) { | 172 | for (; it != it_end; ++it) { |
@@ -170,8 +185,8 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height, | |||
170 | } | 185 | } |
171 | } | 186 | } |
172 | } | 187 | } |
173 | |||
174 | return None; | 188 | return None; |
189 | */ | ||
175 | } | 190 | } |
176 | 191 | ||
177 | 192 | ||
@@ -187,7 +202,7 @@ Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, | |||
187 | if (pixmap) | 202 | if (pixmap) |
188 | return pixmap; // return cache item | 203 | return pixmap; // return cache item |
189 | 204 | ||
190 | // render new image | 205 | // render new image |
191 | TextureRender image(*this, width, height, m_colors, m_num_colors); | 206 | TextureRender image(*this, width, height, m_colors, m_num_colors); |
192 | pixmap = image.render(texture); | 207 | pixmap = image.render(texture); |
193 | 208 | ||
@@ -208,7 +223,7 @@ Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, | |||
208 | else | 223 | else |
209 | tmp->pixel2 = 0l; | 224 | tmp->pixel2 = 0l; |
210 | 225 | ||
211 | cache.push_back(tmp); | 226 | cache.insert(tmp); |
212 | 227 | ||
213 | if ((unsigned) cache.size() > cache_max) | 228 | if ((unsigned) cache.size() > cache_max) |
214 | cleanCache(); | 229 | cleanCache(); |
@@ -355,9 +370,13 @@ void ImageControl::cleanCache() { | |||
355 | Cache *tmp = (*it); | 370 | Cache *tmp = (*it); |
356 | 371 | ||
357 | if (tmp->count <= 0) { | 372 | if (tmp->count <= 0) { |
373 | CacheList::iterator tmp_it = it; | ||
374 | ++tmp_it; | ||
358 | XFreePixmap(disp, tmp->pixmap); | 375 | XFreePixmap(disp, tmp->pixmap); |
359 | it = cache.erase(it); | 376 | cache.erase(it); |
360 | delete tmp; | 377 | delete tmp; |
378 | tmp=0; | ||
379 | it = tmp_it; | ||
361 | if (it == it_end) break; | 380 | if (it == it_end) break; |
362 | } | 381 | } |
363 | } | 382 | } |
diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh index c43c5a0..29c43d6 100644 --- a/src/FbTk/ImageControl.hh +++ b/src/FbTk/ImageControl.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: ImageControl.hh,v 1.4 2003/08/18 11:37:15 fluxgen Exp $ | 25 | // $Id: ImageControl.hh,v 1.5 2003/10/09 16:48:09 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_IMAGECONTROL_HH | 27 | #ifndef FBTK_IMAGECONTROL_HH |
28 | #define FBTK_IMAGECONTROL_HH | 28 | #define FBTK_IMAGECONTROL_HH |
@@ -34,6 +34,7 @@ | |||
34 | #include <X11/Xlib.h> | 34 | #include <X11/Xlib.h> |
35 | #include <X11/Xutil.h> | 35 | #include <X11/Xutil.h> |
36 | #include <list> | 36 | #include <list> |
37 | #include <set> | ||
37 | 38 | ||
38 | namespace FbTk { | 39 | namespace FbTk { |
39 | 40 | ||
@@ -114,9 +115,25 @@ private: | |||
114 | unsigned int count, width, height; | 115 | unsigned int count, width, height; |
115 | unsigned long pixel1, pixel2, texture; | 116 | unsigned long pixel1, pixel2, texture; |
116 | } Cache; | 117 | } Cache; |
118 | |||
119 | struct ltCacheEntry | ||
120 | { | ||
121 | bool operator()(const Cache* s1, const Cache* s2) const | ||
122 | { | ||
123 | return | ||
124 | (s1->width < s2->width || s1->width == s2->width && | ||
125 | (s1->height < s2->height || s1->height == s2->height && | ||
126 | (s1->texture < s2->texture || s1->texture == s2->texture && | ||
127 | s1->pixel1 < s2->pixel1 || s1->pixel1 == s2->pixel2 && | ||
128 | (s1->texture & FbTk::Texture::GRADIENT) && | ||
129 | s1->pixel2 < s2->pixel2) | ||
130 | )); | ||
131 | } | ||
132 | }; | ||
133 | |||
117 | 134 | ||
118 | unsigned long cache_max; | 135 | unsigned long cache_max; |
119 | typedef std::list<Cache *> CacheList; | 136 | typedef std::set<Cache *, ltCacheEntry> CacheList; |
120 | 137 | ||
121 | mutable CacheList cache; | 138 | mutable CacheList cache; |
122 | static bool s_timed_cache; | 139 | static bool s_timed_cache; |
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 09ce28e..ccbcaed 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbWinFrame.cc,v 1.58 2003/10/06 09:28:35 rathnor Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.59 2003/10/09 16:48:09 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | 25 | ||
@@ -238,8 +238,8 @@ void FbWinFrame::setFocus(bool newvalue) { | |||
238 | 238 | ||
239 | m_focused = newvalue; | 239 | m_focused = newvalue; |
240 | 240 | ||
241 | renderTitlebar(); | ||
242 | renderButtons(); | 241 | renderButtons(); |
242 | renderTitlebar(); | ||
243 | renderHandles(); | 243 | renderHandles(); |
244 | } | 244 | } |
245 | 245 | ||
@@ -726,10 +726,10 @@ void FbWinFrame::redrawTitle() { | |||
726 | } | 726 | } |
727 | 727 | ||
728 | if (isVisible()) { | 728 | if (isVisible()) { |
729 | m_titlebar.clear(); | ||
730 | m_titlebar.updateTransparent(); | ||
731 | m_label.clear(); | 729 | m_label.clear(); |
732 | m_label.updateTransparent(); | 730 | m_label.updateTransparent(); |
731 | m_titlebar.clear(); | ||
732 | m_titlebar.updateTransparent(); | ||
733 | } | 733 | } |
734 | } | 734 | } |
735 | 735 | ||
@@ -1004,6 +1004,7 @@ void FbWinFrame::setupButton(FbTk::Button &btn) { | |||
1004 | 1004 | ||
1005 | void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, | 1005 | void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, |
1006 | unsigned int w, unsigned int h) { | 1006 | unsigned int w, unsigned int h) { |
1007 | |||
1007 | Pixmap tmp = pm; | 1008 | Pixmap tmp = pm; |
1008 | if (tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 1009 | if (tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
1009 | pm = None; | 1010 | pm = None; |
@@ -1051,6 +1052,7 @@ void FbWinFrame::getUnfocusPixmap(Pixmap &label_pm, Pixmap &title_pm, | |||
1051 | } | 1052 | } |
1052 | 1053 | ||
1053 | void FbWinFrame::renderLabelButtons() { | 1054 | void FbWinFrame::renderLabelButtons() { |
1055 | |||
1054 | Pixmap label_pm = 0; | 1056 | Pixmap label_pm = 0; |
1055 | Pixmap not_used_pm = 0; | 1057 | Pixmap not_used_pm = 0; |
1056 | FbTk::Color label_color; | 1058 | FbTk::Color label_color; |
@@ -1126,7 +1128,8 @@ void FbWinFrame::renderButtonFocus(FbTk::TextButton &button) { | |||
1126 | } | 1128 | } |
1127 | 1129 | ||
1128 | void FbWinFrame::renderButtonUnfocus(FbTk::TextButton &button) { | 1130 | void FbWinFrame::renderButtonUnfocus(FbTk::TextButton &button) { |
1129 | button.setGC(theme().labelTextUnfocusGC()); | 1131 | |
1132 | button.setGC(theme().labelTextUnfocusGC()); | ||
1130 | button.setJustify(theme().justify()); | 1133 | button.setJustify(theme().justify()); |
1131 | button.setBorderWidth(1); | 1134 | button.setBorderWidth(1); |
1132 | button.setAlpha(theme().alpha()); | 1135 | button.setAlpha(theme().alpha()); |
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 34ca188..ee0d7cf 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: IconbarTool.cc,v 1.13 2003/10/06 06:22:42 rathnor Exp $ | 23 | // $Id: IconbarTool.cc,v 1.14 2003/10/09 16:48:09 rathnor Exp $ |
24 | 24 | ||
25 | #include "IconbarTool.hh" | 25 | #include "IconbarTool.hh" |
26 | 26 | ||
@@ -372,11 +372,11 @@ void IconbarTool::update(FbTk::Subject *subj) { | |||
372 | } | 372 | } |
373 | 373 | ||
374 | // unlock container and update graphics | 374 | // unlock container and update graphics |
375 | renderTheme(); | ||
375 | m_icon_container.setUpdateLock(false); | 376 | m_icon_container.setUpdateLock(false); |
376 | m_icon_container.showSubwindows(); | ||
377 | m_icon_container.update(); | 377 | m_icon_container.update(); |
378 | 378 | m_icon_container.showSubwindows(); | |
379 | renderTheme(); | 379 | |
380 | } | 380 | } |
381 | 381 | ||
382 | void IconbarTool::renderWindow(FluxboxWindow &win) { | 382 | void IconbarTool::renderWindow(FluxboxWindow &win) { |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 957ea15..45ec6e7 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.197 2003/10/06 09:55:36 rathnor Exp $ | 25 | // $Id: fluxbox.cc,v 1.198 2003/10/09 16:48:09 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -614,10 +614,11 @@ Fluxbox::~Fluxbox() { | |||
614 | } | 614 | } |
615 | 615 | ||
616 | void Fluxbox::eventLoop() { | 616 | void Fluxbox::eventLoop() { |
617 | Display *disp = display(); | ||
617 | while (!m_shutdown) { | 618 | while (!m_shutdown) { |
618 | if (XPending(display())) { | 619 | if (XPending(disp)) { |
619 | XEvent e; | 620 | XEvent e; |
620 | XNextEvent(display(), &e); | 621 | XNextEvent(disp, &e); |
621 | 622 | ||
622 | if (last_bad_window != None && e.xany.window == last_bad_window && | 623 | if (last_bad_window != None && e.xany.window == last_bad_window && |
623 | e.type != DestroyNotify) { // we must let the actual destroys through | 624 | e.type != DestroyNotify) { // we must let the actual destroys through |
@@ -633,7 +634,7 @@ void Fluxbox::eventLoop() { | |||
633 | } | 634 | } |
634 | } | 635 | } |
635 | } else { | 636 | } else { |
636 | FbTk::Timer::updateTimers(ConnectionNumber(display())); //handle all timers | 637 | FbTk::Timer::updateTimers(ConnectionNumber(disp)); //handle all timers |
637 | } | 638 | } |
638 | } | 639 | } |
639 | } | 640 | } |