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

EdgeScroll does not work #381

Closed
slazav opened this issue Dec 22, 2020 · 24 comments · Fixed by #384 or #438
Closed

EdgeScroll does not work #381

slazav opened this issue Dec 22, 2020 · 24 comments · Fixed by #384 or #438
Assignees
Labels
type:bug Something's broken!
Milestone

Comments

@slazav
Copy link
Contributor

slazav commented Dec 22, 2020

In my configuration I have:

DesktopSize 3x3
EdgeScroll 100 100
EdgeResistance 500
EdgeThickness 2

After switching from fvwm2 to fvwm3 (1.0.2 release) scrolling with mouse stop working. It still works if I'm moving a window through the screen edge.

@slazav slazav added the type:bug Something's broken! label Dec 22, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label type:bug to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@ThomasAdam
Copy link
Member

Hi @slazav

Works fine for me using your example. Can you provide further details?

@ThomasAdam ThomasAdam self-assigned this Dec 22, 2020
@ThomasAdam ThomasAdam added this to the 1.0.3 milestone Dec 22, 2020
@slazav
Copy link
Contributor Author

slazav commented Dec 22, 2020

In fvwm2 (2.6.9) when I move mouse to a screen edge, cursor changes, then scrolling happens.
In fvwm3 (1.0.2) cursor does not change, scrolling does not happen.
I tried fvwm3 -D, there are no messages, except "loaded [0] ... config".
I checked with configuration file which has only these 4 lines (nothing else) - same effect.

@ThomasAdam
Copy link
Member

ThomasAdam commented Dec 22, 2020

Hi @slazav,

Then you need to read the issue template for filing bugs, because there I've recommended:

`fvwm3` has a means of logging what it's doing.  Enabling this when
reproducing the issue might help.  To do this, either change the means fvwm3
is started by adding `-v` as in:

```
fvwm3 -v
```

or, once `fvwm3` has loaded, send `SIGUSR2` as in:

```
pkill -USR2 fvwm3
```

The resulting logfile can be found in `$HOME/.fvwm/fvwm3-output.log`

... so if you can try this and attached the log file fvwm3 produces, I'll take a look.

@slazav
Copy link
Contributor Author

slazav commented Dec 22, 2020

$ cat fvwm3-output.log 
[1608649639.072400] FScreenInit: Using RandR 1.6
[1608649639.078611] main: Loading window states via (null)
[1608649639.079378] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.079383] ewmh_ComputeAndSetWorkArea: differ, so setting work area
[1608649639.080213] ewmh_ComputeAndSetWorkArea: monitor 'DP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.080225] ewmh_ComputeAndSetWorkArea: differ, so setting work area
[1608649639.089963] setup_window_placement: Expanding screen from 'null' -> ''
[1608649639.089998] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.090002] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649639.090004] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649639.090007] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.091337] setup_window_placement: Expanding screen from 'null' -> ''
[1608649639.091363] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.091367] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649639.091370] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649639.091372] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.092612] setup_window_placement: Expanding screen from 'null' -> ''
[1608649639.092635] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.092639] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649639.092641] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649639.092643] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.093888] setup_window_placement: Expanding screen from 'null' -> ''
[1608649639.093918] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.093922] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649639.093924] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649639.093926] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.097425] setup_window_placement: Expanding screen from 'null' -> ''
[1608649639.097492] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.097496] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649639.097498] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649639.097500] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608649639.098363] checkPanFrames: 1 eDP1: {left: 0, right; 0, top: 0, bottom: 0}
[1608649639.098370] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608649639.098373] checkPanFrames: 2 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608649639.098375] checkPanFrames: 1 DP1: {left: 0, right; 0, top: 0, bottom: 0}
[1608649639.098377] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608649639.098380] checkPanFrames: 2 DP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608649690.315859] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608649690.315932] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608649690.315945] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608649690.315956] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}

I have a notebook (eDP1) with additional external monitor (DP1), configured with xrandr --output DP1 --same-as eDP1

@ThomasAdam
Copy link
Member

Hi @slazav

OK, so there's....

