Skip to content

Commit

Permalink
FvwmEvent: add monitor_focus event
Browse files Browse the repository at this point in the history
The monitor_focus event fires when the focused window changes to a
different monitor from the currently active one.  Enable and document
this.

Fixes #228
  • Loading branch information
ThomasAdam committed Sep 14, 2020
1 parent 707d91b commit da05d20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/FvwmEvent/FvwmEvent.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ e.g. for audio-events:
*FvwmEvent: montior_enabled beep.au
*FvwmEvent: montior_disabled beep.au
*FvwmEvent: montior_changed beep.au
*FvwmEvent: montior_focus beep.au
.sp
.fi
The window related event handlers are executed within a window
Expand All @@ -200,11 +201,10 @@ PassId is not needed.

The monitor_* events do not operate in a window context (as there
isn't one), but react to when a monitor is plugged in (enabled),
unplugged (disabled), or changed (resized/rotated, etc., which
will only be true if the monitor is already active). In all cases,
the monitor name is is passed through to the command, hence the
following example prints out the changed monitor's name, and
width/height values:
unplugged (disabled), focused (focus) or changed (resized/rotated, etc., which
will only be true if the monitor is already active). In all cases, the
monitor name is is passed through to the command, hence the following example
prints out the changed monitor's name, and width/height values:

.nf
.sp
Expand Down
1 change: 1 addition & 0 deletions modules/FvwmEvent/FvwmEvent.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static event_entry extended_message_event_table[] =
EVENT_ENTRY( "monitor_enabled", 0 | ARG_EXPECTS_CHAR),
EVENT_ENTRY( "monitor_disabled", 0 | ARG_EXPECTS_CHAR),
EVENT_ENTRY( "monitor_changed", 0 | ARG_EXPECTS_CHAR),
EVENT_ENTRY( "monitor_focus", 0 | ARG_EXPECTS_CHAR),
EVENT_ENTRY( "reply", 0), /* FvwmEvent will never receive MX_REPLY */
EVENT_ENTRY(NULL,0)
};
Expand Down

0 comments on commit da05d20

Please sign in to comment.