How to position a Window in Linux?

Hi, I’m fiddling around with SC on my Raspberry Pi 5 (runs great btw, quite fast too), but one thing I can’t seem to get working is window placement. I’m running Patchbox OS (a raspbian variant made for audio), but updated to all the latest versions and with a self-built SC. When I create a new Window it always gets placed in the center of the screen, whatever bounds I give it. I’ve had this experience before on other Linux machines (also some occasions where windows got tiled by the system automatically). Is there any known way to prevent this?

Cheers & thanks,
Wouter

Helping debugging this might be difficult :confused: . This might be QT/OS related, thus difficult to diagnose.

Is this working if you move the window afterwards ?

(
var win = Window();
win.front;
win.bounds_(Rect(1000, 800, 100, 100));
)

If this does not work, does it work if you delay the window repositioning ?

(
var win = Window();
win.front;
{ win.bounds_(Rect(1000, 800, 100, 100)); }.defer(2);
)

A hack rather than a correct solution, but if it works…

same here [i’m on wayland/hyprland].
.defer doesnt work.
wayland issue, probably.

Wayland doesnt allow windows to position themselves.

“a deliberate design trait of Wayland makes application windows ignorant of their exact placement on screen or relative to other windows. This decision affords Wayland compositors a greater deal of flexibility — windows could be shown in several places at once, arranged in the 3D space of a VR scene, or presented in any other novel way. Wayland is designed to be generic and widely applicable to many devices and form factors.” (from Interactive move and resize - The Wayland Protocol)

I use sway, so I call “swaymsg” from SC to position windows where I want them… but it is a very ugly hack

1 Like