aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-15 11:42:13 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-15 11:42:13 (GMT)
commit0689a0a4a8252d46a72048269faf00dba52a73c3 (patch)
tree451b1b6f759afdc9d0383a4bfe17e8fd5aff3110 /src/Window.cc
parent06d696f99b276e3394aec10f52c206aec4697c76 (diff)
downloadfluxbox-0689a0a4a8252d46a72048269faf00dba52a73c3.zip
fluxbox-0689a0a4a8252d46a72048269faf00dba52a73c3.tar.bz2
move getDecoMaskFromString to FbWinFrame
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 6f8d0f7..9628598 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -427,7 +427,8 @@ void FluxboxWindow::init() {
427 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; 427 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0;
428 428
429 // set default decorations but don't apply them 429 // set default decorations but don't apply them
430 setDecorationMask(getDecoMaskFromString(screen().defaultDeco()), false); 430 setDecorationMask(FbWinFrame::getDecoMaskFromString(screen().defaultDeco()),
431 false);
431 432
432 functions.resize = functions.move = functions.iconify = functions.maximize 433 functions.resize = functions.move = functions.iconify = functions.maximize
433 = functions.close = functions.tabable = true; 434 = functions.close = functions.tabable = true;
@@ -4035,26 +4036,6 @@ void FluxboxWindow::associateClient(WinClient &client) {
4035 client.titleSig().attach(this); 4036 client.titleSig().attach(this);
4036} 4037}
4037 4038
4038int FluxboxWindow::getDecoMaskFromString(const string &str_label) {
4039 if (strcasecmp(str_label.c_str(), "NONE") == 0)
4040 return FbWinFrame::DECOR_NONE;
4041 if (strcasecmp(str_label.c_str(), "NORMAL") == 0)
4042 return FbWinFrame::DECOR_NORMAL;
4043 if (strcasecmp(str_label.c_str(), "TINY") == 0)
4044 return FbWinFrame::DECOR_TINY;
4045 if (strcasecmp(str_label.c_str(), "TOOL") == 0)
4046 return FbWinFrame::DECOR_TOOL;
4047 if (strcasecmp(str_label.c_str(), "BORDER") == 0)
4048 return FbWinFrame::DECOR_BORDER;
4049 if (strcasecmp(str_label.c_str(), "TAB") == 0)
4050 return FbWinFrame::DECOR_TAB;
4051 int mask = -1;
4052 if (str_label.size() > 1 && str_label[0] == '0' && str_label[1] == 'x' ||
4053 str_label.size() > 0 && isdigit(str_label[0]))
4054 mask = strtol(str_label.c_str(), NULL, 0);
4055 return mask;
4056}
4057
4058int FluxboxWindow::getOnHead() const { 4039int FluxboxWindow::getOnHead() const {
4059 return screen().getHead(fbWindow()); 4040 return screen().getHead(fbWindow());
4060} 4041}