diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-08-02 20:37:33 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-08-02 20:37:33 +0000 |
| commit | 22869af55c6eba6df528e21b9edc5f905aad2690 (patch) | |
| tree | 7b54e6c52bd8167719d150ec4449849c061fe150 | |
| parent | 347baf0c0b7163fcd510a6378546f550345ecb9f (diff) | |
snap to windows/edges an optional offset away
| -rw-r--r-- | src/Window.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Window.cc b/src/Window.cc index aefb81f7..e3ecd944 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3124,16 +3124,16 @@ void BlackboxWindow::doWindowSnapping(int &dx, int &dy) { const int snap_to_windows = screen->getWindowToWindowSnap(); const int snap_to_edges = screen->getWindowToEdgeSnap(); // the amount of space away from the edge to provide resistance/snap -// const int snap_offset = screen->getSnapThreshold(); + const int snap_offset = 0; // find the geomeetery where the moving window currently is const Rect &moving = screen->doOpaqueMove() ? frame.rect : frame.changing; // window corners - const int wleft = dx, - wright = dx + frame.rect.width() - 1, - wtop = dy, - wbottom = dy + frame.rect.height() - 1; + const int wleft = dx - snap_offset, + wright = dx + frame.rect.width() - 1 + snap_offset, + wtop = dy - snap_offset, + wbottom = dy + frame.rect.height() - 1 + snap_offset; if (snap_to_windows) { RectList rectlist; |
