+
Skip to content
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
7 changes: 7 additions & 0 deletions doc/FvwmRearrange.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ stretched or resized.
When rearranging windows, make the calculation ignore the working area,
such as _EwmhBaseStruts_; by default, FvwmRearrange will honour the
working area. This option may place windows outside of the current monitor.
-win_cmd _COMMAND_::
Runs the fvwm _COMMAND_ in the context of every window that is rearranged.
This can be used to set the state of all affected windows with the _COMMAND_
"State n" so they can be matched using the "State n" conditional. The
_COMMAND_ is sent after the window is moved/resized, so any change in
window's size, adding removing title bars, etc, will not be used in
computing the new position/size of the window.

=== RESIZING OPTIONS

Expand Down
8 changes: 8 additions & 0 deletions modules/FvwmRearrange/FvwmRearrange.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ fd_set_size_t fd_width;
window_list wins = NULL, wins_tail = NULL;
int wins_count = 0;
FILE *console;
char *win_cmd = NULL;

static void Loop(int *);
static void process_message(unsigned long, unsigned long *);
Expand Down Expand Up @@ -142,6 +143,7 @@ void
free_resources(void)
{
free_window_list(wins);
free(win_cmd);

if (console != stderr)
fclose(console);
Expand Down Expand Up @@ -453,6 +455,8 @@ move_resize_raise_window(window_item *wi, int x, int y, int w, int h)
SendText(fd, msg, wi->frame);
}

if (win_cmd)
SendText(fd, win_cmd, wi->frame);
if (raise_window)
SendText(fd, "Raise", wi->frame);
}
Expand Down Expand Up @@ -740,6 +744,10 @@ parse_args(int argc, char *argv[], int argi)
do_animate = 1;
} else if (StrEquals(argv[argi], "-ewmhiwa")) {
do_ewmhiwa = 1;
} else if (StrEquals(argv[argi], "-win_cmd")
&& ((argi + 1) < argc)) {
free(win_cmd);
win_cmd = fxstrdup(argv[++argi]);

/* Resizing options */
} else if (StrEquals(argv[argi], "-noresize")) {
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载