all repos — fluxbox @ 3e6def97d18133baf82b596cb742a2f7ef4f9f00

custom fork of the fluxbox windowmanager

fix transparency updates for the toolbar when autohide is on
simonb simonb
commit

3e6def97d18133baf82b596cb742a2f7ef4f9f00

parent

11cba508e6a59587c304728fc8447d0f0c49f2c2

M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.16: *06/04/17: + * Fix toolbar transparency when autohide enabled (Simon) + Toolbar.cc Container.hh/cc ToolbarItem.hh/cc *Tool.hh/cc * Fix toolbar transparency (frame and empty iconbar) (Simon) Container.cc Toolbar.cc * Fix display of label for dialog-type boxes (Simon)
M src/ClockTool.hhsrc/ClockTool.hh

@@ -65,6 +65,8 @@ inline const std::string &timeFormat() const { return *m_timeformat; }

void setOrientation(FbTk::Orientation orient); + void parentMoved() { m_button.parentMoved(); } + private: void updateTime(); void update(FbTk::Subject *subj);
M src/Container.ccsrc/Container.cc

@@ -510,6 +510,14 @@ for (; it != it_end; ++it)

(*it)->setAlpha(alpha); } +void Container::parentMoved() { + FbTk::FbWindow::parentMoved(); + ItemList::iterator it = m_item_list.begin(); + ItemList::iterator it_end = m_item_list.end(); + for (; it != it_end; ++it) + (*it)->parentMoved(); +} + void Container::clear() { ItemList::iterator it = m_item_list.begin(); ItemList::iterator it_end = m_item_list.end();
M src/Container.hhsrc/Container.hh

@@ -83,6 +83,8 @@ bool tryExposeEvent(XExposeEvent &event);

bool tryButtonPressEvent(XButtonEvent &event); bool tryButtonReleaseEvent(XButtonEvent &event); + void parentMoved(); + /// accessors inline Alignment alignment() const { return m_align; } inline FbTk::Orientation orientation() const { return m_orientation; }
M src/GenericTool.ccsrc/GenericTool.cc

@@ -84,3 +84,8 @@

void GenericTool::update(FbTk::Subject *subj) { m_window->clear(); } + +void GenericTool::parentMoved() { + m_window->parentMoved(); +} +
M src/GenericTool.hhsrc/GenericTool.hh

@@ -52,6 +52,8 @@ unsigned int width() const;

unsigned int height() const; unsigned int borderWidth() const; + void parentMoved(); + const ToolTheme &theme() const { return m_theme; } FbTk::FbWindow &window() { return *m_window; } const FbTk::FbWindow &window() const { return *m_window; }
M src/IconbarTool.hhsrc/IconbarTool.hh

@@ -86,6 +86,7 @@ void setAlignment(Container::Alignment a);

void setMode(Mode mode); void setDeiconifyMode(DeiconifyMode mode); void setWheelMode(WheelMode mode); + void parentMoved() { m_icon_container.parentMoved(); } unsigned int width() const; unsigned int height() const;
M src/SystemTray.hhsrc/SystemTray.hh

@@ -71,6 +71,8 @@

inline void renderTheme(unsigned char alpha) {} inline void updateSizing() {} + void parentMoved() { m_window.parentMoved(); } + private: void update(FbTk::Subject *subj);
M src/Toolbar.ccsrc/Toolbar.cc

@@ -782,8 +782,14 @@ // toggle hidden

m_hidden = ! m_hidden; if (isHidden()) frame.window.move(frame.x_hidden, frame.y_hidden); - else + else { frame.window.move(frame.x, frame.y); + ItemList::iterator item_it = m_item_list.begin(); + ItemList::iterator item_it_end = m_item_list.end(); + for (item_it = m_item_list.begin(); item_it != item_it_end; ++item_it) { + (*item_it)->parentMoved(); + } + } }
M src/ToolbarItem.hhsrc/ToolbarItem.hh

@@ -58,6 +58,9 @@ // Tools should NOT listen to theme changes - they'll get notified by

// the toolbar instead. Otherwise there are ordering problems. virtual void renderTheme(unsigned char alpha) = 0; + // insist implemented, even if blank + virtual void parentMoved() = 0; // called when moved from hiding + // just update theme items that affect the size virtual void updateSizing() = 0;
M src/WorkspaceNameTool.hhsrc/WorkspaceNameTool.hh

@@ -54,6 +54,8 @@ FbTk::Button &button() { return m_button; }

const FbTk::Button &button() const { return m_button; } void setOrientation(FbTk::Orientation orient); + void parentMoved() { m_button.parentMoved(); } + private: void renderTheme(unsigned char alpha); void reRender();