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 with bad aspect ratio on dual-head display #522

Closed
harridu opened this issue Jun 10, 2021 · 10 comments · Fixed by #527
Closed

FvwmPager with bad aspect ratio on dual-head display #522

harridu opened this issue Jun 10, 2021 · 10 comments · Fixed by #527
Assignees
Labels
type:bug Something's broken!
Projects
Milestone

Comments

@harridu
Copy link

harridu commented Jun 10, 2021

Upfront Information

  • Fvwm3 version (run: fvwm3 --version)
fvwm3 1.0.3 (released)
with support for:  ReadLine, XPM, PNG, Shape, XShm, SM, Bidi text, XRandR, XRender, XCursor, XFT, NLS
  • Linux distribution or BSD name/version
    Debian Testing

  • Platform (run: uname -sp)

Linux dpcl082.ac.aixigo.de 5.10.0-7-amd64 #1 SMP Debian 5.10.40-1 (2021-05-28) x86_64 GNU/Linux

Expected Behaviour

The mini desktop shown by FvwmPager should keep the aspect ratio of the real desktop, even for a dual-head display.

Actual Behaviour

The FvwmPager gives me a bad aspect ration on a dual-head setup (2 monitors side by side). Seems that only one monitor has been taken into account. It looks like the pager has been squeezed horizontally to half of the usual size (as known from fvwm2).

DesktopConfiguration    global
DeskTopSize             4x3
Style   "FvwmPager"             NoTitle, BorderWidth 0, HandleWidth 0, WindowListSkip, Sticky, StaysOnBottom
AddToFunc StartFunction         "I" Module FvwmPager *
*FvwmPagerBack black
*FvwmPagerFore black
*FvwmPagerHilight gray10
*FvwmPagerWindowColors black #404040 black #c06000
*FvwmPagerGeometry -0-0@g
*FvwmPagerFont none
*FvwmPagerLabel 0 Virtual Desktop

What should have happened, but didn't?

The Pager should have kept the aspect ratio of my desktop.

config.txt

@harridu harridu added the type:bug Something's broken! label Jun 10, 2021
@ThomasAdam
Copy link
Member

Hey @harridu

Yes. Can you take a screenshot for me, so I can see how this looks?

@ThomasAdam ThomasAdam added this to the 1.0.4 milestone Jun 10, 2021
@ThomasAdam ThomasAdam added this to To do in FVWM3 via automation Jun 10, 2021
@ThomasAdam ThomasAdam self-assigned this Jun 10, 2021
@somiaj
Copy link
Collaborator

somiaj commented Jun 10, 2021

AFIAK, FvwmPager doesn't preserve the aspect ratio of the display, it just fills whatever window it is in and uses that aspect ratio and will shrink/stretch things to fit. Change the size of the FvwmPager window to match the aspect ratio (including DesktopSize).

*FvwmPagerGeometry -0-0@g

You can set the geometry there to make this work (Though I guess the issue is FvwmPager should figure this geometry out better int his case).

@harridu
Copy link
Author

harridu commented Jun 10, 2021

But this makes my .fvwmrc hardware-dependent. I would highly appreciate if this could be avoided, as it was for fvwm2

@harridu
Copy link
Author

harridu commented Jun 10, 2021

Hey @harridu

Yes. Can you take a screenshot for me, so I can see how this looks?

See below. You can find the 4 by 3 Pager in the lower right corner. For fvwm2 it was twice as wide, up to the right edge of the xterm at the bottom.

snapshot eUWVTe

@ThomasAdam
Copy link
Member

OK. This would always have been broken in fvwm2 as well. I am not sure how best to solve this -- does tweaking the DesktopScale in FvwmPager help?

@harridu
Copy link
Author

harridu commented Jun 10, 2021

No, it just changes the size, not the aspect ratio.

But it worked fine for fvwm2, so I am not sure what you mean. Something fundamental has been changed for fvwm3 wrt what is considered as a "desktop". Did you notice that all the icons are shown on the right screen? This is unusual, too. For fvwm2 they popped up on the left screen even if the mouse pointer is in the right one.

BTW, xdpyinfo gives me the correct aspect ratio:

% xdpyinfo | grep dimensions
  dimensions:    3840x1200 pixels (1016x317 millimeters)

@somiaj
Copy link
Collaborator

somiaj commented Jun 10, 2021

