fixed window snapping with screen

This commit is contained in:
fluxgen 2004-03-28 17:48:20 +00:00
parent 27e83c1b06
commit 2fc1981725

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // 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" #include "Window.hh"
@ -2951,6 +2951,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
///////////////////////////////////// /////////////////////////////////////
// begin by checking the screen (or Xinerama head) edges // begin by checking the screen (or Xinerama head) edges
if (screen().numHeads() > 0) {
// head "0" == whole screen width + height, which we skip since the // head "0" == whole screen width + height, which we skip since the
// sum of all the heads covers those edges // sum of all the heads covers those edges
for (int h = 1; h <= screen().numHeads(); h++) { for (int h = 1; h <= screen().numHeads(); h++) {
@ -2960,6 +2961,13 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
screen().maxTop(h), screen().maxTop(h),
screen().maxBottom(h)); screen().maxBottom(h));
} }
} else {
snapToWindow(dx, dy, left, right, top, bottom,
screen().maxLeft(0),
screen().maxRight(0),
screen().maxTop(0),
screen().maxBottom(0));
}
///////////////////////////////////// /////////////////////////////////////
// now check window edges // now check window edges