aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 23e11bf..1c839f6 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -388,7 +388,7 @@ void FluxboxWindow::init() {
388 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; 388 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0;
389 389
390 // set default decorations but don't apply them 390 // set default decorations but don't apply them
391 setDecorationMask(Remember::getDecoFromString(screen().defaultDeco()), false); 391 setDecorationMask(getDecoMaskFromString(screen().defaultDeco()), false);
392 392
393 functions.resize = functions.move = functions.iconify = functions.maximize 393 functions.resize = functions.move = functions.iconify = functions.maximize
394 = functions.close = functions.tabable = true; 394 = functions.close = functions.tabable = true;
@@ -4206,3 +4206,29 @@ void FluxboxWindow::associateClient(WinClient &client) {
4206 evm.add(*this, client.window()); 4206 evm.add(*this, client.window());
4207 client.setFluxboxWindow(this); 4207 client.setFluxboxWindow(this);
4208} 4208}
4209
4210int FluxboxWindow::getDecoMaskFromString(const string &str_label) {
4211 if (strcasecmp(str_label.c_str(), "NONE") == 0)
4212 return 0;
4213 if (strcasecmp(str_label.c_str(), "NORMAL") == 0)
4214 return FluxboxWindow::DECORM_LAST - 1;
4215 if (strcasecmp(str_label.c_str(), "TINY") == 0)
4216 return FluxboxWindow::DECORM_TITLEBAR
4217 | FluxboxWindow::DECORM_ICONIFY
4218 | FluxboxWindow::DECORM_MENU
4219 | FluxboxWindow::DECORM_TAB;
4220 if (strcasecmp(str_label.c_str(), "TOOL") == 0)
4221 return FluxboxWindow::DECORM_TITLEBAR
4222 | FluxboxWindow::DECORM_MENU;
4223 if (strcasecmp(str_label.c_str(), "BORDER") == 0)
4224 return FluxboxWindow::DECORM_BORDER
4225 | FluxboxWindow::DECORM_MENU;
4226 if (strcasecmp(str_label.c_str(), "TAB") == 0)
4227 return FluxboxWindow::DECORM_BORDER
4228 | FluxboxWindow::DECORM_MENU
4229 | FluxboxWindow::DECORM_TAB;
4230 unsigned int mask = atoi(str_label.c_str());
4231 if (mask)
4232 return mask;
4233 return -1;
4234}