There will also be the issue of per-monitor vs global mode.

But I could see that if the window size if the pager is not set, you could use the aspect ratio of the virtual desktop (global) or specific monitor (per-monitor) to determine the window size. I'm just unsure how FvwmPager determins the window size if one is not set (I have always explicitly set the size). Note you could use PipeRead and some shell math to make this not hardware dependent, just grab $[vp.width] and $[vp.height].

@ThomasAdam
Copy link
Member

Yeah -- @harridu -- try doing that first so you get it right, with PipeRead and then we can look at getting this logic in to the pager.

@harridu
Copy link
Author

harridu commented Jun 11, 2021

I am not sure what this magic is supposed to achieve. "Look for the aspect ratio of the X display and keep it"?

Surely I understand that fvwm3 is pretty new. I don't expect a perfect solution. I came here just to report an inconsistency compared to the old fvwm2. Its your choice how to proceed. Thank you very much for your help

somiaj added a commit that referenced this issue Jun 11, 2021
 * Disable use of sizehints (they were mostly broken) to simplify code.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
@ThomasAdam
Copy link
Member

@harridu

It's got nothing to do with fwm3 being new.

Please take a look at the js/pager-window-size -- do nothing with your existing FvwmPager config, and hopefully the magic contained therein will correctly handle the aspect ratio.

Please do let me know how you get on testing this.

somiaj added a commit that referenced this issue Jun 11, 2021
 * Disable use of sizehints (they were mostly broken) to simplify code.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
somiaj added a commit that referenced this issue Jun 11, 2021
 * Removed sizehints from window geometry computation and no longer use
   width/height resize increments to simplify code.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
somiaj added a commit that referenced this issue Jun 11, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
ThomasAdam pushed a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global window size or monitor window size (if monitor is set)
   to determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
somiaj added a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global view port size or monitor size (if monitor is set) to
   determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
ThomasAdam pushed a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global view port size or monitor size (if monitor is set) to
   determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
FVWM3 automation moved this from To do to Done Jun 12, 2021
ThomasAdam pushed a commit that referenced this issue Jun 12, 2021
 * Updated window size computational logic and formulas to deal with
   per-monitor vs global configurations.
 * Use either global view port size or monitor size (if monitor is set) to
   determine initial dimensions of pager if not set by user. Fixes #522.
 * Correctly use DeskTopScale (Scr.VScale) to determine window size if
   Geometry not set by user. Fixes #223.
 * Improved use of sizehints to set both minimum window size, and to
   preserve aspect ratio when resizing the pager. The aspect ratio is
   set to the initial size of the window unless the user sets window
   size with the Geometry option.
 * Manual page updates to state the how initial size works.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 20, 2021
# Changelog

## [1.0.4](https://github.com/fvwmorg/fvwm3/tree/1.0.4) (2021-07-17)

[Full Changelog](fvwmorg/fvwm3@1.0.3...1.0.4)

**Breaking changes:**