[1608649639.098363] checkPanFrames: 1 eDP1: {left: 0, right; 0, top: 0, bottom: 0}
[1608649639.098370] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608649639.098373] checkPanFrames: 2 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608649639.098375] checkPanFrames: 1 DP1: {left: 0, right; 0, top: 0, bottom: 0}
[1608649639.098377] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608649639.098380] checkPanFrames: 2 DP1: {left: 0, right; 1, top: 0, bottom: 1}

Which tells me that for the position you were in at that time, both the top and left panframes were disabled, presumably because you were on page 0 0 -- but when you put your mouse in one of those panframes, nothing happened? There should be more logging than this -- did you upload the entire file?

@slazav
Copy link
Contributor Author

slazav commented Dec 22, 2020

Yes, it was page (0,0). When I'm moving mouse to any edge, nothing happens, nothing is written to the file. If I switch to the page (1,0) and back with "scroll +100 +0", "scroll -100 +0" I have

[1608654506.303349] checkPanFrames: 1 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654506.303477] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608654506.303509] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654506.303527] checkPanFrames: 1 DP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654506.303545] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608654506.303563] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654516.447885] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654516.448086] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608654516.448189] checkPanFrames: 2 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654516.448264] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654516.448336] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608654516.448422] checkPanFrames: 2 DP1: {left: 0, right; 1, top: 0, bottom: 1}

If I move a window to page (1,0) and back I have:

[1608654650.726630] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1608654650.726724] EWMH_GetWorkAreaIntersection: mon: eDP1 {ax: 0, ay: 0, aw: 1920, ah: 1080
[1608654650.726745] EWMH_GetWorkAreaIntersection: mon: eDP1 {x: 0, y: 0, w: 1920, h: 1080
[1608654650.726758] EWMH_GetWorkAreaIntersection: mon: eDP1 finalising: {x: 0, y: 0, w: 1920, h: 1080}
[1608654651.534144] checkPanFrames: 1 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654651.534310] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608654651.536350] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654651.536411] checkPanFrames: 1 DP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654651.536491] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608654651.536532] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654655.021269] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654655.021358] checkPanFrames: eDP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608654655.021388] checkPanFrames: 2 eDP1: {left: 0, right; 1, top: 0, bottom: 1}
[1608654655.021408] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 0, bottom: 1}
[1608654655.021426] checkPanFrames: DP1: unmap_t: 1, unmap_b: 0, unmap_l: 1, unmap_r: 0
[1608654655.021797] checkPanFrames: 2 DP1: {left: 0, right; 1, top: 0, bottom: 1}

@ThomasAdam
Copy link
Member

Hi @slazav,

Right -- it's because of how I'm trying to mimic panframes working.

Fix will be coming up in a bit.

ThomasAdam added a commit that referenced this issue Dec 22, 2020
Trying to move/unmap panframes per monitor is a pain, and will result in
a state-tracking system which becomes pointless.

Therefore, map panwindows when appropriate and leave them there.

Fixes #381
ThomasAdam added a commit that referenced this issue Dec 23, 2020
Trying to move/unmap panframes per monitor is a pain, and will result in
a state-tracking system which becomes pointless.

Therefore, map panwindows when appropriate and leave them there.

Fixes #381
@slazav
Copy link
Contributor Author

slazav commented Dec 25, 2020

Does not work correctly.

If I move cursor to the top, left, or bottom side of any page, then cursor changes. Switching happens only if there is a page behind this side (as expected). If I move it to the right side on any page nothing happens.

Logs. I'm on page (0,0).
Scroll 0 -100, trying to go up (no page there, no switching):

[1608939091.515260] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939091.515333] checkPanFrames: eDP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939091.515351] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939091.515361] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939091.515370] checkPanFrames: DP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939091.515381] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 1, bottom: 1}

Scroll -100 0, trying to go left (again no switching):

[1608939105.131043] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939105.131139] checkPanFrames: eDP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939105.131167] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939105.131178] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939105.131187] checkPanFrames: DP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939105.131198] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 1, bottom: 1}

Scroll +100 0, Scroll -100 0, going right and then back (Scroll command works as expected)

