+
Skip to content

SnapAttraction: honor all tokens mentioned in the manpage #869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions fvwm/move_resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -2469,10 +2469,20 @@ static void DoSnapAttract(FvwmWindow *fw, size_rect sz, position *p)
if (get_visible_icon_title_geometry(fw, &g))
self.height += g.height;

bool is_snap_screen = (fw->snap_attraction.mode & SNAP_SCREEN) ?
true : false;
bool is_snap_same = (fw->snap_attraction.mode & SNAP_SAME) ?
true : false;
bool is_iconified_and_snap_icons = IS_ICONIFIED(fw) &&
(fw->snap_attraction.mode & SNAP_ICONS) ? true : false;
bool is_not_iconified_and_snap_windows = !IS_ICONIFIED(fw) &&
(fw->snap_attraction.mode & SNAP_WINDOWS) ? true : false;
int icon_mask = IS_ICONIFIED(fw) ? SNAP_SCREEN_ICONS :
SNAP_SCREEN_WINDOWS;
bool snap_mon = (fw->snap_attraction.mode & SNAP_SCREEN_ALL ||
fw->snap_attraction.mode & (SNAP_SCREEN & icon_mask)) ?
bool snap_mon = (is_snap_screen && ( is_snap_same ||
is_iconified_and_snap_icons ||
is_not_iconified_and_snap_windows)) ||
fw->snap_attraction.mode & (SNAP_SCREEN_ALL | icon_mask) ?
true : false;
bool snap_win = (fw->snap_attraction.mode &
(SNAP_ICONS | SNAP_WINDOWS | SNAP_SAME)) ? true : false;
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载