Snapping to screen edges doesn't work
Closed this issue · 10 comments
@gromnitsky -- please retest using latest code changes, but this is all working fine for me now.
Feel free to reopen if not.
I have tested this, and it appears to be an issue with the parsing of the options.
Style * SnapAttraction 15 Windows ScreenAll
That works as expected, but using Screen
or ScreenWindows
doesn't. So it appears that the snapping capability is there, but the parser isn't correctly configuring it in any situation except ScreenAll
.
Interesting. Does the following help at all?
diff --git a/fvwm/move_resize.c b/fvwm/move_resize.c
index 87fc162ec..af384fad1 100644
--- a/fvwm/move_resize.c
+++ b/fvwm/move_resize.c
@@ -2426,7 +2426,8 @@ static void DoSnapAttract(FvwmWindow *fw, size_rect sz, position *p)
int icon_mask = IS_ICONIFIED(fw) ? SNAP_SCREEN_ICONS :
SNAP_SCREEN_WINDOWS;
- bool snap_mon = (fw->snap_attraction.mode & SNAP_SCREEN_ALL ||
+ bool snap_mon = (fw->snap_attraction.mode &
+ (SNAP_SCREEN | SNAP_SCREEN_ALL) ||
fw->snap_attraction.mode & (SNAP_SCREEN & icon_mask)) ?
true : false;
bool snap_win = (fw->snap_attraction.mode &
@ThomasAdam that gets closer to fixing it for me. Now the Style command given in this issue works, Style * SnapAttraction 15 Windows Screen
, but Style * SnapAttraction 15 Windows ScreenWindows
doesn't work. Might need to add SNAP_SCREEN_WINDOWS
to that as well.
Please try the ta/fix-652
branch. I think that's got most of this fixed now. Feedback appreciated.
the ta/fix-652 branch works for me. thanks!
Interesting, with fvwm3, the SnapAttraction has becomes unusable for me with a beamer connected and having a different resolution than the main screen. Windows are getting snapped in the smallest of the two screens, even though the bigger is defined as primary.
Edit: Found a fix by decreasing EdgeResistance
The difference between fvwm3 and fvwm2 is that snap attraction can now correctly snap to the monitor edges and not just the edges of all the monitors combined together. To me this is a big improvement because it allows snapping on the shared edge between monitors and on monitor edges if monitors are not the same size.
If you don't like snapping to the screen edges, configure the SnapAttraction style for the windows you want to disable this for appropriately. This bug report is about the fact that the configuration didn't match the manual page (it didn't deal with all the cases properly).
If your fix is EdgeResistance
this is something different, as that is for scrolling between pages, not snapping to edges of screens.
Yes, I kind of understood it is a new feature, even though the concept of "improvement" is quite subjective (I kind of get that it is better with adjacent screens, but, in my case, with screen within screen it needs tuning).
Anyway, EdgeResistance is fixing the resistance to the edges of the screen right now (tested with version 1.0.5). That is good for me, but might be a bug then.