all repos — fluxbox @ bf81d4e6c31546bf92ea160055bf6e2fdc8225f5

custom fork of the fluxbox windowmanager

removing strut when maximize over is set
fluxgen fluxgen
commit

bf81d4e6c31546bf92ea160055bf6e2fdc8225f5

parent

99150507d8732b74ea3dda3b37f03d613005c9f1

1 files changed, 16 insertions(+), 11 deletions(-)

jump to
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.63 2003/06/22 12:31:37 fluxgen Exp $ +// $Id: Slit.cc,v 1.64 2003/06/22 14:17:17 fluxgen Exp $ #include "Slit.hh"

@@ -39,10 +39,11 @@ #include "I18n.hh"

#include "Screen.hh" #include "ImageControl.hh" #include "RefCount.hh" -#include "SimpleCommand.hh" #include "BoolMenuItem.hh" #include "EventManager.hh" +#include "SimpleCommand.hh" #include "MacroCommand.hh" +#include "FbCommands.hh" #include "LayerMenu.hh" #include "fluxbox.hh" #include "XLayer.hh"

@@ -78,6 +79,9 @@ public:

explicit SlitClientMenuItem(SlitClient &client, FbTk::RefCount<FbTk::Command> &cmd): FbTk::MenuItem(client.matchName().c_str(), cmd), m_client(client) { FbTk::MenuItem::setSelected(client.visible()); + // save resources as default click action + FbTk::RefCount<FbTk::Command> save_rc(new FbCommands::SaveResources()); + setCommand(save_rc); } const std::string &label() const { return m_client.matchName();

@@ -88,7 +92,6 @@ }

void click(int button, int time) { m_client.setVisible(!m_client.visible()); FbTk::MenuItem::click(button, time); - Fluxbox::instance()->save_rc(); } private: SlitClient &m_client;

@@ -258,10 +261,16 @@ }

} void Slit::updateStrut() { + bool had_strut = m_strut ? true : false; clearStrut(); - // no need for area if we're autohiding - if (doAutoHide()) + // no need for area if we're autohiding or set maximize over + if (doAutoHide() || *m_rc_maximize_over) { + // update screen area if we had a strut before + if (had_strut) + screen().updateAvailableWorkspaceArea(); return; + } + int left = 0, right = 0, top = 0, bottom = 0; switch (placement()) {

@@ -532,6 +541,7 @@ }

void Slit::reconfigure() { + m_transp->setAlpha(*m_rc_alpha); frame.width = 0;

@@ -685,7 +695,6 @@

m_slitmenu.reconfigure(); updateClientmenu(); updateStrut(); - }

@@ -809,9 +818,6 @@ } else {

frame.window.moveResize(frame.x, frame.y, frame.width, frame.height); } -#ifdef DEBUG - cerr<<__FILE__<<"("<<__FUNCTION__<<"): frame("<<dec<<frame.x<<", "<<frame.y<<", "<<frame.width<<", "<<frame.height<<")"<<endl; -#endif // DEBUG }

@@ -1101,8 +1107,7 @@ using namespace FbTk;

FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand(); FbTk::MacroCommand *s_a_reconf_slit_macro = new FbTk::MacroCommand(); - FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(*Fluxbox::instance(), - &Fluxbox::save_rc)); + FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources()); FbTk::RefCount<FbTk::Command> reconf_cmd(new FbCommands::ReconfigureFluxboxCmd()); FbTk::RefCount<FbTk::Command> reconf_slit_cmd(new FbTk::SimpleCommand<Slit>(*this, &Slit::reconfigure));