all repos — fluxbox @ ca9f4848835e22a4bd19ac78c6b8ace84e393ca5

custom fork of the fluxbox windowmanager

really fix placeWindow
rathnor rathnor
commit

ca9f4848835e22a4bd19ac78c6b8ace84e393ca5

parent

1d58e3afb289dd33ddb1b22533f4d717339ec216

2 files changed, 18 insertions(+), 12 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.9: +*04/03/16: + * Fix the fix, and a bit more for placeWindow (Simon) + Workspace.cc *04/03/15: * bug in placeWindow caused spinning with screens higher than width e.g. vertical xinerama (Simon)
M src/Workspace.ccsrc/Workspace.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.93 2004/03/15 03:48:47 rathnor Exp $ +// $Id: Workspace.cc,v 1.94 2004/03/15 23:36:13 rathnor Exp $ #include "Workspace.hh"

@@ -489,22 +489,25 @@ else

test_y = head_bot - win_h; while (!placed && - (top_bot ? test_y + win_h < head_bot - : test_y > head_top)) { + (top_bot ? test_y + win_h <= head_bot + : test_y >= head_top)) { if (left_right) test_x = head_left; else test_x = head_right - win_w; + // The trick here is that we set it to the furthest away one, + // then the code brings it back down to the safest one that + // we can go to (i.e. the next untested area) if (top_bot) - next_y = head_top; + next_y = head_bot; // will be shrunk else - next_y = head_bot - win_h; // will be shrunk + next_y = head_top-1; while (!placed && - (left_right ? test_x + win_w < head_right - : test_x > head_left)) { + (left_right ? test_x + win_w <= head_right + : test_x >= head_left)) { placed = true;

@@ -578,13 +581,13 @@ else

test_x = head_right - win_w; while (!placed && - (left_right ? test_x + win_w < head_right - : test_x > head_left)) { + (left_right ? test_x + win_w <= head_right + : test_x >= head_left)) { if (left_right) next_x = head_right; // it will get shrunk else - next_x = head_left; + next_x = head_left-1; if (top_bot) test_y = head_top;

@@ -592,8 +595,8 @@ else

test_y = head_bot - win_h; while (!placed && - (top_bot ? test_y + win_h < head_bot - : test_y > head_top)) { + (top_bot ? test_y + win_h <= head_bot + : test_y >= head_top)) { placed = True; next_y = test_y + change_y;