all repos — fluxbox @ b4b927dad90baa43d290679872943144f1c2ab93

custom fork of the fluxbox windowmanager

moved function so fluxbox compiles with --disable-remember
markt markt
commit

b4b927dad90baa43d290679872943144f1c2ab93

parent

6f8a5c7a8dc4552105205c8c9f0d270703bcc271

5 files changed, 32 insertions(+), 30 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0.0: +*07/06/16: + * Fixed compile error with --disable-remember (Mark) + Window.cc/hh Remember.cc/hh *07/06/09: * Minor change to the /bin/sh - solution (Mathias) we are using now just $SHELL -c <line_here>
M src/Remember.ccsrc/Remember.cc

@@ -290,32 +290,6 @@

s_instance = 0; } -int Remember::getDecoFromString(const string &str_label) { - if (strcasecmp(str_label.c_str(), "NONE") == 0) - return 0; - if (strcasecmp(str_label.c_str(), "NORMAL") == 0) - return FluxboxWindow::DECORM_LAST - 1; - if (strcasecmp(str_label.c_str(), "TINY") == 0) - return FluxboxWindow::DECORM_TITLEBAR - | FluxboxWindow::DECORM_ICONIFY - | FluxboxWindow::DECORM_MENU - | FluxboxWindow::DECORM_TAB; - if (strcasecmp(str_label.c_str(), "TOOL") == 0) - return FluxboxWindow::DECORM_TITLEBAR - | FluxboxWindow::DECORM_MENU; - if (strcasecmp(str_label.c_str(), "BORDER") == 0) - return FluxboxWindow::DECORM_BORDER - | FluxboxWindow::DECORM_MENU; - if (strcasecmp(str_label.c_str(), "TAB") == 0) - return FluxboxWindow::DECORM_BORDER - | FluxboxWindow::DECORM_MENU - | FluxboxWindow::DECORM_TAB; - unsigned int mask; - if (getuint(str_label.c_str(), mask)) - return mask; - return -1; -} - Application* Remember::find(WinClient &winclient) { // if it is already associated with a application, return that one // otherwise, check it against every pattern that we've got

@@ -474,7 +448,7 @@ } else if (strcasecmp(str_key.c_str(), "Hidden") == 0) {

app.rememberIconHiddenstate((strcasecmp(str_label.c_str(), "yes") == 0)); app.rememberFocusHiddenstate((strcasecmp(str_label.c_str(), "yes") == 0)); } else if (strcasecmp(str_key.c_str(), "Deco") == 0) { - int deco = getDecoFromString(str_label); + int deco = FluxboxWindow::getDecoMaskFromString(str_label); if (deco == -1) had_error = 1; else
M src/Remember.hhsrc/Remember.hh

@@ -205,8 +205,6 @@

Remember(); ~Remember(); - static int getDecoFromString(const std::string &str); - Application* find(WinClient &winclient); Application* add(WinClient &winclient); FluxboxWindow* findGroup(Application *, BScreen &screen);
M src/Window.ccsrc/Window.cc

@@ -388,7 +388,7 @@ m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;

m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; // set default decorations but don't apply them - setDecorationMask(Remember::getDecoFromString(screen().defaultDeco()), false); + setDecorationMask(getDecoMaskFromString(screen().defaultDeco()), false); functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true;

@@ -4206,3 +4206,29 @@ evm.add(*this, btn->window()); // we take care of button events for this

evm.add(*this, client.window()); client.setFluxboxWindow(this); } + +int FluxboxWindow::getDecoMaskFromString(const string &str_label) { + if (strcasecmp(str_label.c_str(), "NONE") == 0) + return 0; + if (strcasecmp(str_label.c_str(), "NORMAL") == 0) + return FluxboxWindow::DECORM_LAST - 1; + if (strcasecmp(str_label.c_str(), "TINY") == 0) + return FluxboxWindow::DECORM_TITLEBAR + | FluxboxWindow::DECORM_ICONIFY + | FluxboxWindow::DECORM_MENU + | FluxboxWindow::DECORM_TAB; + if (strcasecmp(str_label.c_str(), "TOOL") == 0) + return FluxboxWindow::DECORM_TITLEBAR + | FluxboxWindow::DECORM_MENU; + if (strcasecmp(str_label.c_str(), "BORDER") == 0) + return FluxboxWindow::DECORM_BORDER + | FluxboxWindow::DECORM_MENU; + if (strcasecmp(str_label.c_str(), "TAB") == 0) + return FluxboxWindow::DECORM_BORDER + | FluxboxWindow::DECORM_MENU + | FluxboxWindow::DECORM_TAB; + unsigned int mask = atoi(str_label.c_str()); + if (mask) + return mask; + return -1; +}
M src/Window.hhsrc/Window.hh

@@ -399,6 +399,7 @@

int layerNum() const { return m_layernum; } void setLayerNum(int layernum); + static int getDecoMaskFromString(const std::string &str); unsigned int titlebarHeight() const;