Skip to content
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

Add Maximize keepgrowing flag. #1085

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions doc/fvwm3_manpage_source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4473,16 +4473,18 @@ first, then horizontally to find space. Instead of the horizontal
"grow" argument, "_growleft_" or "_growright_" can be used
respectively "_growup_" and "_growdown_". The optional _flags_
argument is a space separated list containing the following key words:
_fullscreen_, _ewmhiwa_, _growonwindowlayer_, _growonlayers_ and
_screen_. _fullscreen_ causes the window to become fullscreened if the
_fullscreen_, _ewmhiwa_, _growonwindowlayer_, _growonlayers_, _keepgrowing_,
and _screen_. _fullscreen_ causes the window to become fullscreened if the
appropriate EWMH hint is set. _ewmhiwa_ causes fvwm to ignore the EWMH
working area. _growonwindowlayer_ causes the various grow methods to
ignore windows with a layer other than the current layer of the window
which is maximized. The _growonlayers_ option must have two integer
arguments. The first one is the minimum layer and the second one the
maximum layer to use. Windows that are outside of this range of layers
are ignored by the grow methods. A negative value as the first or
second argument means to assume no minimum or maximum layer. _screen_
second argument means to assume no minimum or maximum layer. _keepgrowing_
will allow the window to keep growing beyond any window it is currently
touching until it grows into the next closest window boundary. _screen_
must have an argument which specifies the screen on which to operate.
+
Here are some examples. The following adds a title-bar button to
Expand Down
10 changes: 8 additions & 2 deletions fvwm/move_resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -5157,6 +5157,7 @@ void CMD_Maximize(F_CMD_ARGS)
Bool is_screen_given = False;
Bool ignore_working_area = False;
Bool do_fullscreen = False;
bool consider_touching = true;
int layers[2] = { -1, -1 };
Bool global_flag_parsed = False;
rectangle scr;
Expand Down Expand Up @@ -5215,6 +5216,11 @@ void CMD_Maximize(F_CMD_ARGS)
layers[1] = -1;
}
}
else if (StrEquals(token, "keepgrowing"))
{
consider_touching = false;
action = taction;
}
else if (StrEquals(token, "fullscreen"))
{
do_fullscreen = True;
Expand Down Expand Up @@ -5433,7 +5439,7 @@ void CMD_Maximize(F_CMD_ARGS)
page.y + scr.y + scr.height - bound.y;
}
grow_to_closest_type(fw, &new_g, bound, layers,
SNAP_NONE, true);
SNAP_NONE, consider_touching);
}
else if (val2 > 0)
{
Expand All @@ -5454,7 +5460,7 @@ void CMD_Maximize(F_CMD_ARGS)
page.x + scr.x + scr.width - bound.x;
}
grow_to_closest_type(fw, &new_g, bound, layers,
SNAP_NONE, true);
SNAP_NONE, consider_touching);
}
else if (val1 >0)
{
Expand Down
Loading