Description
Please fill out the following:
-
Sway Version:
sway version 1.9 -
Debug Log:
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-20250216-132858_sway-log
-
Configuration File:
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config_bindsym
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config_exec
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config_for_window
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config_inoutbarcolor
-
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-config_vars
I developed a script that remembers where the user places floating windows, and places them there again automatically the next
time they reappear:
https://github.com/OctopusET/sway-contrib/blob/master/float-window-manager/float-window-managerd.sh
A series of for_window rules are set up at the script's launch, from filenames in a designated folder, whose contents are the
desired position, expressed as percentages. Newly added windows, or windows that the user moves again, are given new/changed for_window rules.
This works reliably, except some windows [sometimes] seem to refuse to be placed correctly, but get placed in the center.
Sway's log shows the window's being moved to the correct position, even if it isn't.
I link you to a video that shows GIMP starting up, and the two side windows (Layers/Toolbox) correctly moving to their designated positions.
It then shows the Sharpen window correctly showing up, being cancelled, and then twice being re-invoked and appearing in the center.
[At least the second time,] there is a brief flash of the window being correctly placed, before then going to the center.
https://youtu.be/Vd2phgudGcE
The log shows the window being recognized and moved all three times, to the correct location, even though it only appeared there one of the three times.
A text file with snippets of the terminal showing the files with percentages, Sway's log, and a bit of my script's log:
https://gist.github.com/scott092707/d1d44bd35df277b34a8a42757df94dca#file-swaywindowbug-txt
[One curious [unrelated?] thing: I thought all floating windows that have no for_window rules set up, automatically go to the center,
but GIMP's Toolbox and Layers windows start at the upper-left corner of GIMP's main window, before they get moved to the desired position.
Is this new? (perhaps, because they are children of the main window, somehow...?) ]
I don't know if there is a way to look in the log for Sway's moving of windows except for the for_window rules, but I could not find any.
I DID look for other references to the "view" mentioned when the for_window rule is invoked ("matches view xxxxxx"), but there aren't many, and all refer to for_window rules being matched.
Clearly, something outside the for_window rules I set up is moving the window back to the center.
I don't have a clue what is triggering it.
The Toolbox and Layers windows have never had the problem; the Sharpen window usually fails.
I think occasionally other GIMP windows don't move correctly, but the one I use most (Levels) always works.
Activity