Fixed closebutton
This commit is contained in:
parent
522e38bd71
commit
11ae668af7
1 changed files with 17 additions and 8 deletions
|
@ -1405,11 +1405,11 @@ void FluxboxWindow::getMWMHints(void) {
|
||||||
unsigned long num, len;
|
unsigned long num, len;
|
||||||
Fluxbox *fluxbox = Fluxbox::instance();
|
Fluxbox *fluxbox = Fluxbox::instance();
|
||||||
if (XGetWindowProperty(display, client.window,
|
if (XGetWindowProperty(display, client.window,
|
||||||
fluxbox->getMotifWMHintsAtom(), 0,
|
fluxbox->getMotifWMHintsAtom(), 0,
|
||||||
PropMwmHintsElements, false,
|
PropMwmHintsElements, false,
|
||||||
fluxbox->getMotifWMHintsAtom(), &atom_return,
|
fluxbox->getMotifWMHintsAtom(), &atom_return,
|
||||||
&format, &num, &len,
|
&format, &num, &len,
|
||||||
(unsigned char **) &client.mwm_hint) == Success &&
|
(unsigned char **) &client.mwm_hint) == Success &&
|
||||||
client.mwm_hint)
|
client.mwm_hint)
|
||||||
if (num == PropMwmHintsElements) {
|
if (num == PropMwmHintsElements) {
|
||||||
if (client.mwm_hint->flags & MwmHintsDecorations)
|
if (client.mwm_hint->flags & MwmHintsDecorations)
|
||||||
|
@ -1437,10 +1437,10 @@ void FluxboxWindow::getMWMHints(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client.mwm_hint->flags & MwmHintsFunctions)
|
if (client.mwm_hint->flags & MwmHintsFunctions)
|
||||||
if (client.mwm_hint->functions & MwmFuncAll)
|
if (client.mwm_hint->functions & MwmFuncAll) {
|
||||||
functions.resize = functions.move = functions.iconify =
|
functions.resize = functions.move = functions.iconify =
|
||||||
functions.maximize = functions.close = true;
|
functions.maximize = functions.close = true;
|
||||||
else {
|
} else {
|
||||||
functions.resize = functions.move = functions.iconify =
|
functions.resize = functions.move = functions.iconify =
|
||||||
functions.maximize = functions.close = false;
|
functions.maximize = functions.close = false;
|
||||||
|
|
||||||
|
@ -2688,7 +2688,16 @@ void FluxboxWindow::propertyNotifyEvent(Atom atom) {
|
||||||
default:
|
default:
|
||||||
if (atom == fluxbox->getWMProtocolsAtom()) {
|
if (atom == fluxbox->getWMProtocolsAtom()) {
|
||||||
getWMProtocols();
|
getWMProtocols();
|
||||||
|
|
||||||
|
if (decorations.close && !findTitleButton(Fluxbox::Close)) {
|
||||||
|
createButton(Fluxbox::Close, FluxboxWindow::closePressed_cb,
|
||||||
|
FluxboxWindow::closeButton_cb, FluxboxWindow::closeDraw_cb);
|
||||||
|
|
||||||
|
if (decorations.titlebar)
|
||||||
|
positionButtons(true);
|
||||||
|
if (windowmenu)
|
||||||
|
windowmenu->reconfigure();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue