+
Skip to content

Remove single screen support, -s. #977

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 2 commits into from
Mar 29, 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
1 change: 0 additions & 1 deletion dev-docs/COMMANDS
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ The recognized commands for fvwm 2.6.6 (from cvs) as of 09-Sep-2014:
PrintInfo - Print information about the state of fvwm
PropertyChange - Internal, used for inter-module communication
Quit - Exit fvwm
QuitScreen - Stop managing the specified screen
QuitSession - Ask session manager to shut down itself and fvwm
Raise - Raise a window in a layer
RaiseLower - Alternately raise or lower a window in a layer
Expand Down
3 changes: 0 additions & 3 deletions dev-docs/PARSING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1252,9 +1252,6 @@ PRINTINFOKEYWORD =/ "Infostore"
CMD_QUIT = "Quit"
```
```
CMD_QUITSCREEN = "QuitScreen"
```
```
CMD_READ = "Read" FILENAME ["quiet"]
```
```
Expand Down
86 changes: 20 additions & 66 deletions doc/fvwm3_manpage_source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[*-d* _displayname_]
[*-f* _config-file_]
[*-o* _logfile_]
[*-s* [_screen_num_]]
[*-v*]
[other options]

Expand Down Expand Up @@ -91,14 +90,6 @@ the other wm is ICCCM2 2.0 compliant.
This option is used when fvwm is started by a session manager. Should
not be used by a user.

*-s* | *--single-screen* [_screen_num_]::

On a multi-screen display, run fvwm only on the screen named in the
_$DISPLAY_ environment variable or provided through the *-d* option. The
optional argument _screen_num_ should be positive or null and override
the screen number. Normally, fvwm attempts to start up on all screens of
a multi-screen display.

*-V* | *--version*::

Prints the version of fvwm to _stderr_. Also prints an information about
Expand Down Expand Up @@ -395,27 +386,17 @@ or
XTerm*Page: 3 2 1
....

== USE ON MULTI-SCREEN DISPLAYS

If the *-s* command line argument is not given, fvwm automatically
starts up on every screen on the specified display. After fvwm starts
each screen is treated independently. Restarts of fvwm need to be
performed separately on each screen. The use of

....
EdgeScroll 0 0
....

is strongly recommended for multi-screen displays. You may need to quit
on each screen to quit from the X session completely. This is not to be
confused with RandR support.
== RANDR MULTI-SCREEN SUPPORT

== RANDR SUPPORT
Fvwm best supports multiple screens using the RandR X11 protocol. If
fvwm isn't built with the RandR protocol then the multi screen support
is very limited, and it is suggested to rebuild with RandR. It is also
recommended to use 'EdgeScroll 0 0' on multi-screen displays to avoid
changing pages when moving the mouse between screens.

Fvwm supports the RandR X11 protocol. If Fvwm has been compiled with
RandR support then it tracks the outputs (displays) which it finds.
These outputs are stored by name, which can be found by running using
the xrand(1) command.
If Fvwm has been compiled with RandR support then it tracks the outputs
(displays) which it finds. These outputs are stored by name, which can be
found by running using the xrandr(1) command.

When Fvwm detects monitors, it adds them to a tree with a defined order, and
each monitor is assigned a number. That order is top-down, left-to-right, so
Expand Down Expand Up @@ -455,7 +436,7 @@ AddToFunc RandRFunc
Because Fvwm has the capability to track outputs, Fvwm can be told how
to handle those. This is controlled via the *DesktopConfiguration*
command. By default, Fvwm treats all outputs it finds as one large
screen, although Fvwm can be told to treat screens indepedantly of each
screen, although Fvwm can be told to treat screens independently of each
other.

== INITIALIZATION
Expand Down Expand Up @@ -1261,25 +1242,6 @@ issuing *Style* commands or by using various modules), these changes are
lost after saving and restarting the session. To become permanent, such
changes have to be added to the configuration file.

Note further that the current implementation has the following anomaly
when used on a multi-screen display: Starting fvwm for the first time,
fvwm manages all screens by forking a copy of itself for each screen.
Every copy knows its parent and issuing a *Quit* command to any instance
of fvwm kills the master and thus all copies of fvwm. When you save and
restart the session, the session manager brings up a copy of fvwm on
each screen, but this time they are started as individual instances
managing one screen only. Thus a *Quit* kills only the copy it was sent
to. This is probably not a very serious problem, since with session
management, you are supposed to quit a session through the session
manager anyway. If it is really needed,

