mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
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+news@linuxpages.net>
This commit is contained in:
committed by
Carlos R. Mafra
parent
e666cfc6a5
commit
791fdd1eff
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user