[1608939194.748182] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939194.748271] checkPanFrames: eDP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939194.748303] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939194.748336] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939194.748352] checkPanFrames: DP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939194.748371] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939195.251585] checkPanFrames: 1 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939195.251649] checkPanFrames: eDP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939195.251672] checkPanFrames: 2 eDP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939195.251685] checkPanFrames: 1 DP1: {left: 1, right; 1, top: 1, bottom: 1}
[1608939195.251698] checkPanFrames: DP1: unmap_t: 0, unmap_b: 0, unmap_l: 0, unmap_r: 0
[1608939195.251712] checkPanFrames: 2 DP1: {left: 1, right; 1, top: 1, bottom: 1}

Moving mouse to the top, left, bottom side:

[1608939219.700061] is_pan_frame: Window is PanFrame top
[1608939220.222234] HandleEnterNotify: handled paging for eDP1 (0)
[1608939220.222330] is_pan_frame: Window is PanFrame top
[1608939221.828284] is_pan_frame: Window is PanFrame left
[1608939222.350402] HandleEnterNotify: handled paging for eDP1 (0)
[1608939222.350444] is_pan_frame: Window is PanFrame left
[1608939222.908277] is_pan_frame: Window is PanFrame bottom
[1608939223.430249] HandleEnterNotify: handled paging for eDP1 (0)
[1608939223.430353] is_pan_frame: Window is PanFrame bottom

Moving mouse to the right side
<nothing>

@phileimer
Copy link
Contributor

phileimer commented Jan 24, 2021

Hi @ThomasAdam
For this issue, you commited 29f0024.
It brought me a trouble: while I don't use edge scroll, it's always activated, preventing my hidden taskbar to be accessible.

To have everything back to normal, I had to partially revert your commit with:
`
--- a/fvwm/virtual.c
+++ b/fvwm/virtual.c
@@ -960,7 +960,7 @@ should_free_panframe(PanFrame *pf)
if (pf->command != NULL || pf->command_leave != NULL)
return (false);

  • return (false);
  • return (true);
    }

/*
`

@ThomasAdam
Copy link
Member

Hey @phileimer

Indeed -- I've reopened this, but your suggestion isn't the correct fix. I know it'll help in your situation though.

ThomasAdam added a commit that referenced this issue Feb 1, 2021
When working out where to place the panframes when moving between them,
don't move the y boundary off the screen.

Noticed by Göran Bengtson

Fixes #381
@ThomasAdam
Copy link
Member

Hi all,

Please can you try ta/gh-381 and let me know if this fixes the problem?

@phileimer
Copy link
Contributor

Hi @ThomasAdam,

I tested this ta/gh-381 branch and it behaves the same way than master: I loose the ability to unhide my taskbar.

However, this triggered a reread of man page, and I found my configuration file did not set EdgeThickness.
By setting EdgeThickness to 0 (or 1), every thing works well.
As I don't use edge scrolling, I guess EdgeThickness 0 is the right configuration for me.

Now, it's up to you to understand why it's been working for me since a while, with EdgeThickness defaulting to 2.

ThomasAdam added a commit that referenced this issue Feb 20, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
ThomasAdam added a commit that referenced this issue Feb 20, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
ThomasAdam added a commit that referenced this issue Feb 20, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
@ThomasAdam
Copy link
Member

Hey @phileimer, @slazav,

Please take a look at ta/panframe-improvements and let me know if any of the issues you raised here are resolved or not.

ThomasAdam added a commit that referenced this issue Feb 20, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
@phileimer
Copy link
Contributor

Hi @ThomasAdam
I've been running [ta/panframe-improvements] for one day with no trouble.
I modified back my configuration with an undefined EdgeThickness (so defaulting to 2), and it works like before 29f0024.

@ThomasAdam
Copy link
Member

Hi @phileimer

Sweet! Thanks for letting me know. Unless I hear anything else negative, I'll look to get this merged next week.

@slazav
Copy link
Contributor Author

slazav commented Feb 22, 2021

Thanks! For me it works better, but still not perfect. My settings:

DesktopSize 3x3
EdgeScroll 100 100
EdgeThickness 2
EdgeResistance 500

