fixed WinButton state update
This commit is contained in:
parent
9751d05db3
commit
5a5b854c96
1 changed files with 13 additions and 14 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: Screen.cc,v 1.134 2003/04/25 16:07:46 fluxgen Exp $
|
// $Id: Screen.cc,v 1.135 2003/04/25 17:39:00 fluxgen Exp $
|
||||||
|
|
||||||
|
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
|
@ -568,8 +568,7 @@ BScreen::BScreen(ResourceManager &rm,
|
||||||
// set database for new Theme Engine
|
// set database for new Theme Engine
|
||||||
FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str());
|
FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str());
|
||||||
|
|
||||||
const char *s = i18n->getMessage(
|
const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength,
|
||||||
FBNLS::ScreenSet, FBNLS::ScreenPositionLength,
|
|
||||||
"W: 0000 x H: 0000");
|
"W: 0000 x H: 0000");
|
||||||
|
|
||||||
int l = strlen(s);
|
int l = strlen(s);
|
||||||
|
@ -588,7 +587,7 @@ BScreen::BScreen(ResourceManager &rm,
|
||||||
//!! TODO border width
|
//!! TODO border width
|
||||||
geom_window =
|
geom_window =
|
||||||
XCreateWindow(disp, getRootWindow(),
|
XCreateWindow(disp, getRootWindow(),
|
||||||
0, 0, geom_w, geom_h, m_root_theme->borderWidth(), getDepth(),
|
0, 0, geom_w, geom_h, rootTheme().borderWidth(), getDepth(),
|
||||||
InputOutput, getVisual(), mask, &attrib);
|
InputOutput, getVisual(), mask, &attrib);
|
||||||
geom_visible = false;
|
geom_visible = false;
|
||||||
|
|
||||||
|
@ -1328,14 +1327,13 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
|
||||||
//create new buttons
|
//create new buttons
|
||||||
FbTk::Button *newbutton = 0;
|
FbTk::Button *newbutton = 0;
|
||||||
if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) {
|
if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) {
|
||||||
newbutton = new WinButton(WinButton::MINIMIZE,
|
newbutton = new WinButton(win, WinButton::MINIMIZE,
|
||||||
frame.titlebar(),
|
frame.titlebar(),
|
||||||
0, 0, 10, 10);
|
0, 0, 10, 10);
|
||||||
newbutton->setOnClick(iconify_cmd);
|
newbutton->setOnClick(iconify_cmd);
|
||||||
|
|
||||||
|
|
||||||
} else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) {
|
} else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) {
|
||||||
newbutton = new WinButton(WinButton::MAXIMIZE,
|
newbutton = new WinButton(win, WinButton::MAXIMIZE,
|
||||||
frame.titlebar(),
|
frame.titlebar(),
|
||||||
0, 0, 10, 10);
|
0, 0, 10, 10);
|
||||||
|
|
||||||
|
@ -1344,7 +1342,7 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
|
||||||
newbutton->setOnClick(maximize_vert_cmd, 2);
|
newbutton->setOnClick(maximize_vert_cmd, 2);
|
||||||
|
|
||||||
} else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
|
} else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
|
||||||
newbutton = new WinButton(WinButton::CLOSE,
|
newbutton = new WinButton(win, WinButton::CLOSE,
|
||||||
frame.titlebar(),
|
frame.titlebar(),
|
||||||
0, 0, 10, 10);
|
0, 0, 10, 10);
|
||||||
|
|
||||||
|
@ -1353,16 +1351,17 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
|
||||||
cerr<<__FILE__<<": Creating close button"<<endl;
|
cerr<<__FILE__<<": Creating close button"<<endl;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
} else if ((*dir)[i] == Fluxbox::STICK) {
|
} else if ((*dir)[i] == Fluxbox::STICK) {
|
||||||
newbutton = new WinButton(WinButton::STICK,
|
WinButton *winbtn = new WinButton(win, WinButton::STICK,
|
||||||
frame.titlebar(),
|
frame.titlebar(),
|
||||||
0, 0, 10, 10);
|
0, 0, 10, 10);
|
||||||
newbutton->setOnClick(stick_cmd);
|
win.stateSig().attach(winbtn);
|
||||||
|
winbtn->setOnClick(stick_cmd);
|
||||||
|
newbutton = winbtn;
|
||||||
} else if ((*dir)[i] == Fluxbox::SHADE) {
|
} else if ((*dir)[i] == Fluxbox::SHADE) {
|
||||||
newbutton = new WinButton(WinButton::SHADE,
|
WinButton *winbtn = new WinButton(win, WinButton::SHADE,
|
||||||
frame.titlebar(),
|
frame.titlebar(),
|
||||||
0, 0, 10, 10);
|
0, 0, 10, 10);
|
||||||
newbutton->setOnClick(shade_cmd);
|
winbtn->setOnClick(shade_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newbutton != 0) {
|
if (newbutton != 0) {
|
||||||
|
|
Loading…
Reference in a new issue