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

Invalid starting position of floating windows #562

Open
wavexx opened this issue Jan 23, 2024 · 2 comments
Open

Invalid starting position of floating windows #562

wavexx opened this issue Jan 23, 2024 · 2 comments

Comments

@wavexx
Copy link
Contributor

wavexx commented Jan 23, 2024

With multiple monitors, windows started from the second region placed with FLOAT+ANYWHERE always land at the edge.

On a3614d1, assuming two regions and the following quirk:

quirk[::] = FLOAT + ANYWHERE

try running:

xev -geometry 100x100+10+10 -name ''

on a region which is not the first. Generally, the window will show to the far left, exactly 1 pixel within the current.

@LordReg
Copy link
Contributor

LordReg commented Jan 29, 2024

The -geometry coordinates are relative to root. When positioning a floating window via command line, the actual root coordinates should be specified.

For example, if the spawn region is at +1920+0, then the command in your example should be xev -geometry 100x100+1930+10 -name ''

Also, with the ANYWHERE quirk, if the coordinates put the floating window completely outside of the region, the position is constrained to keep the window in the region (i.e. 1px.). Without the ANYWHERE quirk, WM_SIZE_HINTS is still applied if it is valid (within the region), otherwise the window is auto-centered. So actually, the ANYWHERE quirk isn't necessary for -geometry.

@wavexx
Copy link
Contributor Author

wavexx commented Jan 29, 2024

This clarifies it for me. What I noticed is that several programs that attempt to place windows do so in the wrong workspace, which is then moved at the edge of the current one.

The worst offender I'm noticing is pinentry-gtk.

Many "startup windows" seem to be affected by this. To name a few programs which do this are FreeCAD/libreoffice/prusa-slicer. FreeCAD is qt5. prusa-slicer is gtk3 through wxwindows, and libreoffice does his own thing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants