Skip to content
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

FvwmPager doesn't update current desk durning initialization #1122

Closed
rasatpc opened this issue Nov 28, 2024 · 13 comments · Fixed by #1129
Closed

FvwmPager doesn't update current desk durning initialization #1122

rasatpc opened this issue Nov 28, 2024 · 13 comments · Fixed by #1129
Labels
type:bug Something's broken!
Milestone

Comments

@rasatpc
Copy link

rasatpc commented Nov 28, 2024

Upfront Information

  • Fvwm3 version (run: fvwm3 --version)
    fvwm3 1.1.1 (1.1.0-129) with issue
    fvwm3 1.1.1 (1.1.0-119-g360b5bb2) with issue (maybe earlier)

fvwm3 1.1.1 (1.1.0-72) is ok

Expected Behaviour

Remember the Desk when changing from one FvwmPager to another.

Actual Behaviour

Working on Desk 2 (DesktopName 2 Office) in config "VdeskPager". When changed to config BarButtons with Swallow "FvwmPagerBar" it shows Desk 0 (DesktopName 0 Web). In WorkPager it is ok.

Screenshot:
https://rasatpc.net/screenshot/fvwm3/pager-change-issue.png

@rasatpc rasatpc added the type:bug Something's broken! label Nov 28, 2024
@somiaj
Copy link
Collaborator

somiaj commented Nov 28, 2024

Can you share the configuration and how you launched the problematic pager?

@ThomasAdam ThomasAdam added the skip:changelog Issue/PR should skip CHANGELOG label Nov 28, 2024
@rasatpc
Copy link
Author

rasatpc commented Nov 29, 2024

  1. Load config with VdeskPager
    https://github.com/rasatpc/Fvwm-KISe/blob/main/core/7Modules/WorkVpager/wVPager.sys

  2. Click on Desk 2 DesktopName 2 Office

  3. This changes VdeskPager to BarButtons (Swallow "FvwmPagerBar")
    https://github.com/rasatpc/Fvwm-KISe/blob/main/core/7Modules/Desker/dButtonPager.sys

The pager shows Desk 0 DesktopName 0 Web

@somiaj
Copy link
Collaborator

somiaj commented Nov 29, 2024

*BarButtons: (4x2, Swallow "FvwmPagerBar" 'FvwmPager FvwmPagerBar * *') -- The syntax is incorrect, only use a single *, not two.

@somiaj
Copy link
Collaborator

somiaj commented Nov 29, 2024

Well in my testing, I guess two stars, * * does work, though only one is needed. I am unable to reproduce this issue.

@rasatpc
Copy link
Author

rasatpc commented Nov 29, 2024

It seems the issue is with GoToDesk. I did a test with FvwmConsole, randomly selecting GoToDesk 1 0 0, ... 3 0 0, ... 2 0 0. The results were unpredictable. Only GoToDesk 0 0 0 is okay.

fvwm3 1.1.1 (1.1.0-130-g27ffd68a)

@somiaj
Copy link
Collaborator

somiaj commented Nov 29, 2024

I still cannot produce the issue with FvwmPager not updating the current desk properly. But the commands you are issuing are mostly nonsense (though it does appear they are broken I'll look into that). But GotoDesk 3 0 0 is not correct use of the command. From the manual page:

"Three arguments specify a relative desk and the minimum and maximum of the allowable range."

So you are stating move 3 desks from the current desk, but the minimum and maximum desks are both 0, so in essence this should move you to desk 0, but there is a bug in the looping code. Probably overlooked since this command makes very little sense to actually use.

@somiaj
Copy link
Collaborator

somiaj commented Nov 29, 2024

Maybe read my full post, and notice how no example on the wiki uses the min and max desktop to be the same. Though I fixed the bug that existed due to 'wrapping' not working correctly with more than a single wrap. My point was that command is not one someone should be using, which is most likely why the bug hasn't been noticed until now.

@rasatpc
Copy link
Author

rasatpc commented Nov 30, 2024

Good GoToDesk is fixed. My commands were incorrect e.g. GoToDesk 2 0 0 but GoToDesk 0 2.

The issue is not solved. It worked from version Fvwm3 1.0.6 (when I made the configs) until 1.1.0-72. Maybe it was not supposed to work with a multi-desk FvwmPager. When it is changed to another single FvwmPager which only shows the current desk. It works but not immediately at the change. I will post this question on the Fvwm Forums.

@somiaj
Copy link
Collaborator

somiaj commented Nov 30, 2024

Your version number doesn't make sense, the version I see from main is 1.1.1 (1.1.0-130-g27ffd68a3), maybe share the full first line of fvwm3 --version. Anyways, I'm unable to reproduce the issue, so until I can reproduce it I cannot debug the issue. You should work on creating a minimal example on top of the default-config that causes the issue.

@rasatpc
Copy link
Author

rasatpc commented Nov 30, 2024

You should work on creating a minimal example on top of the default-config that causes the issue.

This example config was tested in version 1.1.0-72 and 1.1.0-132 with the default-config. Screenshot result.
https://rasatpc.net/screenshot/fvwm3/test-v110-72-with-v110-132.png

## miniPager.sys

DesktopSize 2 1

Module FvwmPager miniPager *

DestroyModuleConfig miniPager: *
*miniPager: Geometry -180+70
*miniPager: Back #d9d9d9
*miniPager: HilightColorset * 6
*miniPager: BalloonColorset * 10
*miniPager: WindowColorsets 10 11
*miniPager: Font "xft:Sans:size=12:antialias=True"
*miniPager: SolidSeparators
*miniPager: WindowBorderWidth 1
*miniPager: BalloonStringFormat %c
*miniPager: BallonYOffset +2
*miniPager: Window3dBorders
*miniPager: UseSkipList
*miniPager: MiniIcons

Style "miniPager" NoTitle, !Handles, Borders, BorderWidth 2, WindowListSkip, Sticky, StaysOnTop

@somiaj
Copy link
Collaborator

somiaj commented Nov 30, 2024

Okay it took a while to figure out what the bug actually was (partly because your description is fairly poor). But after looking at the screenshots I finally figured out what you mean. If you run FvwmPager on a desk other than 0, it won't be updated until an update desk change happens. I'll look into that.

somiaj added a commit that referenced this issue Nov 30, 2024
When FvwmPager is tracking the current desk and is run on any desk
except desk 0, the current desk isn't updated during initialization
because the monitor update is sent before the desk update, so the
pager didn't realize the desk has changed.

This ensures that the page updates the current desk if either
the desk changes or the current desk is not the same as the
current desk to also catch updates during pager initialization.

Fixes #1122
somiaj added a commit that referenced this issue Nov 30, 2024
When FvwmPager is tracking the current desk and is run on any desk
except desk 0, the current desk isn't updated during initialization
because the monitor update is sent before the desk update, so the
pager didn't realize the desk has changed.

This ensures that the pager updates the current desk if either
the desk changes or the new desk is not the same as the current
desk to also catch updates during pager initialization.

Fixes #1122
somiaj added a commit that referenced this issue Dec 1, 2024
When FvwmPager is tracking the current desk and is run on any desk
except desk 0, the current desk isn't updated during initialization
because the monitor update is sent before the desk update, so the
pager didn't realize the desk has changed.

This ensures that the pager updates the current desk if either
the desk changes or the new desk is not the same as the current
desk to also catch updates during pager initialization.

Fixes #1122
@somiaj
Copy link
Collaborator

somiaj commented Dec 1, 2024

Okay, I see what is going on and fixed the issue. Check out js/gh-1122.

In the future try to better describe what the issue is as trying to fish useful information makes it way harder to track down the actual bug. This has nothing to do with changing desks, or remembering what the current desk is. This is about FvwmPager updating the current desk during initialization.

@somiaj somiaj changed the title Does not remember current desk FvwmPager doesn't update current desk durning initialization Dec 1, 2024
@ThomasAdam ThomasAdam removed the skip:changelog Issue/PR should skip CHANGELOG label Dec 1, 2024
@ThomasAdam ThomasAdam added this to FVWM3 Dec 1, 2024
@github-project-automation github-project-automation bot moved this to To do in FVWM3 Dec 1, 2024
@ThomasAdam ThomasAdam added this to the 1.1.2 milestone Dec 1, 2024
ThomasAdam pushed a commit that referenced this issue Dec 1, 2024
When FvwmPager is tracking the current desk and is run on any desk
except desk 0, the current desk isn't updated during initialization
because the monitor update is sent before the desk update, so the
pager didn't realize the desk has changed.

This ensures that the pager updates the current desk if either
the desk changes or the new desk is not the same as the current
desk to also catch updates during pager initialization.

Fixes #1122
@github-project-automation github-project-automation bot moved this from To do to Done in FVWM3 Dec 1, 2024
@rasatpc
Copy link
Author

rasatpc commented Dec 1, 2024

Thanks for the fix, fvwm3 1.1.2 (1.1.1-2-gefef84cf) works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants