aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/Window.cc b/src/Window.cc
index a7e3afa..0a5c948 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.266 2004/01/23 10:37:08 rathnor Exp $ 25// $Id: Window.cc,v 1.267 2004/02/16 09:19:45 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -446,7 +446,8 @@ void FluxboxWindow::init() {
446 m_client->x = wattrib.x; m_client->y = wattrib.y; 446 m_client->x = wattrib.x; m_client->y = wattrib.y;
447 447
448 m_timer.setTimeout(fluxbox.getAutoRaiseDelay()); 448 m_timer.setTimeout(fluxbox.getAutoRaiseDelay());
449 FbTk::RefCount<FbTk::Command> raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this, &FluxboxWindow::raise)); 449 FbTk::RefCount<FbTk::Command> raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this,
450 &FluxboxWindow::raise));
450 m_timer.setCommand(raise_cmd); 451 m_timer.setCommand(raise_cmd);
451 m_timer.fireOnce(true); 452 m_timer.fireOnce(true);
452 453
@@ -1108,7 +1109,7 @@ void FluxboxWindow::updateBlackboxHintsFromClient(const WinClient &client) {
1108 1109
1109 if (hint->flags & ATTRIB_DECORATION) { 1110 if (hint->flags & ATTRIB_DECORATION) {
1110 m_old_decoration = static_cast<Decoration>(hint->decoration); 1111 m_old_decoration = static_cast<Decoration>(hint->decoration);
1111 setDecoration(m_old_decoration); 1112 setDecoration(m_old_decoration, false);
1112 } 1113 }
1113} 1114}
1114 1115
@@ -2225,6 +2226,10 @@ void FluxboxWindow::propertyNotifyEvent(WinClient &client, Atom atom) {
2225 } else if (atom == fbatoms->getFluxboxHintsAtom()) { 2226 } else if (atom == fbatoms->getFluxboxHintsAtom()) {
2226 client.updateBlackboxHints(); 2227 client.updateBlackboxHints();
2227 updateBlackboxHintsFromClient(client); 2228 updateBlackboxHintsFromClient(client);
2229 if (client.getBlackboxHint() != 0 &&
2230 (client.getBlackboxHint()->flags & ATTRIB_DECORATION))
2231 applyDecorations(); // update decoration
2232
2228 } 2233 }
2229 break; 2234 break;
2230 } 2235 }
@@ -2628,7 +2633,7 @@ void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) {
2628} 2633}
2629 2634
2630// TODO: functions should not be affected by decoration 2635// TODO: functions should not be affected by decoration
2631void FluxboxWindow::setDecoration(Decoration decoration) { 2636void FluxboxWindow::setDecoration(Decoration decoration, bool apply) {
2632 switch (decoration) { 2637 switch (decoration) {
2633 case DECOR_NONE: 2638 case DECOR_NONE:
2634 decorations.titlebar = decorations.border = decorations.handle = 2639 decorations.titlebar = decorations.border = decorations.handle =
@@ -2663,9 +2668,14 @@ void FluxboxWindow::setDecoration(Decoration decoration) {
2663 functions.iconify = false; 2668 functions.iconify = false;
2664 break; 2669 break;
2665 } 2670 }
2666 applyDecorations(); 2671
2672 // we might want to wait with apply decorations
2673 if (apply)
2674 applyDecorations();
2675
2676 //!! TODO: make sure this is correct
2667 // is this reconfigure necessary??? 2677 // is this reconfigure necessary???
2668 reconfigure(); 2678 // reconfigure();
2669 2679
2670} 2680}
2671 2681
@@ -2673,7 +2683,6 @@ void FluxboxWindow::setDecoration(Decoration decoration) {
2673void FluxboxWindow::applyDecorations(bool initial) { 2683void FluxboxWindow::applyDecorations(bool initial) {
2674 frame().clientArea().setBorderWidth(0); // client area bordered by other things 2684 frame().clientArea().setBorderWidth(0); // client area bordered by other things
2675 2685
2676
2677 int grav_x=0, grav_y=0; 2686 int grav_x=0, grav_y=0;
2678 // negate gravity 2687 // negate gravity
2679 frame().gravityTranslate(grav_x, grav_y, -m_client->gravity(), false); 2688 frame().gravityTranslate(grav_x, grav_y, -m_client->gravity(), false);
@@ -2712,6 +2721,7 @@ void FluxboxWindow::applyDecorations(bool initial) {
2712 frame().reconfigure(); 2721 frame().reconfigure();
2713 if (!initial && client_move) 2722 if (!initial && client_move)
2714 sendConfigureNotify(); 2723 sendConfigureNotify();
2724
2715} 2725}
2716 2726
2717void FluxboxWindow::toggleDecoration() { 2727void FluxboxWindow::toggleDecoration() {