aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-09-16 13:11:42 (GMT)
committerrathnor <rathnor>2003-09-16 13:11:42 (GMT)
commit9859cc53d0489494536221c3b95078dddc583e61 (patch)
treec0bb9fb08231f5f5e63937ac233c526c2fb61fdd /src/Window.cc
parent2746ab43aa20f53052ffb100d19119dc5388f260 (diff)
downloadfluxbox_pavel-9859cc53d0489494536221c3b95078dddc583e61.zip
fluxbox_pavel-9859cc53d0489494536221c3b95078dddc583e61.tar.bz2
more gravity tweaks
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 0ab1f00..38fe3f5 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.230 2003/09/15 20:27:06 fluxgen Exp $ 25// $Id: Window.cc,v 1.231 2003/09/16 13:11:42 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -2599,6 +2599,10 @@ void FluxboxWindow::setDecoration(Decoration decoration) {
2599void FluxboxWindow::applyDecorations(bool initial) { 2599void FluxboxWindow::applyDecorations(bool initial) {
2600 frame().clientArea().setBorderWidth(0); // client area bordered by other things 2600 frame().clientArea().setBorderWidth(0); // client area bordered by other things
2601 2601
2602 int grav_x=0, grav_y=0;
2603 // negate gravity
2604 frame().gravityTranslate(grav_x, grav_y, -m_client->gravity(), false);
2605
2602 unsigned int border_width = 0; 2606 unsigned int border_width = 0;
2603 if (decorations.border) 2607 if (decorations.border)
2604 border_width = frame().theme().border().width(); 2608 border_width = frame().theme().border().width();
@@ -2617,6 +2621,13 @@ void FluxboxWindow::applyDecorations(bool initial) {
2617 } else 2621 } else
2618 frame().hideHandle(); 2622 frame().hideHandle();
2619 2623
2624 // apply gravity once more
2625 frame().gravityTranslate(grav_x, grav_y, m_client->gravity(), false);
2626
2627 // if the location changes, shift it
2628 if (grav_x != 0 || grav_y != 0)
2629 frame().move(grav_x + frame().x(), grav_y + frame().y());
2630
2620 frame().reconfigure(); 2631 frame().reconfigure();
2621} 2632}
2622 2633