aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc22
1 files changed, 12 insertions, 10 deletions
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
428void FbWinFrame::notifyMoved(bool clear) { 428void 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
539void FbWinFrame::setAlpha(bool focused, unsigned char alpha) { 539void 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
549void FbWinFrame::applyAlpha() { 549void 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
560unsigned char FbWinFrame::getAlpha(bool focused) const { 560int 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
564void FbWinFrame::setDefaultAlpha() { 567void 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
1221void FbWinFrame::applyHandles() { 1223void 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);