diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ButtonTool.cc | 2 | ||||
-rw-r--r-- | src/ButtonTool.hh | 2 | ||||
-rw-r--r-- | src/ClockTool.cc | 2 | ||||
-rw-r--r-- | src/ClockTool.hh | 2 | ||||
-rw-r--r-- | src/FbTk/Container.cc | 2 | ||||
-rw-r--r-- | src/FbTk/Container.hh | 2 | ||||
-rw-r--r-- | src/FbTk/FbWindow.cc | 8 | ||||
-rw-r--r-- | src/FbTk/FbWindow.hh | 6 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 4 | ||||
-rw-r--r-- | src/FbTk/Transparent.cc | 10 | ||||
-rw-r--r-- | src/FbTk/Transparent.hh | 8 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 22 | ||||
-rw-r--r-- | src/FbWinFrame.hh | 10 | ||||
-rw-r--r-- | src/FbWinFrameTheme.hh | 6 | ||||
-rw-r--r-- | src/FocusControl.cc | 2 | ||||
-rw-r--r-- | src/GenericTool.cc | 2 | ||||
-rw-r--r-- | src/GenericTool.hh | 2 | ||||
-rw-r--r-- | src/IconbarTool.cc | 2 | ||||
-rw-r--r-- | src/IconbarTool.hh | 4 | ||||
-rw-r--r-- | src/SystemTray.hh | 2 | ||||
-rw-r--r-- | src/ToolTheme.hh | 6 | ||||
-rw-r--r-- | src/ToolbarItem.hh | 2 | ||||
-rw-r--r-- | src/Window.hh | 10 | ||||
-rw-r--r-- | src/WindowMenuAccessor.hh | 4 | ||||
-rw-r--r-- | src/WorkspaceNameTool.cc | 2 | ||||
-rw-r--r-- | src/WorkspaceNameTool.hh | 2 |
26 files changed, 65 insertions, 61 deletions
diff --git a/src/ButtonTool.cc b/src/ButtonTool.cc index 0e11733..ad54534 100644 --- a/src/ButtonTool.cc +++ b/src/ButtonTool.cc | |||
@@ -49,7 +49,7 @@ void ButtonTool::updateSizing() { | |||
49 | btn.setBorderWidth(theme()->border().width()); | 49 | btn.setBorderWidth(theme()->border().width()); |
50 | } | 50 | } |
51 | 51 | ||
52 | void ButtonTool::renderTheme(unsigned char alpha) { | 52 | void ButtonTool::renderTheme(int alpha) { |
53 | FbTk::Button &btn = static_cast<FbTk::Button &>(window()); | 53 | FbTk::Button &btn = static_cast<FbTk::Button &>(window()); |
54 | 54 | ||
55 | btn.setGC(static_cast<const ButtonTheme &>(*theme()).gc()); | 55 | btn.setGC(static_cast<const ButtonTheme &>(*theme()).gc()); |
diff --git a/src/ButtonTool.hh b/src/ButtonTool.hh index 484fea6..ec74618 100644 --- a/src/ButtonTool.hh +++ b/src/ButtonTool.hh | |||
@@ -41,7 +41,7 @@ public: | |||
41 | virtual ~ButtonTool(); | 41 | virtual ~ButtonTool(); |
42 | 42 | ||
43 | protected: | 43 | protected: |
44 | void renderTheme(unsigned char alpha); | 44 | void renderTheme(int alpha); |
45 | void updateSizing(); | 45 | void updateSizing(); |
46 | Pixmap m_cache_pm, m_cache_pressed_pm; | 46 | Pixmap m_cache_pm, m_cache_pressed_pm; |
47 | FbTk::ImageControl &m_image_ctrl; | 47 | FbTk::ImageControl &m_image_ctrl; |
diff --git a/src/ClockTool.cc b/src/ClockTool.cc index f6a9797..257058f 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc | |||
@@ -334,7 +334,7 @@ void ClockTool::reRender() { | |||
334 | } | 334 | } |
335 | 335 | ||
336 | 336 | ||
337 | void ClockTool::renderTheme(unsigned char alpha) { | 337 | void ClockTool::renderTheme(int alpha) { |
338 | m_button.setAlpha(alpha); | 338 | m_button.setAlpha(alpha); |
339 | m_button.setJustify(m_theme->justify()); | 339 | m_button.setJustify(m_theme->justify()); |
340 | 340 | ||
diff --git a/src/ClockTool.hh b/src/ClockTool.hh index cbc676f..d2b9dca 100644 --- a/src/ClockTool.hh +++ b/src/ClockTool.hh | |||
@@ -69,7 +69,7 @@ public: | |||
69 | private: | 69 | private: |
70 | void updateTime(); | 70 | void updateTime(); |
71 | void update(FbTk::Subject *subj); | 71 | void update(FbTk::Subject *subj); |
72 | void renderTheme(unsigned char alpha); | 72 | void renderTheme(int alpha); |
73 | void reRender(); | 73 | void reRender(); |
74 | void updateSizing(); | 74 | void updateSizing(); |
75 | 75 | ||
diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc index e1d2e07..b944c98 100644 --- a/src/FbTk/Container.cc +++ b/src/FbTk/Container.cc | |||
@@ -440,7 +440,7 @@ void Container::for_each(std::mem_fun_t<void, FbWindow> function) { | |||
440 | std::for_each(begin(), end(), function); | 440 | std::for_each(begin(), end(), function); |
441 | } | 441 | } |
442 | 442 | ||
443 | void Container::setAlpha(unsigned char alpha) { | 443 | void Container::setAlpha(int alpha) { |
444 | FbWindow::setAlpha(alpha); | 444 | FbWindow::setAlpha(alpha); |
445 | STLUtil::forAll(m_item_list, std::bind2nd(std::mem_fun(&Button::setAlpha), alpha)); | 445 | STLUtil::forAll(m_item_list, std::bind2nd(std::mem_fun(&Button::setAlpha), alpha)); |
446 | } | 446 | } |
diff --git a/src/FbTk/Container.hh b/src/FbTk/Container.hh index bd5e3aa..f3d9bac 100644 --- a/src/FbTk/Container.hh +++ b/src/FbTk/Container.hh | |||
@@ -91,7 +91,7 @@ public: | |||
91 | bool updateLock() const { return m_update_lock; } | 91 | bool updateLock() const { return m_update_lock; } |
92 | 92 | ||
93 | void for_each(std::mem_fun_t<void, FbWindow> function); | 93 | void for_each(std::mem_fun_t<void, FbWindow> function); |
94 | void setAlpha(unsigned char alpha); // set alpha on all windows | 94 | void setAlpha(int alpha); // set alpha on all windows |
95 | 95 | ||
96 | ItemList::iterator begin() { return m_item_list.begin(); } | 96 | ItemList::iterator begin() { return m_item_list.begin(); } |
97 | ItemList::iterator end() { return m_item_list.end(); } | 97 | ItemList::iterator end() { return m_item_list.end(); } |
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 5b52a03..00dde66 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -171,7 +171,7 @@ void FbWindow::invalidateBackground() { | |||
171 | 171 | ||
172 | void FbWindow::updateBackground(bool only_if_alpha) { | 172 | void FbWindow::updateBackground(bool only_if_alpha) { |
173 | Pixmap newbg = m_lastbg_pm; | 173 | Pixmap newbg = m_lastbg_pm; |
174 | unsigned char alpha = 255; | 174 | int alpha = 255; |
175 | bool free_newbg = false; | 175 | bool free_newbg = false; |
176 | 176 | ||
177 | if (m_lastbg_pm == None && !m_lastbg_color_set) | 177 | if (m_lastbg_pm == None && !m_lastbg_color_set) |
@@ -344,7 +344,7 @@ void FbWindow::updateTransparent(int the_x, int the_y, unsigned int the_width, u | |||
344 | #endif // HAVE_XRENDER | 344 | #endif // HAVE_XRENDER |
345 | } | 345 | } |
346 | 346 | ||
347 | void FbWindow::setAlpha(unsigned char alpha) { | 347 | void FbWindow::setAlpha(int alpha) { |
348 | #ifdef HAVE_XRENDER | 348 | #ifdef HAVE_XRENDER |
349 | if (FbTk::Transparent::haveComposite()) { | 349 | if (FbTk::Transparent::haveComposite()) { |
350 | if (m_transparent.get() != 0) { | 350 | if (m_transparent.get() != 0) { |
@@ -371,7 +371,7 @@ void FbWindow::setAlpha(unsigned char alpha) { | |||
371 | #endif // HAVE_XRENDER | 371 | #endif // HAVE_XRENDER |
372 | } | 372 | } |
373 | 373 | ||
374 | unsigned char FbWindow::alpha() const { | 374 | int FbWindow::alpha() const { |
375 | #ifdef HAVE_XRENDER | 375 | #ifdef HAVE_XRENDER |
376 | if (m_transparent.get()) | 376 | if (m_transparent.get()) |
377 | return m_transparent->alpha(); | 377 | return m_transparent->alpha(); |
@@ -588,7 +588,7 @@ long FbWindow::eventMask() const { | |||
588 | 588 | ||
589 | } | 589 | } |
590 | 590 | ||
591 | void FbWindow::setOpaque(unsigned char alpha) { | 591 | void FbWindow::setOpaque(int alpha) { |
592 | #ifdef HAVE_XRENDER | 592 | #ifdef HAVE_XRENDER |
593 | static Atom m_alphaatom = XInternAtom(display(), "_NET_WM_WINDOW_OPACITY", False); | 593 | static Atom m_alphaatom = XInternAtom(display(), "_NET_WM_WINDOW_OPACITY", False); |
594 | unsigned long opacity = alpha * 0x1010101; | 594 | unsigned long opacity = alpha * 0x1010101; |
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index edeffe1..9e92923 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh | |||
@@ -88,7 +88,7 @@ public: | |||
88 | unsigned int height = 0, Pixmap dest_override = None, | 88 | unsigned int height = 0, Pixmap dest_override = None, |
89 | bool override_is_offset = false); | 89 | bool override_is_offset = false); |
90 | 90 | ||
91 | void setAlpha(unsigned char alpha); | 91 | void setAlpha(int alpha); |
92 | 92 | ||
93 | virtual FbWindow &operator = (const FbWindow &win); | 93 | virtual FbWindow &operator = (const FbWindow &win); |
94 | /// assign a new X window to this | 94 | /// assign a new X window to this |
@@ -176,7 +176,7 @@ public: | |||
176 | unsigned int borderWidth() const { return m_border_width; } | 176 | unsigned int borderWidth() const { return m_border_width; } |
177 | unsigned long borderColor() const { return m_border_color; } | 177 | unsigned long borderColor() const { return m_border_color; } |
178 | unsigned int depth() const { return m_depth; } | 178 | unsigned int depth() const { return m_depth; } |
179 | unsigned char alpha() const; | 179 | int alpha() const; |
180 | int screenNumber() const; | 180 | int screenNumber() const; |
181 | long eventMask() const; | 181 | long eventMask() const; |
182 | 182 | ||
@@ -188,7 +188,7 @@ public: | |||
188 | bool operator != (const FbWindow &win) const { return m_window != win.m_window; } | 188 | bool operator != (const FbWindow &win) const { return m_window != win.m_window; } |
189 | 189 | ||
190 | // used for composite | 190 | // used for composite |
191 | void setOpaque(unsigned char alpha); | 191 | void setOpaque(int alpha); |
192 | 192 | ||
193 | void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; } | 193 | void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; } |
194 | void sendConfigureNotify(int x, int y, unsigned int width, | 194 | void sendConfigureNotify(int x, int y, unsigned int width, |
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index c10615b..eb19798 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh | |||
@@ -107,7 +107,7 @@ public: | |||
107 | unsigned int bevelWidth() const { return *m_bevel_width; } | 107 | unsigned int bevelWidth() const { return *m_bevel_width; } |
108 | 108 | ||
109 | unsigned char alpha() const { return m_alpha; } | 109 | unsigned char alpha() const { return m_alpha; } |
110 | void setAlpha(unsigned char alpha) { m_alpha = alpha; } | 110 | void setAlpha(int alpha) { m_alpha = alpha; } |
111 | // this isn't actually a theme item | 111 | // this isn't actually a theme item |
112 | // but we'll let it be here for now, until there's a better way to | 112 | // but we'll let it be here for now, until there's a better way to |
113 | // get resources into menu | 113 | // get resources into menu |
@@ -154,7 +154,7 @@ private: | |||
154 | Display *m_display; | 154 | Display *m_display; |
155 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; | 155 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; |
156 | 156 | ||
157 | unsigned char m_alpha; | 157 | int m_alpha; |
158 | unsigned int m_delay; ///< in msec | 158 | unsigned int m_delay; ///< in msec |
159 | unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) | 159 | unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) |
160 | unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight) | 160 | unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight) |
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc index bf8a110..04fee67 100644 --- a/src/FbTk/Transparent.cc +++ b/src/FbTk/Transparent.cc | |||
@@ -43,7 +43,7 @@ using std::endl; | |||
43 | 43 | ||
44 | namespace { | 44 | namespace { |
45 | #ifdef HAVE_XRENDER | 45 | #ifdef HAVE_XRENDER |
46 | Picture createAlphaPic(Window drawable, unsigned char alpha) { | 46 | Picture createAlphaPic(Window drawable, int alpha) { |
47 | Display *disp = FbTk::App::instance()->display(); | 47 | Display *disp = FbTk::App::instance()->display(); |
48 | _FB_USES_NLS; | 48 | _FB_USES_NLS; |
49 | 49 | ||
@@ -149,7 +149,7 @@ bool Transparent::haveComposite(bool for_real) { | |||
149 | return s_use_composite; | 149 | return s_use_composite; |
150 | } | 150 | } |
151 | 151 | ||
152 | Transparent::Transparent(Drawable src, Drawable dest, unsigned char alpha, int screen_num): | 152 | Transparent::Transparent(Drawable src, Drawable dest, int alpha, int screen_num): |
153 | m_alpha_pic(0), m_src_pic(0), m_dest_pic(0), | 153 | m_alpha_pic(0), m_src_pic(0), m_dest_pic(0), |
154 | m_source(src), m_dest(dest), m_alpha(alpha) { | 154 | m_source(src), m_dest(dest), m_alpha(alpha) { |
155 | 155 | ||
@@ -196,7 +196,7 @@ Transparent::~Transparent() { | |||
196 | #endif // HAVE_XRENDER | 196 | #endif // HAVE_XRENDER |
197 | } | 197 | } |
198 | 198 | ||
199 | void Transparent::setAlpha(unsigned char alpha) { | 199 | void Transparent::setAlpha(int alpha) { |
200 | if (m_source == 0 || !s_render) | 200 | if (m_source == 0 || !s_render) |
201 | return; | 201 | return; |
202 | 202 | ||
@@ -254,7 +254,7 @@ void Transparent::setSource(Drawable source, int screen_num) { | |||
254 | return; | 254 | return; |
255 | // save old alpha value so we can recreate new later | 255 | // save old alpha value so we can recreate new later |
256 | // with the same value | 256 | // with the same value |
257 | unsigned char old_alpha = m_alpha; | 257 | int old_alpha = m_alpha; |
258 | if (m_alpha_pic != 0) | 258 | if (m_alpha_pic != 0) |
259 | freeAlpha(); | 259 | freeAlpha(); |
260 | 260 | ||
@@ -314,7 +314,7 @@ void Transparent::render(int src_x, int src_y, | |||
314 | #endif // HAVE_XRENDER | 314 | #endif // HAVE_XRENDER |
315 | } | 315 | } |
316 | 316 | ||
317 | void Transparent::allocAlpha(unsigned char alpha) { | 317 | void Transparent::allocAlpha(int alpha) { |
318 | #ifdef HAVE_XRENDER | 318 | #ifdef HAVE_XRENDER |
319 | if (m_source == 0 || !s_render) | 319 | if (m_source == 0 || !s_render) |
320 | return; | 320 | return; |
diff --git a/src/FbTk/Transparent.hh b/src/FbTk/Transparent.hh index 154c223..8e9d9b9 100644 --- a/src/FbTk/Transparent.hh +++ b/src/FbTk/Transparent.hh | |||
@@ -29,10 +29,10 @@ namespace FbTk { | |||
29 | /// renders to drawable together with an alpha mask | 29 | /// renders to drawable together with an alpha mask |
30 | class Transparent { | 30 | class Transparent { |
31 | public: | 31 | public: |
32 | Transparent(Drawable source, Drawable dest, unsigned char alpha, int screen_num); | 32 | Transparent(Drawable source, Drawable dest, int alpha, int screen_num); |
33 | ~Transparent(); | 33 | ~Transparent(); |
34 | /// sets alpha value | 34 | /// sets alpha value |
35 | void setAlpha(unsigned char alpha); | 35 | void setAlpha(int alpha); |
36 | /// sets source drawable | 36 | /// sets source drawable |
37 | void setSource(Drawable src, int screen_num); | 37 | void setSource(Drawable src, int screen_num); |
38 | /// sets destination drawable | 38 | /// sets destination drawable |
@@ -45,7 +45,7 @@ public: | |||
45 | int dest_x, int dest_y, | 45 | int dest_x, int dest_y, |
46 | unsigned int width, unsigned int height) const; | 46 | unsigned int width, unsigned int height) const; |
47 | 47 | ||
48 | unsigned char alpha() const { return m_alpha; } | 48 | int alpha() const { return m_alpha; } |
49 | Drawable dest() const { return m_dest; } | 49 | Drawable dest() const { return m_dest; } |
50 | Drawable source() const { return m_source; } | 50 | Drawable source() const { return m_source; } |
51 | 51 | ||
@@ -55,7 +55,7 @@ public: | |||
55 | 55 | ||
56 | private: | 56 | private: |
57 | void freeAlpha(); | 57 | void freeAlpha(); |
58 | void allocAlpha(unsigned char newval); | 58 | void allocAlpha(int newval); |
59 | unsigned long m_alpha_pic; | 59 | unsigned long m_alpha_pic; |
60 | unsigned long m_src_pic; | 60 | unsigned long m_src_pic; |
61 | unsigned long m_dest_pic; | 61 | unsigned long m_dest_pic; |
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 9c35925..d5b4b70 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -427,7 +427,7 @@ void FbWinFrame::alignTabs() { | |||
427 | 427 | ||
428 | void FbWinFrame::notifyMoved(bool clear) { | 428 | void FbWinFrame::notifyMoved(bool clear) { |
429 | // not important if no alpha... | 429 | // not important if no alpha... |
430 | unsigned char alpha = getAlpha(m_state.focused); | 430 | int alpha = getAlpha(m_state.focused); |
431 | if (alpha == 255) | 431 | if (alpha == 255) |
432 | return; | 432 | return; |
433 | 433 | ||
@@ -482,7 +482,7 @@ void FbWinFrame::setFocus(bool newvalue) { | |||
482 | 482 | ||
483 | if (FbTk::Transparent::haveRender() && | 483 | if (FbTk::Transparent::haveRender() && |
484 | getAlpha(true) != getAlpha(false)) { // different alpha for focused and unfocused | 484 | getAlpha(true) != getAlpha(false)) { // different alpha for focused and unfocused |
485 | unsigned char alpha = getAlpha(m_state.focused); | 485 | int alpha = getAlpha(m_state.focused); |
486 | if (FbTk::Transparent::haveComposite()) { | 486 | if (FbTk::Transparent::haveComposite()) { |
487 | m_tab_container.setAlpha(255); | 487 | m_tab_container.setAlpha(255); |
488 | m_window.setOpaque(alpha); | 488 | m_window.setOpaque(alpha); |
@@ -536,7 +536,7 @@ void FbWinFrame::applyState() { | |||
536 | frameExtentSig().notify(); | 536 | frameExtentSig().notify(); |
537 | } | 537 | } |
538 | 538 | ||
539 | void FbWinFrame::setAlpha(bool focused, unsigned char alpha) { | 539 | void FbWinFrame::setAlpha(bool focused, int alpha) { |
540 | if (focused) | 540 | if (focused) |
541 | m_focused_alpha = alpha; | 541 | m_focused_alpha = alpha; |
542 | else | 542 | else |
@@ -547,7 +547,7 @@ void FbWinFrame::setAlpha(bool focused, unsigned char alpha) { | |||
547 | } | 547 | } |
548 | 548 | ||
549 | void FbWinFrame::applyAlpha() { | 549 | void FbWinFrame::applyAlpha() { |
550 | unsigned char alpha = getAlpha(m_state.focused); | 550 | int alpha = getAlpha(m_state.focused); |
551 | if (FbTk::Transparent::haveComposite()) | 551 | if (FbTk::Transparent::haveComposite()) |
552 | m_window.setOpaque(alpha); | 552 | m_window.setOpaque(alpha); |
553 | else { | 553 | else { |
@@ -557,8 +557,11 @@ void FbWinFrame::applyAlpha() { | |||
557 | } | 557 | } |
558 | } | 558 | } |
559 | 559 | ||
560 | unsigned char FbWinFrame::getAlpha(bool focused) const { | 560 | int FbWinFrame::getAlpha(bool focused) const { |
561 | return focused ? m_focused_alpha : m_unfocused_alpha; | 561 | if (focused) |
562 | return m_focused_alpha; | ||
563 | else | ||
564 | return m_unfocused_alpha; | ||
562 | } | 565 | } |
563 | 566 | ||
564 | void FbWinFrame::setDefaultAlpha() { | 567 | void FbWinFrame::setDefaultAlpha() { |
@@ -966,8 +969,7 @@ void FbWinFrame::reconfigure() { | |||
966 | if (isVisible()) { | 969 | if (isVisible()) { |
967 | // update transparency settings | 970 | // update transparency settings |
968 | if (FbTk::Transparent::haveRender()) { | 971 | if (FbTk::Transparent::haveRender()) { |
969 | unsigned char alpha = | 972 | int alpha = getAlpha(m_state.focused); |
970 | getAlpha(m_state.focused); | ||
971 | if (FbTk::Transparent::haveComposite()) { | 973 | if (FbTk::Transparent::haveComposite()) { |
972 | m_tab_container.setAlpha(255); | 974 | m_tab_container.setAlpha(255); |
973 | m_window.setOpaque(alpha); | 975 | m_window.setOpaque(alpha); |
@@ -1168,7 +1170,7 @@ void FbWinFrame::applyTitlebar() { | |||
1168 | getCurrentFocusPixmap(label_pm, title_pm, | 1170 | getCurrentFocusPixmap(label_pm, title_pm, |
1169 | label_color, title_color); | 1171 | label_color, title_color); |
1170 | 1172 | ||
1171 | unsigned char alpha = getAlpha (m_state.focused); | 1173 | int alpha = getAlpha (m_state.focused); |
1172 | m_titlebar.setAlpha(alpha); | 1174 | m_titlebar.setAlpha(alpha); |
1173 | m_label.setAlpha(alpha); | 1175 | m_label.setAlpha(alpha); |
1174 | 1176 | ||
@@ -1220,7 +1222,7 @@ void FbWinFrame::renderHandles() { | |||
1220 | 1222 | ||
1221 | void FbWinFrame::applyHandles() { | 1223 | void FbWinFrame::applyHandles() { |
1222 | 1224 | ||
1223 | unsigned char alpha = getAlpha(m_state.focused); | 1225 | int alpha = getAlpha(m_state.focused); |
1224 | m_handle.setAlpha(alpha); | 1226 | m_handle.setAlpha(alpha); |
1225 | m_grip_left.setAlpha(alpha); | 1227 | m_grip_left.setAlpha(alpha); |
1226 | m_grip_right.setAlpha(alpha); | 1228 | m_grip_right.setAlpha(alpha); |
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 7cdf9bb..162bf3d 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -121,9 +121,9 @@ public: | |||
121 | void updateTabProperties() { alignTabs(); } | 121 | void updateTabProperties() { alignTabs(); } |
122 | 122 | ||
123 | /// Alpha settings | 123 | /// Alpha settings |
124 | void setAlpha(bool focused, unsigned char value); | 124 | void setAlpha(bool focused, int value); |
125 | void applyAlpha(); | 125 | void applyAlpha(); |
126 | unsigned char getAlpha(bool focused) const; | 126 | int getAlpha(bool focused) const; |
127 | 127 | ||
128 | void setDefaultAlpha(); | 128 | void setDefaultAlpha(); |
129 | bool getUseDefaultAlpha() const; | 129 | bool getUseDefaultAlpha() const; |
@@ -377,9 +377,9 @@ private: | |||
377 | bool m_need_render; | 377 | bool m_need_render; |
378 | int m_button_size; ///< size for all titlebar buttons | 378 | int m_button_size; ///< size for all titlebar buttons |
379 | /// alpha values | 379 | /// alpha values |
380 | typedef FbTk::ConstObjectAccessor<unsigned char, FbWinFrameTheme> AlphaAcc; | 380 | typedef FbTk::ConstObjectAccessor<int, FbWinFrameTheme> AlphaAcc; |
381 | FbTk::DefaultValue<unsigned char, AlphaAcc> m_focused_alpha; | 381 | FbTk::DefaultValue<int, AlphaAcc> m_focused_alpha; |
382 | FbTk::DefaultValue<unsigned char, AlphaAcc> m_unfocused_alpha; | 382 | FbTk::DefaultValue<int, AlphaAcc> m_unfocused_alpha; |
383 | 383 | ||
384 | FbTk::Shape m_shape; | 384 | FbTk::Shape m_shape; |
385 | }; | 385 | }; |
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh index fd2a7e9..3c28cbd 100644 --- a/src/FbWinFrameTheme.hh +++ b/src/FbWinFrameTheme.hh | |||
@@ -74,8 +74,8 @@ public: | |||
74 | unsigned int bevelWidth() const { return *m_bevel_width; } | 74 | unsigned int bevelWidth() const { return *m_bevel_width; } |
75 | unsigned int handleWidth() const { return *m_handle_width; } | 75 | unsigned int handleWidth() const { return *m_handle_width; } |
76 | 76 | ||
77 | unsigned char alpha() const { return m_alpha; } | 77 | int alpha() const { return m_alpha; } |
78 | void setAlpha(unsigned char alpha) { m_alpha = alpha; } | 78 | void setAlpha(int alpha) { m_alpha = alpha; } |
79 | 79 | ||
80 | IconbarTheme &iconbarTheme() { return m_iconbar_theme; } | 80 | IconbarTheme &iconbarTheme() { return m_iconbar_theme; } |
81 | 81 | ||
@@ -107,7 +107,7 @@ private: | |||
107 | Cursor m_cursor_right_side; | 107 | Cursor m_cursor_right_side; |
108 | Cursor m_cursor_top_side; | 108 | Cursor m_cursor_top_side; |
109 | Cursor m_cursor_bottom_side; | 109 | Cursor m_cursor_bottom_side; |
110 | unsigned char m_alpha; | 110 | int m_alpha; |
111 | 111 | ||
112 | IconbarTheme m_iconbar_theme; | 112 | IconbarTheme m_iconbar_theme; |
113 | }; | 113 | }; |
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 341ad0d..9afa605 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -78,7 +78,7 @@ FocusControl::FocusControl(BScreen &screen): | |||
78 | m_focused_list(screen), m_creation_order_list(screen), | 78 | m_focused_list(screen), m_creation_order_list(screen), |
79 | m_focused_win_list(screen), m_creation_order_win_list(screen), | 79 | m_focused_win_list(screen), m_creation_order_win_list(screen), |
80 | m_cycling_list(0), | 80 | m_cycling_list(0), |
81 | m_was_iconic(false), | 81 | m_was_iconic(0), |
82 | m_cycling_last(0), | 82 | m_cycling_last(0), |
83 | m_ignore_mouse_x(-1), m_ignore_mouse_y(-1) { | 83 | m_ignore_mouse_x(-1), m_ignore_mouse_y(-1) { |
84 | 84 | ||
diff --git a/src/GenericTool.cc b/src/GenericTool.cc index 67d737f..41388ce 100644 --- a/src/GenericTool.cc +++ b/src/GenericTool.cc | |||
@@ -75,7 +75,7 @@ unsigned int GenericTool::borderWidth() const { | |||
75 | return m_window->borderWidth(); | 75 | return m_window->borderWidth(); |
76 | } | 76 | } |
77 | 77 | ||
78 | void GenericTool::renderTheme(unsigned char alpha) { | 78 | void GenericTool::renderTheme(int alpha) { |
79 | m_window->setAlpha(alpha); | 79 | m_window->setAlpha(alpha); |
80 | m_window->clear(); | 80 | m_window->clear(); |
81 | } | 81 | } |
diff --git a/src/GenericTool.hh b/src/GenericTool.hh index b64edcf..5d7c8d4 100644 --- a/src/GenericTool.hh +++ b/src/GenericTool.hh | |||
@@ -60,7 +60,7 @@ public: | |||
60 | const FbTk::FbWindow &window() const { return *m_window; } | 60 | const FbTk::FbWindow &window() const { return *m_window; } |
61 | 61 | ||
62 | protected: | 62 | protected: |
63 | virtual void renderTheme(unsigned char alpha); | 63 | virtual void renderTheme(int alpha); |
64 | 64 | ||
65 | private: | 65 | private: |
66 | void update(FbTk::Subject *subj); | 66 | void update(FbTk::Subject *subj); |
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 503e04b..62eae0d 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -475,7 +475,7 @@ void IconbarTool::updateSizing() { | |||
475 | 475 | ||
476 | } | 476 | } |
477 | 477 | ||
478 | void IconbarTool::renderTheme(unsigned char alpha) { | 478 | void IconbarTool::renderTheme(int alpha) { |
479 | 479 | ||
480 | m_alpha = alpha; | 480 | m_alpha = alpha; |
481 | renderTheme(); | 481 | renderTheme(); |
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh index efb4a1a..cb8304f 100644 --- a/src/IconbarTool.hh +++ b/src/IconbarTool.hh | |||
@@ -81,7 +81,7 @@ private: | |||
81 | void renderButton(IconButton &button, bool clear = true); | 81 | void renderButton(IconButton &button, bool clear = true); |
82 | /// render all buttons | 82 | /// render all buttons |
83 | void renderTheme(); | 83 | void renderTheme(); |
84 | void renderTheme(unsigned char alpha); | 84 | void renderTheme(int alpha); |
85 | /// destroy all icons | 85 | /// destroy all icons |
86 | void deleteIcons(); | 86 | void deleteIcons(); |
87 | /// add or move a single window | 87 | /// add or move a single window |
@@ -111,7 +111,7 @@ private: | |||
111 | FbTk::Resource<unsigned int> m_rc_client_padding; ///< padding of the text | 111 | FbTk::Resource<unsigned int> m_rc_client_padding; ///< padding of the text |
112 | FbTk::Resource<bool> m_rc_use_pixmap; ///< if iconbar should use win pixmap or not | 112 | FbTk::Resource<bool> m_rc_use_pixmap; ///< if iconbar should use win pixmap or not |
113 | FbMenu m_menu; | 113 | FbMenu m_menu; |
114 | unsigned char m_alpha; | 114 | int m_alpha; |
115 | }; | 115 | }; |
116 | 116 | ||
117 | #endif // ICONBARTOOL_HH | 117 | #endif // ICONBARTOOL_HH |
diff --git a/src/SystemTray.hh b/src/SystemTray.hh index 153220c..3209790 100644 --- a/src/SystemTray.hh +++ b/src/SystemTray.hh | |||
@@ -74,7 +74,7 @@ public: | |||
74 | int numClients() const { return m_clients.size(); } | 74 | int numClients() const { return m_clients.size(); } |
75 | const FbTk::FbWindow &window() const { return m_window; } | 75 | const FbTk::FbWindow &window() const { return m_window; } |
76 | 76 | ||
77 | void renderTheme(unsigned char alpha) { | 77 | void renderTheme(int alpha) { |
78 | m_window.setBorderWidth(m_theme->border().width()); | 78 | m_window.setBorderWidth(m_theme->border().width()); |
79 | m_window.setBorderColor(m_theme->border().color()); | 79 | m_window.setBorderColor(m_theme->border().color()); |
80 | m_window.setAlpha(alpha); | 80 | m_window.setAlpha(alpha); |
diff --git a/src/ToolTheme.hh b/src/ToolTheme.hh index 9c34114..693aac6 100644 --- a/src/ToolTheme.hh +++ b/src/ToolTheme.hh | |||
@@ -41,8 +41,8 @@ public: | |||
41 | // textures | 41 | // textures |
42 | const FbTk::Texture &texture() const { return *m_texture; } | 42 | const FbTk::Texture &texture() const { return *m_texture; } |
43 | const FbTk::BorderTheme &border() const { return m_border; } | 43 | const FbTk::BorderTheme &border() const { return m_border; } |
44 | unsigned char alpha() const { return m_alpha; } | 44 | int alpha() const { return m_alpha; } |
45 | void setAlpha(unsigned char alpha) { m_alpha = alpha; } | 45 | void setAlpha(int alpha) { m_alpha = alpha; } |
46 | 46 | ||
47 | virtual FbTk::Subject &reconfigSig() { return FbTk::Theme::reconfigSig(); } | 47 | virtual FbTk::Subject &reconfigSig() { return FbTk::Theme::reconfigSig(); } |
48 | virtual const FbTk::Subject &reconfigSig() const { return FbTk::Theme::reconfigSig(); } | 48 | virtual const FbTk::Subject &reconfigSig() const { return FbTk::Theme::reconfigSig(); } |
@@ -56,7 +56,7 @@ protected: | |||
56 | private: | 56 | private: |
57 | FbTk::ThemeItem<FbTk::Texture> m_texture; | 57 | FbTk::ThemeItem<FbTk::Texture> m_texture; |
58 | FbTk::BorderTheme m_border; | 58 | FbTk::BorderTheme m_border; |
59 | unsigned char m_alpha; | 59 | int m_alpha; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | #endif // TOOLTHEME_HH | 62 | #endif // TOOLTHEME_HH |
diff --git a/src/ToolbarItem.hh b/src/ToolbarItem.hh index 4a92c97..f5d1a2a 100644 --- a/src/ToolbarItem.hh +++ b/src/ToolbarItem.hh | |||
@@ -54,7 +54,7 @@ public: | |||
54 | 54 | ||
55 | // Tools should NOT listen to theme changes - they'll get notified by | 55 | // Tools should NOT listen to theme changes - they'll get notified by |
56 | // the toolbar instead. Otherwise there are ordering problems. | 56 | // the toolbar instead. Otherwise there are ordering problems. |
57 | virtual void renderTheme(unsigned char alpha) = 0; | 57 | virtual void renderTheme(int alpha) = 0; |
58 | 58 | ||
59 | // insist implemented, even if blank | 59 | // insist implemented, even if blank |
60 | virtual void parentMoved() = 0; // called when moved from hiding | 60 | virtual void parentMoved() = 0; // called when moved from hiding |
diff --git a/src/Window.hh b/src/Window.hh index 8ce9563..fee2807 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -198,11 +198,11 @@ public: | |||
198 | 198 | ||
199 | // ------------------ | 199 | // ------------------ |
200 | // Per window transparency addons | 200 | // Per window transparency addons |
201 | unsigned char getFocusedAlpha() const { return frame().getAlpha(true); } | 201 | int getFocusedAlpha() const { return frame().getAlpha(true); } |
202 | unsigned char getUnfocusedAlpha() const { return frame().getAlpha(false); } | 202 | int getUnfocusedAlpha() const { return frame().getAlpha(false); } |
203 | void setFocusedAlpha(unsigned char alpha) { frame().setAlpha(true, alpha); } | 203 | void setFocusedAlpha(int alpha) { frame().setAlpha(true, alpha); } |
204 | void setUnfocusedAlpha(unsigned char alpha) { frame().setAlpha(false, alpha); } | 204 | void setUnfocusedAlpha(int alpha) { frame().setAlpha(false, alpha); } |
205 | void updateAlpha(bool focused, unsigned char alpha) { frame().setAlpha(focused, alpha); } | 205 | void updateAlpha(bool focused, int alpha) { frame().setAlpha(focused, alpha); } |
206 | 206 | ||
207 | bool getUseDefaultAlpha() const { return frame().getUseDefaultAlpha(); } | 207 | bool getUseDefaultAlpha() const { return frame().getUseDefaultAlpha(); } |
208 | void setDefaultAlpha() { frame().setDefaultAlpha(); } | 208 | void setDefaultAlpha() { frame().setDefaultAlpha(); } |
diff --git a/src/WindowMenuAccessor.hh b/src/WindowMenuAccessor.hh index 91994b9..383923b 100644 --- a/src/WindowMenuAccessor.hh +++ b/src/WindowMenuAccessor.hh | |||
@@ -37,7 +37,9 @@ public: | |||
37 | 37 | ||
38 | operator Ret() const { | 38 | operator Ret() const { |
39 | FluxboxWindow *fbwin = FbMenu::window(); | 39 | FluxboxWindow *fbwin = FbMenu::window(); |
40 | return fbwin ? (fbwin->*m_getter)() : m_def; | 40 | if (fbwin) |
41 | return (Ret)(fbwin->*m_getter)(); | ||
42 | return m_def; | ||
41 | } | 43 | } |
42 | FbTk::Accessor<Ret> &operator =(const Ret &val) { | 44 | FbTk::Accessor<Ret> &operator =(const Ret &val) { |
43 | FluxboxWindow *fbwin = FbMenu::window(); | 45 | FluxboxWindow *fbwin = FbMenu::window(); |
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc index fc944f9..3a4b275 100644 --- a/src/WorkspaceNameTool.cc +++ b/src/WorkspaceNameTool.cc | |||
@@ -147,7 +147,7 @@ void WorkspaceNameTool::reRender() { | |||
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | void WorkspaceNameTool::renderTheme(unsigned char alpha) { | 150 | void WorkspaceNameTool::renderTheme(int alpha) { |
151 | 151 | ||
152 | m_button.setJustify(m_theme->justify()); | 152 | m_button.setJustify(m_theme->justify()); |
153 | m_button.setBorderWidth(m_theme->border().width()); | 153 | m_button.setBorderWidth(m_theme->border().width()); |
diff --git a/src/WorkspaceNameTool.hh b/src/WorkspaceNameTool.hh index bd034b7..de95663 100644 --- a/src/WorkspaceNameTool.hh +++ b/src/WorkspaceNameTool.hh | |||
@@ -64,7 +64,7 @@ private: | |||
64 | /// Called when workspace changed on \c screen | 64 | /// Called when workspace changed on \c screen |
65 | void updateForScreen(BScreen &screen); | 65 | void updateForScreen(BScreen &screen); |
66 | 66 | ||
67 | void renderTheme(unsigned char alpha); | 67 | void renderTheme(int alpha); |
68 | void reRender(); | 68 | void reRender(); |
69 | void updateSizing(); | 69 | void updateSizing(); |
70 | FbTk::TextButton m_button; | 70 | FbTk::TextButton m_button; |