diff options
author | fluxgen <fluxgen> | 2004-03-28 17:48:20 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-03-28 17:48:20 (GMT) |
commit | 2fc19817255a8dd41dea22361575f01c386274cc (patch) | |
tree | 9e1138990da9b30345febae8dc6c7faab88d8fe9 /src | |
parent | 27e83c1b06231bd8f5b4c4a7c6e56a3931a80a62 (diff) | |
download | fluxbox_lack-2fc19817255a8dd41dea22361575f01c386274cc.zip fluxbox_lack-2fc19817255a8dd41dea22361575f01c386274cc.tar.bz2 |
fixed window snapping with screen
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/Window.cc b/src/Window.cc index 5a93385..ac719c0 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.271 2004/03/21 09:00:25 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.272 2004/03/28 17:48:20 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2951,15 +2951,23 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
2951 | ///////////////////////////////////// | 2951 | ///////////////////////////////////// |
2952 | // begin by checking the screen (or Xinerama head) edges | 2952 | // begin by checking the screen (or Xinerama head) edges |
2953 | 2953 | ||
2954 | // head "0" == whole screen width + height, which we skip since the | 2954 | if (screen().numHeads() > 0) { |
2955 | // sum of all the heads covers those edges | 2955 | // head "0" == whole screen width + height, which we skip since the |
2956 | for (int h = 1; h <= screen().numHeads(); h++) { | 2956 | // sum of all the heads covers those edges |
2957 | for (int h = 1; h <= screen().numHeads(); h++) { | ||
2958 | snapToWindow(dx, dy, left, right, top, bottom, | ||
2959 | screen().maxLeft(h), | ||
2960 | screen().maxRight(h), | ||
2961 | screen().maxTop(h), | ||
2962 | screen().maxBottom(h)); | ||
2963 | } | ||
2964 | } else { | ||
2957 | snapToWindow(dx, dy, left, right, top, bottom, | 2965 | snapToWindow(dx, dy, left, right, top, bottom, |
2958 | screen().maxLeft(h), | 2966 | screen().maxLeft(0), |
2959 | screen().maxRight(h), | 2967 | screen().maxRight(0), |
2960 | screen().maxTop(h), | 2968 | screen().maxTop(0), |
2961 | screen().maxBottom(h)); | 2969 | screen().maxBottom(0)); |
2962 | } | 2970 | } |
2963 | ///////////////////////////////////// | 2971 | ///////////////////////////////////// |
2964 | // now check window edges | 2972 | // now check window edges |
2965 | 2973 | ||