all repos — openbox @ 0571837e50a15b61be008b55973f0ada069d4f77

openbox fork - make it a bit more like ryudo

maximizing fixes and simplification
Dana Jansens danakj@orodu.net
commit

0571837e50a15b61be008b55973f0ada069d4f77

parent

16df4538561f443d98fc7ed7bdb95ba674cf58c4

1 files changed, 8 insertions(+), 21 deletions(-)

jump to
M src/client.ccsrc/client.cc

@@ -1378,20 +1378,11 @@ if (dir == 1 && !_max_horz) return;

if (dir == 2 && !_max_vert) return; } - int g = _gravity; - const otk::Rect &a = openbox->screen(_screen)->area(); - int x = _area.x(), y = _area.y(), w = _area.width(), h = _area.height(); + int x = frame->rect().x(), y = frame->rect().y(), + w = _area.width(), h = _area.height(); if (max) { - // when maximizing, put the client where we want, NOT the frame! - _gravity = StaticGravity; - // adjust our idea of position based on StaticGravity, so we stay put - // unless asked - x = frame->rect().x(); - y = frame->rect().y(); - frame->frameGravity(x, y); - if (savearea) { long dimensions[4]; long *readdim;

@@ -1429,7 +1420,7 @@ x = a.x();

w = a.width(); } if (dir == 0 || dir == 2) { // vert - y = a.y() + frame->size().top; + y = a.y(); h = a.height() - frame->size().top - frame->size().bottom; } } else {

@@ -1461,24 +1452,20 @@ y = a.y() + a.height() / 4;

h = a.height() / 2; } } - otk::Property::erase(_window, otk::Property::atoms.openbox_premax); } if (dir == 0 || dir == 1) // horz _max_horz = max; if (dir == 0 || dir == 2) // vert _max_vert = max; + + if (!_max_horz && !_max_vert) + otk::Property::erase(_window, otk::Property::atoms.openbox_premax); + changeState(); // change the state hints on the client + frame->frameGravity(x, y); // figure out where the client should be going internal_resize(TopLeft, w, h, true, x, y); - _gravity = g; - if (max) { - // because of my little gravity trick in here, we have to set the position - // of the client to what it really is - int x = frame->rect().x(), y = frame->rect().y(); - frame->frameGravity(x, y); - _area.setPos(x, y); - } }