Subject: Schedule delay bug

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 16 Sep 2002 13:57:27 +0000

In FvwmConsole type 2 Schedule commands, like:

  Schedule 20000 5001 Beep
  Schedule   100 5002 Iconify

This is currently effectivelly equivalent to:

  Schedule   100 5002 Iconify
  Schedule   100 5001 Beep

My orgiginal problem was different (Schedule delay in StartFunction is not
respected, but it is respected without colorsets) and it took me some time
to figure out that it is not different, because there is a hidden command
in colorsets.c:

  CMD_Schedule(NULL, exc, "3000 CleanupColorsets");

BTW, commands called this way are not included in the command log, so from
the log it can't be guessed there is one more Schedule. But at least
the command log shows "CleanupColorsets" that comes from nowhere.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 16 Sep 2002 18:10:24 +0200

>   Schedule   100 5002 Iconify

Fixed.  I used the address of the excution time instead of the
time itself to figure out if a command has to be executed.

> BTW, commands called this way are not included in the command log,

Never heard of a command log.  Is that something new?

Hm, I see.  It prints just the commands run in
__execute_function().  There are dozens of other places where
commands are run directly or indirectly.

> so from

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 16 Sep 2002 18:24:10 +0200

> the command log shows "CleanupColorsets" that comes from nowhere.

I've added the execution_context_t.type to the output.  It has a
few values that indicate the source of the executed action:

  typedef enum
  {
        EXCT_NULL = 0,  /* "spontaneous" execution */
        EXCT_EVENT,     /* triggered by event */
        EXCT_MODULE,    /* triggered by module input */
        EXCT_MENULOOP,  /* unused at the moment */
        EXCT_PAGING,    /* unused at the moment */
        EXCT_SCHEDULE   /* triggered by schedule queue */
  } exec_context_type_t;

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 16 Sep 2002 16:58:19 +0000

On 16 Sep 2002 18:10:24 +0200, Dominik Vogt wrote:
> Fixed.

It is better now. But I don't know whether timing is fixed. Do the
following: open xdaliclock and FvwmConsole. Type the first command and
repeat it in 5 seconds.

  Schedule 10000 Beep

Immediatelly after the first and the second command move the mouse to
another window. You may get different results. Sometimes it's ok. But the
chance is you hear the first Beep much earlier than in 10 seconds.
Sometimes I don't hear the second Beep (they probably unite to one).

> Never heard of a command log.  Is that something new?

--enable-command-log was added in 2.3.32.

I think I prefer the format "%c: %s" to your "type %d, cmd '%s'", because
the second does not make the log more readable/parsable, just increases
it. The latters may be 'E', 'M' (module), 'L' (menuloop), 'P', 'S'.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 16 Sep 2002 23:03:52 +0200

> Sometimes I don't hear the second Beep (they probably unite to one).

That's why the man page reads "The command is executed after
*about* delay_ms milliseconds".  For performance reasons, the X
server time is not queried each time a command is scheduled.
Therefore, a command may be executed *much* earlier than the
delay specified if no event came in from the X server for a while.
I had to add this performance hack because it was really easy to
slow down fvwm dramatically before.

> it. The latters may be 'E', 'M' (module), 'L' (menuloop), 'P', 'S'.

No problem:

 - = No context
 E = Event
 M = Module
 m = menu
 P = paging
 S = Sceduler

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]