Bugs of GotoDeskAndPage?

I am using debian sid and fvwm3 1.0.6a, with only one monitor.
Tested with the default config file, in which DesktopConfiguration is set to global.

The behavior of GotoDeskAndPage seems quite odd.

  1. It always emits two new_desk events with the same id.

  2. GotoDeskAndPage prev only works after GotoDesk command and can only work once.
    Input following sequential commands in FvwmConsole:
    a)
    GotoDeskAndPage 1 0 0 to switch from desk 0 to desk 1
    GotoDeskAndPage prev will do nothing at all
    b)
    GotoDesk 0 1 to switch from desk 0 to desk 1
    GotoDeskAndPage prev can switch back to desk 0
    GotoDeskAndPage prev will do nothing at all when invoked again

Can anyone else reproduce these behaviors?

Just checked the CMD_GotoDeskAndPage function in fvwm/virtual.c, it seems the assignment of virtual_scr.prev_desk_and_page_desk to virtual_scr.CurrentDesk after CurrentDesk being assigned the new desk id in goto_desk ends up with a wrong prev_desk_and_page_desk value.

I’ll try to submit a pr for this later when I am free.

Hi @shang

Yes, thanks for that. Looks to me like a very easy fix.

Let me know how you get on.

Kindly,
Thomas

Hi @thomasadam

I’ve submitted a PR on github, also fix the duplicate new_desk events issue, please take a review, thanks.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.