....
Exec exec killall fvwm
....

still kills all copies of fvwm. Your system must have the *killall*
command though.

== BOOLEAN ARGUMENTS

A number of commands take one or several boolean arguments. These take a
Expand Down Expand Up @@ -2453,7 +2415,6 @@ AddToMenu Quit-Verify
+ "Really Quit Fvwm?" Title
+ "Yes, Really Quit" Quit
+ "Restart Fvwm" Restart
+ "Restart Fvwm 1.xx" Restart fvwm1 -s
+ "" Nop
+ "No, Don't Quit" Nop

Expand Down Expand Up @@ -4418,11 +4379,11 @@ AddToFunc SelectWindow
reversed. This command works also with windows that are not managed by
fvwm. In this case fvwm does not bring the window onto the screen if
it is not visible. For example it is possible to warp the pointer to
the center of the root window on screen 1:
the center of the root window:
+

....
WindowId root 1 WarpToWindow 50 50
WindowId root WarpToWindow 50 50
....


Expand Down Expand Up @@ -8366,16 +8327,14 @@ This command implies the conditions _CirculateHit_,
_CirculateHitIcon_ and _CirculateHitShaded_. They can be turned off
by specifying "!CirculateHit" etc. explicitly.
+
*WindowId* [_id_] [(_conditions_)] | [root [_screen_]] _command_:::
*WindowId* [_id_] [(_conditions_)] | [root] _command_:::
The *WindowId* command looks for a specific window _id_ and runs the
specified _command_ on it. The second form of syntax retrieves the
window id of the root window of the given _screen_. If no _screen_
is given, the current screen is assumed. The window indicated by
_id_ may belong to a window not managed by fvwm or even a window on
a different screen. Although most commands can not operate on such
windows, there are some exceptions, for example the *WarpToWindow*
command. Returns -1 if no window with the given id exists. See
*Conditions* section for a list of conditions.
window id of the root window. The window indicated by
_id_ may belong to a window not managed by fvwm. Although most
commands can not operate on such windows, there are some exceptions,
for example the *WarpToWindow* command. Returns -1 if no window with
the given id exists. See *Conditions* section for a list of conditions.
+
This command implies the conditions _CirculateHit_,
_CirculateHitIcon_ and _CirculateHitShaded_. They can be turned off
Expand Down Expand Up @@ -8832,10 +8791,6 @@ sequence
*Quit*::
Exits fvwm, generally causing X to exit too.

*QuitScreen*::
Causes fvwm to stop managing the screen on which the command was
issued.

*Restart* [_window_manager_ [_params_]]::
Causes fvwm to restart itself if _window_manager_ is left blank, or to
switch to an alternate window manager (or other fvwm version) if
Expand All @@ -8851,9 +8806,8 @@ variables _$VAR_ or _$\{VAR}_. Here are several examples:

....
Key F1 R N Restart
Key F1 R N Restart fvwm -s
Key F1 R N Restart fvwm1 -s -f .fvwmrc
Key F1 R N Restart xterm -n '"X console"' -T \"X\ console\" -e fvwm -s
Key F1 R N Restart fvwm1 -f .fvwmrc
Key F1 R N Restart xterm -n '"X console"' -T \"X\ console\" -e fvwm
....

+
Expand Down
1 change: 0 additions & 1 deletion fvwm/add_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ static void adjust_fvwm_internal_windows(FvwmWindow *fw)
{
Scr.Hilite = NULL;
}
update_last_screen_focus_window(fw);
restore_focus_after_unmap(fw, False);
frame_destroyed_frame(FW_W(fw));
if (fw == Scr.StolenFocusFvwmWin)
Expand Down
39 changes: 7 additions & 32 deletions fvwm/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,12 +2250,8 @@ void CMD_CursorMove(F_CMD_ARGS)
fvwm_debug(__func__, "CursorMove needs 2 arguments");
return;
}
if (FQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
&x, &y, &JunkX, &JunkY, &JunkMask) == False)
{
/* pointer is on a different screen */
return;
}
FQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
&x, &y, &JunkX, &JunkY, &JunkMask);

m = monitor_get_current();

Expand Down Expand Up @@ -2708,17 +2704,6 @@ void CMD_Wait(F_CMD_ARGS)
}

