Some floating windows are positioned left/top - intentionally? #363
|
Hello, Since sway-scroll 1.12.17 in certain applications I am using floating windows are getting moved to the left/top. floating_left_top.mp4The same I can observe in the mail client evolution. Thanks for clarification! |
Replies: 3 comments 1 reply
|
The position of floating windows should be set by the application, and in most cases, the application will remember where it set them the last time. For example, my splash gimp window opens in the middle, and then, the main window opens where I left it and with the size I left it the last time I used gimp (all my gimp windows are floating windows). If that is not the case for you, share your config and I may have a look. |
|
Thanks for your immediate reply. local function on_map(view, _) if app_id == "scide" if app_id == "galculator" end scroll.add_callback("view_map", on_map, nil) If I deactivate it the mentioned floating windows are positioned in the middle. Is there a possibility to adapt this script so that I would be still able to resize these applications? |
|
In 1.12.17 I added support to use You can modify your script to only do what it is doing if the window is not floating. Use |
In 1.12.17 I added support to use
set_sizeandcycle_sizeon floating windows. So in your script, you maximize gimp windows, including floating ones, that then recover their real size. But when maximizing them, the top left corner will be at the top left of the monitor, and that is why it shows there.You can modify your script to only do what it is doing if the window is not floating. Use
scroll.container_get_floating(container)to test if the container is floating, and don't set the size if it is.