all repos — fluxbox @ 2fc19817255a8dd41dea22361575f01c386274cc

custom fork of the fluxbox windowmanager

fixed window snapping with screen
fluxgen fluxgen
commit

2fc19817255a8dd41dea22361575f01c386274cc

parent

27e83c1b06231bd8f5b4c4a7c6e56a3931a80a62

1 files changed, 17 insertions(+), 9 deletions(-)

jump to
M src/Window.ccsrc/Window.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: Window.cc,v 1.271 2004/03/21 09:00:25 rathnor Exp $ +// $Id: Window.cc,v 1.272 2004/03/28 17:48:20 fluxgen Exp $ #include "Window.hh"

@@ -2951,15 +2951,23 @@

///////////////////////////////////// // begin by checking the screen (or Xinerama head) edges - // head "0" == whole screen width + height, which we skip since the - // sum of all the heads covers those edges - for (int h = 1; h <= screen().numHeads(); h++) { + if (screen().numHeads() > 0) { + // head "0" == whole screen width + height, which we skip since the + // sum of all the heads covers those edges + for (int h = 1; h <= screen().numHeads(); h++) { + snapToWindow(dx, dy, left, right, top, bottom, + screen().maxLeft(h), + screen().maxRight(h), + screen().maxTop(h), + screen().maxBottom(h)); + } + } else { snapToWindow(dx, dy, left, right, top, bottom, - screen().maxLeft(h), - screen().maxRight(h), - screen().maxTop(h), - screen().maxBottom(h)); - } + screen().maxLeft(0), + screen().maxRight(0), + screen().maxTop(0), + screen().maxBottom(0)); + } ///////////////////////////////////// // now check window edges