void CMD_Quit(F_CMD_ARGS)
{
if (master_pid != getpid())
{
kill(master_pid, SIGTERM);
}
Done(0,NULL);

return;
}

void CMD_QuitScreen(F_CMD_ARGS)
{
Done(0,NULL);

Expand Down Expand Up @@ -3819,14 +3804,9 @@ static void _fake_event(F_CMD_ARGS, FakeEventType type)
depth++)
{
w = child_w;
if (FQueryPointer(
FQueryPointer(
dpy, w, &root, &child_w,
&rx, &ry, &x, &y,
&JunkMask) == False)
{
/* pointer is on a different
* screen - that's okay here */
}
&rx, &ry, &x, &y, &JunkMask);
}

if (type == FakeMouseEvent)
Expand Down Expand Up @@ -3911,14 +3891,9 @@ static void _fake_event(F_CMD_ARGS, FakeEventType type)
}

usleep(1000 * val);
if (FQueryPointer(
dpy, Scr.Root, &root, &JunkRoot,
&JunkX, &JunkY, &JunkX, &JunkY,
&mask) == False)
{
/* pointer is on a different screen -
* that's okay here */
}
FQueryPointer(
dpy, Scr.Root, &root, &JunkRoot,
&JunkX, &JunkY, &JunkX, &JunkY, &mask);
break;
case 6:
case 7:
Expand Down
2 changes: 0 additions & 2 deletions fvwm/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ enum
F_PRINTINFO,
F_QUIT,
F_QUIT_SESSION,
F_QUIT_SCREEN,
F_READ,
F_REFRESH,
F_RESTART,
Expand Down Expand Up @@ -315,7 +314,6 @@ void CMD_Prev(F_CMD_ARGS);
void CMD_PrintInfo(F_CMD_ARGS);
void CMD_PropertyChange(F_CMD_ARGS);
void CMD_Quit(F_CMD_ARGS);
void CMD_QuitScreen(F_CMD_ARGS);
void CMD_QuitSession(F_CMD_ARGS);
void CMD_Raise(F_CMD_ARGS);
void CMD_RaiseLower(F_CMD_ARGS);
Expand Down
38 changes: 6 additions & 32 deletions fvwm/conditional.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,14 +1272,9 @@ static void direction_cmd(F_CMD_ARGS, Bool is_scan)
}
else
{
if (FQueryPointer(
FQueryPointer(
dpy, Scr.Root, &JunkRoot, &JunkChild, &my_g.x,
&my_g.y, &JunkX, &JunkY, &JunkMask) == False)
{
/* pointer is on a different screen */
my_g.x = 0;
my_g.y = 0;
}
&my_g.y, &JunkX, &JunkY, &JunkMask);
my_g.width = 1;
my_g.height = 1;
my_cx = my_g.x;
Expand Down Expand Up @@ -1703,7 +1698,6 @@ void CMD_WindowId(F_CMD_ARGS)
{
FvwmWindow *t;
char *token;
char *naction;
unsigned long win;
Bool use_condition = False;
Bool use_screenroot = False;
Expand All @@ -1715,24 +1709,9 @@ void CMD_WindowId(F_CMD_ARGS)

if (token && StrEquals(token, "root"))
{
int screen = Scr.screen;

free(token);
token = PeekToken(action, &naction);
if (!token || GetIntegerArguments(token, NULL, &screen, 1) != 1)
{
screen = Scr.screen;
}
else
{
action = naction;
}
use_screenroot = True;
if (screen < 0 || screen >= Scr.NumberOfScreens)
{
screen = 0;
}
win = XRootWindow(dpy, screen);
win = XRootWindow(dpy, Scr.screen);
if (win == None)
{
if (cond_rc != NULL)
Expand Down Expand Up @@ -2265,15 +2244,10 @@ void CMD_Test(F_CMD_ARGS)

if (!error)
{
if (FQueryPointer(
FQueryPointer(
dpy, Scr.Root, &JunkRoot, &win,
&JunkX, &JunkY, &x, &y, &JunkMask)
== False)
{
/* pointer is on a different screen */
match = 0;
}
else if (is_pan_frame(win))
&JunkX, &JunkY, &x, &y, &JunkMask);
if (is_pan_frame(win))
{
if (dir == DIR_NONE ||
(dir == DIR_N &&
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载