Just after starting fvwm3 I'm at the page (0,0), and mouse scrolls through edges do not work at all. But after I drag a window through an edge once, or do Scroll command it start working as expected.

Starting fvwm3:

[1613991549.360662] FScreenInit: Using RandR 1.6
[1613991549.402625] main: Loading window states via (null)
[1613991549.403589] ewmh_ComputeAndSetWorkArea: monitor 'eDP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1613991549.403597] ewmh_ComputeAndSetWorkArea: differ, so setting work area
[1613991549.404681] ewmh_ComputeAndSetWorkArea: monitor 'DP1': {l: 0, r: 0, t: 0, b: 0} {x: 0, y: 0, w: 1920, h: 1080}
[1613991549.404695] ewmh_ComputeAndSetWorkArea: differ, so setting work area
[1613991549.404702] initPanFrames: freeing panframes
[1613991549.404708] initPanFrames: finished setting up global panframes
[1613991549.411675] initPanFrames: freeing panframes
[1613991549.411689] initPanFrames: finished setting up global panframes
[1613991549.420990] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.421996] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.422919] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.429411] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.431179] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.432506] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.433478] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.434437] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.435391] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.436379] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.437019] convert_charsets: [fvwm][convert_charsets]: WARNING -

[1613991549.437032] convert_charsets: Invalid byte sequence during conversion from UTF-8 to KOI8-R
[1613991549.437407] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.437681] convert_charsets: [fvwm][convert_charsets]: WARNING -

[1613991549.437691] convert_charsets: Invalid byte sequence during conversion from UTF-8 to KOI8-R
[1613991549.439988] setup_window_placement: Expanding screen from 'null' -> ''
[1613991549.473241] setup_window_placement: Expanding screen from 'null' -> ''

scroll command to another page and back:

<nothing>

now scroll with mouse works:

[1613991704.013236] is_pan_frame: Window is PanFrame right
[1613991704.536447] HandleEnterNotify: handled paging for eDP1 (1)
[1613991704.537006] is_pan_frame: Window is PanFrame right
[1613991704.841237] is_pan_frame: Window is PanFrame left
[1613991705.365928] HandleEnterNotify: handled paging for eDP1 (1)
[1613991705.366024] is_pan_frame: Window is PanFrame left

ThomasAdam added a commit that referenced this issue Feb 22, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
ThomasAdam added a commit that referenced this issue Feb 22, 2021
Introduce the static function `init_one_panframe()` to remove code
duplication when setting up PanFrames between global and per-monitor
mode.

Fixes #381, fixes #401
@ThomasAdam
Copy link
Member

Hi @slazav

Yeah -- this is because of where I was calling initPanFrames() from. I've fixed that now, and taken the opportunity to refactor a few bits.

Please retest, all!

@phileimer
Copy link
Contributor

Still ok for me!

@slazav
Copy link
Contributor Author

slazav commented Feb 22, 2021

Everything looks good now!

@ThomasAdam
Copy link
Member

Thanks. Is any of this testing against multi monitor setups with different resolutions to one another?

ThomasAdam added a commit that referenced this issue Feb 22, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
ThomasAdam added a commit that referenced this issue Feb 22, 2021
Introduce the static function `init_one_panframe()` to remove code
duplication when setting up PanFrames between global and per-monitor
mode.

Fixes #381, fixes #401
@slazav
Copy link
Contributor Author

slazav commented Feb 22, 2021

I have two monitors with same resolution, configured with xrandr --same-as setting. I changed one to a smaller resolution. Not sure how it should work, but nothing bad happened. Smaller one shows only top-left area of each page, switching to other pages work as before. After restarting fvwm nothing changes, only FvwmPager which is normally in the bottom-right corner moves to the corner of the smaller monitor.

@slazav
Copy link
Contributor Author

slazav commented Feb 22, 2021

Also checked that switching between two monitors showing same page:
xrandr --output eDP1 --mode 1920x1080 --same-as DP1
and page splitted between two monitors:
xrandr --output eDP1 --mode 1920x1080 --pos 1920x0
requires restarting of fvwm. Then everything works fine.

@ThomasAdam
Copy link
Member

Excellent. Thanks!

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
3 participants