- Deprecate Label for FvwmPager [\#342](fvwmorg/fvwm3#342)
- Extend \*FvwmIconMan:Resolution to include specific Desktop / Pager [\#455](fvwmorg/fvwm3#455)
- Replace libbson with cJSON [\#408](fvwmorg/fvwm3#408)
- FvwmButtons: Shrink windows when honoring Hints. [\#577](fvwmorg/fvwm3#577) ([somiaj](https://github.com/somiaj))
- Replace libbson with cJSON [\#571](fvwmorg/fvwm3#571) ([ThomasAdam](https://github.com/ThomasAdam))
- Add commands to configure the size/position window. [\#558](fvwmorg/fvwm3#558) ([ThomasAdam](https://github.com/ThomasAdam))
- Retire FvwmTile and FvwmCascade wrappers. [\#515](fvwmorg/fvwm3#515) ([somiaj](https://github.com/somiaj))

**Implemented enhancements:**

- Set min. size for windows shown in pager [\#542](fvwmorg/fvwm3#542)
- Moving windows: allow for "warping" to other windows in a given direction [\#540](fvwmorg/fvwm3#540)
- Update monitor struct to know if monintor edges are OUTSIDE\_EDGE or INSIDE\_EDGE [\#523](fvwmorg/fvwm3#523)
- Two issues with the WindowList [\#151](fvwmorg/fvwm3#151)
- Feature Request: Enable using the 'c' unit with the "MinWindowSize" and "MaxWindowSize" styles [\#145](fvwmorg/fvwm3#145)
- Allow per monitor EdgeCommand and EdgeLeaveCommand [\#582](fvwmorg/fvwm3#582) ([somiaj](https://github.com/somiaj))
- expand: add prev\_{desk,pagex,pagey} [\#579](fvwmorg/fvwm3#579) ([ThomasAdam](https://github.com/ThomasAdam))
- Improve translations [\#568](fvwmorg/fvwm3#568) ([somiaj](https://github.com/somiaj))
- Cleanup SetRCDefaults\(\) [\#567](fvwmorg/fvwm3#567) ([somiaj](https://github.com/somiaj))
- Add local configuration file to the default-config. [\#557](fvwmorg/fvwm3#557) ([somiaj](https://github.com/somiaj))
- Add icon for Run Command. [\#552](fvwmorg/fvwm3#552) ([somiaj](https://github.com/somiaj))
- Add command: Move shuffle \[flags\] direction\(s\) [\#550](fvwmorg/fvwm3#550) ([somiaj](https://github.com/somiaj))
- expand: add desk, pagex, pagey variables [\#539](fvwmorg/fvwm3#539) ([ThomasAdam](https://github.com/ThomasAdam))
- Add a screen option to the Scroll command. [\#531](fvwmorg/fvwm3#531) ([ThomasAdam](https://github.com/ThomasAdam))
- RandR: support RandRFunc for screen changes [\#525](fvwmorg/fvwm3#525) ([ThomasAdam](https://github.com/ThomasAdam))

**Fixed bugs:**

- Pager do not show smalls windows in the correct place when snapped to the edge [\#541](fvwmorg/fvwm3#541)
- EwmhBaseStruts glitch when using screen with different resolutions [\#66](fvwmorg/fvwm3#66)
- Fvwm segfaults parsing module configuration [\#575](fvwmorg/fvwm3#575)
- Swallowing FvwmPager inside FvwmButtons breaks resizing FvwmButtons when aspect ratio resizing is used [\#573](fvwmorg/fvwm3#573)
- Move X Y Warp doesn't move pointer to window. [\#551](fvwmorg/fvwm3#551)
- Maximize fullscreen command does not clear \_NET\_WM\_STATE\_FULLSCREEN when exiting fullscreen [\#545](fvwmorg/fvwm3#545)
- EdgeLeaveCommand don't work or need a page change to work [\#543](fvwmorg/fvwm3#543)
- FvwmPager Icon view fix background color. [\#537](fvwmorg/fvwm3#537)
- FvwmPager with bad aspect ratio on dual-head display [\#522](fvwmorg/fvwm3#522)
- AnimatedMove [\#513](fvwmorg/fvwm3#513)
- Spelling errors found by lintian. [\#511](fvwmorg/fvwm3#511)
- SnapAttraction: take into account individual monitors [\#466](fvwmorg/fvwm3#466)
- FvwmPager not taking into account global screen dimensions when configured with DeskTopScale [\#223](fvwmorg/fvwm3#223)
- FvwmPager: moving windows inside FvwmPager is inconsistent [\#198](fvwmorg/fvwm3#198)
- Add force\_icons\_size kludge to .stalonetrayrc. [\#581](fvwmorg/fvwm3#581) ([somiaj](https://github.com/somiaj))
- Fix pass through binding logic. [\#570](fvwmorg/fvwm3#570) ([somiaj](https://github.com/somiaj))
- Make default-config greyed colorset grey. [\#566](fvwmorg/fvwm3#566) ([somiaj](https://github.com/somiaj))
- Cleanup FvwmScript manual page. [\#565](fvwmorg/fvwm3#565) ([somiaj](https://github.com/somiaj))
- GNOME: remove DO\_IGNORE\_GNOME\_HINTS [\#556](fvwmorg/fvwm3#556) ([lgsobalvarro](https://github.com/lgsobalvarro))
- Unmaximize: restore \_NET\_WM\_STATE [\#546](fvwmorg/fvwm3#546) ([ThomasAdam](https://github.com/ThomasAdam))
- Fix compiler warnings in modules/FvwmScript/Instructions.c [\#544](fvwmorg/fvwm3#544) ([pm215](https://github.com/pm215))
- Rework FvwmPager to move windows easier [\#536](fvwmorg/fvwm3#536) ([ThomasAdam](https://github.com/ThomasAdam))
- Move: disable working area when screen given [\#535](fvwmorg/fvwm3#535) ([ThomasAdam](https://github.com/ThomasAdam))
- Make RightPanel use primary monitor dimensions. [\#530](fvwmorg/fvwm3#530) ([somiaj](https://github.com/somiaj))
- Set base struts only for primary monitor in default-config. [\#528](fvwmorg/fvwm3#528) ([somiaj](https://github.com/somiaj))
- Change FvwmPager Logic for initial window size. [\#527](fvwmorg/fvwm3#527) ([somiaj](https://github.com/somiaj))
- EWMH\_GetWorkArea use monitor dimensions. [\#526](fvwmorg/fvwm3#526) ([somiaj](https://github.com/somiaj))
- Make SnapAttraction snap to edges of all monitors. [\#521](fvwmorg/fvwm3#521) ([somiaj](https://github.com/somiaj))
- Update FvwmCommand to allow multiple args. [\#514](fvwmorg/fvwm3#514) ([somiaj](https://github.com/somiaj))

**Merged pull requests:**

- Extend FvwmIconMan Resolution configuration. [\#561](fvwmorg/fvwm3#561) ([somiaj](https://github.com/somiaj))
- Allow Min/Max WindowSize style to use client size [\#560](fvwmorg/fvwm3#560) ([somiaj](https://github.com/somiaj))
- Add more columns to default-config menu ItemFormat. [\#559](fvwmorg/fvwm3#559) ([somiaj](https://github.com/somiaj))
- Fix broken link. [\#529](fvwmorg/fvwm3#529) ([somiaj](https://github.com/somiaj))
- Spelling error fixes. [\#512](fvwmorg/fvwm3#512) ([somiaj](https://github.com/somiaj))
- Working on 1.0.4 [\#509](fvwmorg/fvwm3#509) ([ThomasAdam](https://github.com/ThomasAdam))
- module expand: don't overwrite previous expansion [\#576](fvwmorg/fvwm3#576) ([ThomasAdam](https://github.com/ThomasAdam))
- conditional: fix whitespace/comma parsing [\#572](fvwmorg/fvwm3#572) ([ThomasAdam](https://github.com/ThomasAdam))
- Configure a colorset for XDGMenu options. [\#564](fvwmorg/fvwm3#564) ([somiaj](https://github.com/somiaj))
- Menu: add option to grey entries out [\#563](fvwmorg/fvwm3#563) ([ThomasAdam](https://github.com/ThomasAdam))
- Remove \*FvwmPager: Label configuration option. [\#562](fvwmorg/fvwm3#562) ([somiaj](https://github.com/somiaj))
- move: Warp: move pointer to centre of window [\#553](fvwmorg/fvwm3#553) ([ThomasAdam](https://github.com/ThomasAdam))
- FvwmPager: Improvments with dealing with tiny windows on tiny pagers. [\#548](fvwmorg/fvwm3#548) ([somiaj](https://github.com/somiaj))
- PanFrame improvements [\#547](fvwmorg/fvwm3#547) ([ThomasAdam](https://github.com/ThomasAdam))
- pager: teach Icon view about colorsets [\#538](fvwmorg/fvwm3#538) ([ThomasAdam](https://github.com/ThomasAdam))
- placement: fix mouse positioning [\#533](fvwmorg/fvwm3#533) ([ThomasAdam](https://github.com/ThomasAdam))
- EdgeScroll: a few improvements [\#524](fvwmorg/fvwm3#524) ([ThomasAdam](https://github.com/ThomasAdam))
- Update manual for Echo/EchoFuncDefinition [\#520](fvwmorg/fvwm3#520) ([somiaj](https://github.com/somiaj))
- release: remove dev-docs from release tarball [\#518](fvwmorg/fvwm3#518) ([ThomasAdam](https://github.com/ThomasAdam))
- configure: remove stale references to BUGADDR [\#517](fvwmorg/fvwm3#517) ([ThomasAdam](https://github.com/ThomasAdam))
- Configuration tweaks [\#516](fvwmorg/fvwm3#516) ([ThomasAdam](https://github.com/ThomasAdam))
- build: add CHANGELOG.md to dist [\#510](fvwmorg/fvwm3#510) ([ThomasAdam](https://github.com/ThomasAdam))
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
FVWM3
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants