aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-17 15:19:07 (GMT)
committersimonb <simonb>2006-04-17 15:19:07 (GMT)
commit3e6def97d18133baf82b596cb742a2f7ef4f9f00 (patch)
tree2422603cb39d3af4b318f89ac2093e1bbc67657a /src
parent11cba508e6a59587c304728fc8447d0f0c49f2c2 (diff)
downloadfluxbox-3e6def97d18133baf82b596cb742a2f7ef4f9f00.zip
fluxbox-3e6def97d18133baf82b596cb742a2f7ef4f9f00.tar.bz2
fix transparency updates for the toolbar when autohide is on
Diffstat (limited to 'src')
-rw-r--r--src/ClockTool.hh2
-rw-r--r--src/Container.cc8
-rw-r--r--src/Container.hh2
-rw-r--r--src/GenericTool.cc5
-rw-r--r--src/GenericTool.hh2
-rw-r--r--src/IconbarTool.hh1
-rw-r--r--src/SystemTray.hh2
-rw-r--r--src/Toolbar.cc8
-rw-r--r--src/ToolbarItem.hh3
-rw-r--r--src/WorkspaceNameTool.hh2
10 files changed, 34 insertions, 1 deletions
diff --git a/src/ClockTool.hh b/src/ClockTool.hh
index 9993ee6..d55bf5f 100644
--- a/src/ClockTool.hh
+++ b/src/ClockTool.hh
@@ -65,6 +65,8 @@ public:
65 65
66 void setOrientation(FbTk::Orientation orient); 66 void setOrientation(FbTk::Orientation orient);
67 67
68 void parentMoved() { m_button.parentMoved(); }
69
68private: 70private:
69 void updateTime(); 71 void updateTime();
70 void update(FbTk::Subject *subj); 72 void update(FbTk::Subject *subj);
diff --git a/src/Container.cc b/src/Container.cc
index db460c2..4cd0fa8 100644
--- a/src/Container.cc
+++ b/src/Container.cc
@@ -510,6 +510,14 @@ void Container::setAlpha(unsigned char alpha) {
510 (*it)->setAlpha(alpha); 510 (*it)->setAlpha(alpha);
511} 511}
512 512
513void Container::parentMoved() {
514 FbTk::FbWindow::parentMoved();
515 ItemList::iterator it = m_item_list.begin();
516 ItemList::iterator it_end = m_item_list.end();
517 for (; it != it_end; ++it)
518 (*it)->parentMoved();
519}
520
513void Container::clear() { 521void Container::clear() {
514 ItemList::iterator it = m_item_list.begin(); 522 ItemList::iterator it = m_item_list.begin();
515 ItemList::iterator it_end = m_item_list.end(); 523 ItemList::iterator it_end = m_item_list.end();
diff --git a/src/Container.hh b/src/Container.hh
index 20f7048..448abee 100644
--- a/src/Container.hh
+++ b/src/Container.hh
@@ -83,6 +83,8 @@ public:
83 bool tryButtonPressEvent(XButtonEvent &event); 83 bool tryButtonPressEvent(XButtonEvent &event);
84 bool tryButtonReleaseEvent(XButtonEvent &event); 84 bool tryButtonReleaseEvent(XButtonEvent &event);
85 85
86 void parentMoved();
87
86 /// accessors 88 /// accessors
87 inline Alignment alignment() const { return m_align; } 89 inline Alignment alignment() const { return m_align; }
88 inline FbTk::Orientation orientation() const { return m_orientation; } 90 inline FbTk::Orientation orientation() const { return m_orientation; }
diff --git a/src/GenericTool.cc b/src/GenericTool.cc
index caed5f4..809b9e4 100644
--- a/src/GenericTool.cc
+++ b/src/GenericTool.cc
@@ -84,3 +84,8 @@ void GenericTool::renderTheme(unsigned char alpha) {
84void GenericTool::update(FbTk::Subject *subj) { 84void GenericTool::update(FbTk::Subject *subj) {
85 m_window->clear(); 85 m_window->clear();
86} 86}
87
88void GenericTool::parentMoved() {
89 m_window->parentMoved();
90}
91
diff --git a/src/GenericTool.hh b/src/GenericTool.hh
index e77232c..c44c9cc 100644
--- a/src/GenericTool.hh
+++ b/src/GenericTool.hh
@@ -52,6 +52,8 @@ public:
52 unsigned int height() const; 52 unsigned int height() const;
53 unsigned int borderWidth() const; 53 unsigned int borderWidth() const;
54 54
55 void parentMoved();
56
55 const ToolTheme &theme() const { return m_theme; } 57 const ToolTheme &theme() const { return m_theme; }
56 FbTk::FbWindow &window() { return *m_window; } 58 FbTk::FbWindow &window() { return *m_window; }
57 const FbTk::FbWindow &window() const { return *m_window; } 59 const FbTk::FbWindow &window() const { return *m_window; }
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh
index c56e7a3..3589185 100644
--- a/src/IconbarTool.hh
+++ b/src/IconbarTool.hh
@@ -86,6 +86,7 @@ public:
86 void setMode(Mode mode); 86 void setMode(Mode mode);
87 void setDeiconifyMode(DeiconifyMode mode); 87 void setDeiconifyMode(DeiconifyMode mode);
88 void setWheelMode(WheelMode mode); 88 void setWheelMode(WheelMode mode);
89 void parentMoved() { m_icon_container.parentMoved(); }
89 90
90 unsigned int width() const; 91 unsigned int width() const;
91 unsigned int height() const; 92 unsigned int height() const;
diff --git a/src/SystemTray.hh b/src/SystemTray.hh
index 7bb884f..8be1cd8 100644
--- a/src/SystemTray.hh
+++ b/src/SystemTray.hh
@@ -71,6 +71,8 @@ public:
71 inline void renderTheme(unsigned char alpha) {} 71 inline void renderTheme(unsigned char alpha) {}
72 inline void updateSizing() {} 72 inline void updateSizing() {}
73 73
74 void parentMoved() { m_window.parentMoved(); }
75
74private: 76private:
75 77
76 void update(FbTk::Subject *subj); 78 void update(FbTk::Subject *subj);
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 484719e..6384430 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -782,8 +782,14 @@ void Toolbar::toggleHidden() {
782 m_hidden = ! m_hidden; 782 m_hidden = ! m_hidden;
783 if (isHidden()) 783 if (isHidden())
784 frame.window.move(frame.x_hidden, frame.y_hidden); 784 frame.window.move(frame.x_hidden, frame.y_hidden);
785 else 785 else {
786 frame.window.move(frame.x, frame.y); 786 frame.window.move(frame.x, frame.y);
787 ItemList::iterator item_it = m_item_list.begin();
788 ItemList::iterator item_it_end = m_item_list.end();
789 for (item_it = m_item_list.begin(); item_it != item_it_end; ++item_it) {
790 (*item_it)->parentMoved();
791 }
792 }
787 793
788} 794}
789 795
diff --git a/src/ToolbarItem.hh b/src/ToolbarItem.hh
index a240880..5e1ed25 100644
--- a/src/ToolbarItem.hh
+++ b/src/ToolbarItem.hh
@@ -58,6 +58,9 @@ public:
58 // the toolbar instead. Otherwise there are ordering problems. 58 // the toolbar instead. Otherwise there are ordering problems.
59 virtual void renderTheme(unsigned char alpha) = 0; 59 virtual void renderTheme(unsigned char alpha) = 0;
60 60
61 // insist implemented, even if blank
62 virtual void parentMoved() = 0; // called when moved from hiding
63
61 // just update theme items that affect the size 64 // just update theme items that affect the size
62 virtual void updateSizing() = 0; 65 virtual void updateSizing() = 0;
63 66
diff --git a/src/WorkspaceNameTool.hh b/src/WorkspaceNameTool.hh
index 6017d4e..f12ca18 100644
--- a/src/WorkspaceNameTool.hh
+++ b/src/WorkspaceNameTool.hh
@@ -54,6 +54,8 @@ public:
54 const FbTk::Button &button() const { return m_button; } 54 const FbTk::Button &button() const { return m_button; }
55 void setOrientation(FbTk::Orientation orient); 55 void setOrientation(FbTk::Orientation orient);
56 56
57 void parentMoved() { m_button.parentMoved(); }
58
57private: 59private:
58 void renderTheme(unsigned char alpha); 60 void renderTheme(unsigned char alpha);
59 void reRender(); 61 void reRender();