This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project wmaker-crm.git.
The branch, next has been updated discards 7efeca43e8b63fc42bafe18f94d4e011cb3bc3b9 (commit) discards 3c5533bec25a4f94c42ffaf7f77c27db6ddb7ac7 (commit) discards 71809a2011b126a984bbbe2ed230673c62a26eeb (commit) via 443a08ea1683adc3d6ea0811f44e85762033deb2 (commit) via 791fdd1eff1dea703e1160ad474ae294e4feb55b (commit) This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this: * -- * -- B -- O -- O -- O (7efeca43e8b63fc42bafe18f94d4e011cb3bc3b9) \ N -- N -- N (443a08ea1683adc3d6ea0811f44e85762033deb2) When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B. Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://repo.or.cz/w/wmaker-crm.git/commit/443a08ea1683adc3d6ea0811f44e85762033deb2 commit 443a08ea1683adc3d6ea0811f44e85762033deb2 Author: Doug Torrance <dtorra...@monmouthcollege.edu> Date: Mon Jun 22 09:50:51 2015 -0500 wmaker: Allow configuration of window snapping detect distances. This patch introduces two new configuration values, SnapEdgeDetect and SnapCornerDetect, which users can set to change the distance from an edge or corner at which window snapping will begin. The defaults are 1 and 10, respectively. Suggested-by: Josip Deanovic <djosip+n...@linuxpages.net> diff --git a/NEWS b/NEWS index fb96dbb..d60603c 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,11 @@ Note that if "Switch workspaces while dragging windows" is selected under ~/GNUstep/Defaults/WindowMaker, then you may only snap a window to the top or bottom of the screen. +You may set the distance (in pixels) from the edge or corner of the screen at +which a window will begin snapping using "SnapEdgeDetect" and "SnapCornerDetect" +in ~/GNUstep/Defaults/WindowMaker. (The defaults are 1 pixel and 10 pixels, +respectively). + Dragging maximized windows -------------------------- diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 37e3fc0..99751ff 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -360,6 +360,8 @@ extern struct WPreferences { char no_animations; /* enable/disable animations */ char no_autowrap; /* wrap workspace when window is moved to the edge */ char window_snapping; /* enable window snapping */ + int snap_edge_detect; /* how far from edge to begin snap */ + int snap_corner_detect; /* how far from corner to begin snap */ char drag_maximized_window; /* behavior when a maximized window is dragged */ char highlight_active_app; /* show the focused app by highlighting its icon */ diff --git a/src/defaults.c b/src/defaults.c index c5a94c6..6f9edfd 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -474,6 +474,10 @@ WDefaultEntry optionList[] = { &wPreferences.no_autowrap, getBool, NULL, NULL, NULL}, {"WindowSnapping", "NO", NULL, &wPreferences.window_snapping, getBool, NULL, NULL, NULL}, + {"SnapEdgeDetect", "1", NULL, + &wPreferences.snap_edge_detect, getInt, NULL, NULL, NULL}, + {"SnapCornerDetect", "10", NULL, + &wPreferences.snap_corner_detect, getInt, NULL, NULL, NULL}, {"DragMaximizedWindow", "Move", seDragMaximizedWindow, &wPreferences.drag_maximized_window, getEnum, NULL, NULL, NULL}, {"HighlightActiveApp", "YES", NULL, diff --git a/src/moveres.c b/src/moveres.c index cded064..e8883c8 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1240,23 +1240,28 @@ static void draw_snap_frame(WWindow *wwin, int direction) static int get_snap_direction(WScreen *scr, int x, int y) { - if (x < 1) { - if (y < 1) - return SNAP_TOPLEFT; - if (y > scr->scr_height - 2) - return SNAP_BOTTOMLEFT; + int edge, corner; + + edge = wPreferences.snap_edge_detect; + corner = wPreferences.snap_corner_detect; + + if (x < corner && y < corner) + return SNAP_TOPLEFT; + if (x < corner && y >= scr->scr_height - corner) + return SNAP_BOTTOMLEFT; + if (x < edge) return SNAP_LEFT; - } - if (x > scr->scr_width - 2) { - if (y < 1) - return SNAP_TOPRIGHT; - if (y > scr->scr_height - 2) - return SNAP_BOTTOMRIGHT; + + if (x >= scr->scr_width - corner && y < corner) + return SNAP_TOPRIGHT; + if (x >= scr->scr_width - corner && y >= scr->scr_height - corner) + return SNAP_BOTTOMRIGHT; + if (x >= scr->scr_width - edge) return SNAP_RIGHT; - } - if (y < 1) + + if (y < edge) return SNAP_TOP; - if (y > scr->scr_height - 2) + if (y >= scr->scr_height - edge) return SNAP_BOTTOM; return SNAP_NONE; } http://repo.or.cz/w/wmaker-crm.git/commit/791fdd1eff1dea703e1160ad474ae294e4feb55b commit 791fdd1eff1dea703e1160ad474ae294e4feb55b Author: Doug Torrance <dtorra...@monmouthcollege.edu> Date: Sat Jun 20 22:46:25 2015 -0500 wmaker: Allow window snapping and linked workspaces simultaneously. If workspaces are linked, then windows will only snap to the top or bottom of the screen. Suggested-by: Josip Deanovic <djosip+n...@linuxpages.net> diff --git a/NEWS b/NEWS index 023ceb1..fb96dbb 100644 --- a/NEWS +++ b/NEWS @@ -12,10 +12,10 @@ screen, by dragging it to that side or corner. It is enabled by setting "WindowSnapping = YES" in ~/GNUstep/Defaults/WindowMaker or selecting "Enable window snapping" under "Expert User Preferences" in WPrefs.app. -Note that window snapping is automatically disabled if "Switch workspaces while -dragging windows" is selected under "Workspace Preferences" in WPrefs.app, or -if "DontLinkWorkspaces = NO" in ~/GNUstep/Defaults/WindowMaker, as this feature -also involves dragging a window to one side of the screen. +Note that if "Switch workspaces while dragging windows" is selected under +"Workspace Preferences" in WPrefs.app, or if "DontLinkWorkspaces = NO" in +~/GNUstep/Defaults/WindowMaker, then you may only snap a window to the top or +bottom of the screen. Dragging maximized windows diff --git a/src/moveres.c b/src/moveres.c index b271f32..cded064 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1766,11 +1766,16 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev) break; case MotionNotify: - if (IS_RESIZABLE(wwin) && wPreferences.window_snapping && wPreferences.no_autowrap) { + if (IS_RESIZABLE(wwin) && wPreferences.window_snapping) { int snap_direction; snap_direction = get_snap_direction(scr, moveData.mouseX, moveData.mouseY); + if (!wPreferences.no_autowrap && + snap_direction != SNAP_TOP && + snap_direction != SNAP_BOTTOM) + snap_direction = SNAP_NONE; + if (moveData.snap != snap_direction) { /* erase old frame */ if (moveData.snap) ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + INSTALL-WMAKER | 717 --------------------------------------------------------- autogen.sh | 3 +- 3 files changed, 3 insertions(+), 718 deletions(-) delete mode 100644 INSTALL-WMAKER repo.or.cz automatic notification. Contact project admin crma...@gmail.com if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive no reply. -- wmaker-crm.git ("The Window Maker window manager") -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.