diff options
author | fluxgen <fluxgen> | 2003-04-25 17:39:00 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-25 17:39:00 (GMT) |
commit | 5a5b854c9638a17a68c10e450610f94955c48272 (patch) | |
tree | 844a0d350d14a519f95da4339872ecb572da5bd7 | |
parent | 9751d05db3a45f0d3d22a02002374562fb9d44a7 (diff) | |
download | fluxbox_paul-5a5b854c9638a17a68c10e450610f94955c48272.zip fluxbox_paul-5a5b854c9638a17a68c10e450610f94955c48272.tar.bz2 |
fixed WinButton state update
-rw-r--r-- | src/Screen.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 58a64dc..de5e655 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.134 2003/04/25 16:07:46 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.135 2003/04/25 17:39:00 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -568,8 +568,7 @@ BScreen::BScreen(ResourceManager &rm, | |||
568 | // set database for new Theme Engine | 568 | // set database for new Theme Engine |
569 | FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str()); | 569 | FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str()); |
570 | 570 | ||
571 | const char *s = i18n->getMessage( | 571 | const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength, |
572 | FBNLS::ScreenSet, FBNLS::ScreenPositionLength, | ||
573 | "W: 0000 x H: 0000"); | 572 | "W: 0000 x H: 0000"); |
574 | 573 | ||
575 | int l = strlen(s); | 574 | int l = strlen(s); |
@@ -588,7 +587,7 @@ BScreen::BScreen(ResourceManager &rm, | |||
588 | //!! TODO border width | 587 | //!! TODO border width |
589 | geom_window = | 588 | geom_window = |
590 | XCreateWindow(disp, getRootWindow(), | 589 | XCreateWindow(disp, getRootWindow(), |
591 | 0, 0, geom_w, geom_h, m_root_theme->borderWidth(), getDepth(), | 590 | 0, 0, geom_w, geom_h, rootTheme().borderWidth(), getDepth(), |
592 | InputOutput, getVisual(), mask, &attrib); | 591 | InputOutput, getVisual(), mask, &attrib); |
593 | geom_visible = false; | 592 | geom_visible = false; |
594 | 593 | ||
@@ -1328,14 +1327,13 @@ void BScreen::setupWindowActions(FluxboxWindow &win) { | |||
1328 | //create new buttons | 1327 | //create new buttons |
1329 | FbTk::Button *newbutton = 0; | 1328 | FbTk::Button *newbutton = 0; |
1330 | if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) { | 1329 | if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) { |
1331 | newbutton = new WinButton(WinButton::MINIMIZE, | 1330 | newbutton = new WinButton(win, WinButton::MINIMIZE, |
1332 | frame.titlebar(), | 1331 | frame.titlebar(), |
1333 | 0, 0, 10, 10); | 1332 | 0, 0, 10, 10); |
1334 | newbutton->setOnClick(iconify_cmd); | 1333 | newbutton->setOnClick(iconify_cmd); |
1335 | 1334 | ||
1336 | |||
1337 | } else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) { | 1335 | } else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) { |
1338 | newbutton = new WinButton(WinButton::MAXIMIZE, | 1336 | newbutton = new WinButton(win, WinButton::MAXIMIZE, |
1339 | frame.titlebar(), | 1337 | frame.titlebar(), |
1340 | 0, 0, 10, 10); | 1338 | 0, 0, 10, 10); |
1341 | 1339 | ||
@@ -1344,7 +1342,7 @@ void BScreen::setupWindowActions(FluxboxWindow &win) { | |||
1344 | newbutton->setOnClick(maximize_vert_cmd, 2); | 1342 | newbutton->setOnClick(maximize_vert_cmd, 2); |
1345 | 1343 | ||
1346 | } else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) { | 1344 | } else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) { |
1347 | newbutton = new WinButton(WinButton::CLOSE, | 1345 | newbutton = new WinButton(win, WinButton::CLOSE, |
1348 | frame.titlebar(), | 1346 | frame.titlebar(), |
1349 | 0, 0, 10, 10); | 1347 | 0, 0, 10, 10); |
1350 | 1348 | ||
@@ -1353,16 +1351,17 @@ void BScreen::setupWindowActions(FluxboxWindow &win) { | |||
1353 | cerr<<__FILE__<<": Creating close button"<<endl; | 1351 | cerr<<__FILE__<<": Creating close button"<<endl; |
1354 | #endif // DEBUG | 1352 | #endif // DEBUG |
1355 | } else if ((*dir)[i] == Fluxbox::STICK) { | 1353 | } else if ((*dir)[i] == Fluxbox::STICK) { |
1356 | newbutton = new WinButton(WinButton::STICK, | 1354 | WinButton *winbtn = new WinButton(win, WinButton::STICK, |
1357 | frame.titlebar(), | 1355 | frame.titlebar(), |
1358 | 0, 0, 10, 10); | 1356 | 0, 0, 10, 10); |
1359 | newbutton->setOnClick(stick_cmd); | 1357 | win.stateSig().attach(winbtn); |
1360 | 1358 | winbtn->setOnClick(stick_cmd); | |
1359 | newbutton = winbtn; | ||
1361 | } else if ((*dir)[i] == Fluxbox::SHADE) { | 1360 | } else if ((*dir)[i] == Fluxbox::SHADE) { |
1362 | newbutton = new WinButton(WinButton::SHADE, | 1361 | WinButton *winbtn = new WinButton(win, WinButton::SHADE, |
1363 | frame.titlebar(), | 1362 | frame.titlebar(), |
1364 | 0, 0, 10, 10); | 1363 | 0, 0, 10, 10); |
1365 | newbutton->setOnClick(shade_cmd); | 1364 | winbtn->setOnClick(shade_cmd); |
1366 | } | 1365 | } |
1367 | 1366 | ||
1368 | if (newbutton != 0) { | 1367 | if (newbutton != 0) { |