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

FvwmButtons window not showing, when 2 different sized screens, the wider screen above the smaller #913

Open
bymoz089 opened this issue Oct 12, 2023 · 0 comments
Labels
type:bug Something's broken!

Comments

@bymoz089
Copy link

Upfront Information

  • Fvwm3 version (run: fvwm3 --version): fvwm3 1.0.8 (released) with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, XRandR, XRender, XCursor, XFT, NLS

  • Linux distribution: Debian Bullseye (11.8)

  • Platform (run: uname -sp): Linux

what I was trying to do

Run fvwm with the below given minimal config file.

This config should

  • setup 2 (different sized) screens (the bigger wider screen is located above the smaller screen) through xrandr,
  • then start FvwmButtons, (including an autohide feature for it) which swallows FvwmPager.

Expected Behaviour

FvwmButtons window should show up at the correct location (south west corner of lower screen).

FvwmButtons window should hide after a short period of time and it should be redisplayed if the mouse pointer is located at the lower (smaller) screen in the south east corner.

Actual Behaviour

FvwmButtons window is not visible at all.

The implemented autohide feature (redisplaying the FvwmButtons window, if pointer is located at south east corner of the smaller lower screen) does not redisplay the FvwmButtons window.

Workaround

Rewriting the config file, so that:

  • the FvwmButtons window is located at the south west corner of the lower smaller screen and
  • the autohide feature reacts on the south west corner of the lower smaller screen

makes everything work. But of course on the wrong corner.

idea what causes the issue

Due to this workaround behavior, I suspect that this issue is caused by FvwmButtons (or fvwm3), calculating the position (of the south west corner of the lower smaller screen) wrong.

Steps to Reproduce

The problem is easily reproduceable, just start fvwm3 with the with following minimal configuration file:

EdgeScroll 0 0
DeskTopSize 2x2

Style "FvwmButtons" UseUSPosition,UsePPosition,NoHandles,NoTitle,Sticky,WindowListSkip,CirculateSkip,BorderWidth 0,NeverFocus,StaysOnTop,VariablePPosition

DestroyFunc InitFunction
AddToFunc InitFunction
+ I exec /usr/bin/xrandr --output eDP1 --mode 1280x1024 --primary --output DP2 --mode 1920x1080 --above eDP1 --output DP1 --off --output HDMI1 --off --output HDMI2 --off --output VGA1 --off --output VIRTUAL1 --off
+ I Module FvwmButtons
+ I Module FvwmAuto 1 -menter enter_handler

DestroyFunc RestartFunction
AddToFunc RestartFunction
+ I Module FvwmButtons
+ I Module FvwmAuto 1 -menter enter_handler


# ----------

*FvwmButtons: BoxSize smart
*FvwmButtons: Columns 1
*FvwmButtons: Rows 1
*FvwmButtons: Font None
*FvwmButtons: ButtonGeometry 62x62-0-0
#*FvwmButtons: ButtonGeometry 62x62+0-0  # works with 'Shade direction' on 'SW' in 'enter_handler'
*FvwmButtons: Frame 0
*FvwmButtons: Padding 0 0
*FvwmButtons: Pixmap none
*FvwmButtons: (Swallow(NoClose,NoKill,Respawn,UseOld) "FvwmPager" "FvwmPager *")

# ----------

# Autohide FvwmButtons, just show it if mouse pointer is on south east corner of screen
DestroyFunc autohide
AddToFunc autohide
+        I        ThisWindow ($0)  Deschedule $[w.id]
+        I        TestRc (!Match)  Deschedule -$[w.id]
+        I        ThisWindow ($0)  KeepRc ThisWindow (shaded) autohide_show $1 $3
+        I        TestRc (!Match)  All ($0, !shaded) autohide_hide $2 $3

DestroyFunc autohide_show
AddToFunc autohide_show
+        I        Schedule $0 -$[w.id]  WindowShade $1 off
+        I        Schedule $0 -$[w.id]  Deschedule $[w.id]
+        I        Schedule $0 -$[w.id]  Deschedule -$[w.id]

DestroyFunc autohide_hide
AddToFunc autohide_hide
+        I        Schedule $0 $[w.id]  WindowShade $1 on
+        I        Schedule $0 $[w.id]  Deschedule $[w.id]
+        I        Schedule $0 $[w.id]  Deschedule -$[w.id]


DestroyFunc enter_handler
AddToFunc enter_handler
+        I        autohide FvwmButtons 400 800 SE
#                          ^           ^   ^   ^
#                          |           |   |   |__  Shade direction (optional) (N E S W NE SE SW NW)
#                          |           |   |______  Hide delay (milliseconds)
#                          |           |__________  Show delay
#                          |______________________  Unique window name/resource

Does Fvwm3 crash?

no

Extra Information

fvwm2 is behaving correctly and does not show this issue.

Miscalculating screen positions in such cases is an issue because Laptops often have smaller builtin screens than its connected secondary external screens.

@bymoz089 bymoz089 added the type:bug Something's broken! label Oct 12, 2023
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
None yet
Development

No branches or pull requests

1 participant