diff --git a/doc/FvwmEvent.adoc b/doc/FvwmEvent.adoc index 53d48565e..8566a40dc 100644 --- a/doc/FvwmEvent.adoc +++ b/doc/FvwmEvent.adoc @@ -170,17 +170,7 @@ 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), 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: -+ -.... - DestroyFunc MonitorExample - AddToFunc MonitorExample - + I Echo "Monitor $0 changed ($[monitor.$0.width] x $[monitor.$0.height]) - - *FvwmEvent: monitor_changed MonitorExample -.... +will only be true if the monitor is already active). + The echo event is generated whenever Fvwm receives an Echo command. + diff --git a/modules/FvwmEvent/FvwmEvent.c b/modules/FvwmEvent/FvwmEvent.c index c4234b7d3..b250a5659 100644 --- a/modules/FvwmEvent/FvwmEvent.c +++ b/modules/FvwmEvent/FvwmEvent.c @@ -95,7 +95,6 @@ static Bool audio_compat = False; static char *audio_play_dir = NULL; #define ARG_NO_WINID 1024 /* just a large number */ -#define ARG_EXPECTS_CHAR 1025 #define EVENT_ENTRY(name,action_arg) { name, action_arg, {NULL} } static event_entry message_event_table[] = @@ -139,11 +138,11 @@ static event_entry extended_message_event_table[] = EVENT_ENTRY( "enter_window", 0 ), EVENT_ENTRY( "leave_window", 0 ), EVENT_ENTRY( "property_change", 0), - 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( "echo", 0 | ARG_EXPECTS_CHAR), + EVENT_ENTRY( "monitor_enabled", 0 | ARG_NO_WINID), + EVENT_ENTRY( "monitor_disabled", 0 | ARG_NO_WINID), + EVENT_ENTRY( "monitor_changed", 0 | ARG_NO_WINID), + EVENT_ENTRY( "monitor_focus", 0 | ARG_NO_WINID), + EVENT_ENTRY( "echo", 0), EVENT_ENTRY( "reply", 0), /* FvwmEvent will never receive MX_REPLY */ EVENT_ENTRY(NULL,0) }; @@ -469,11 +468,6 @@ void execute_event(event_entry *event_table, short event, unsigned long *body) action, body[action_arg]); } } - /* monitor_* events. */ - else if (action_arg != -1 && (action_arg & ARG_EXPECTS_CHAR)) { - sprintf(buf, "%s %s %s", cmd_line, action, - (char *)(&body[3])); - } else { sprintf(buf,"%s %s", cmd_line, action);