Bug 2239016 - Plasma(Wayland) does not honor window positioning when setting window geometry
Summary: Plasma(Wayland) does not honor window positioning when setting window geometry
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kwin
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-14 19:37 UTC by Steven A. Falco
Modified: 2024-05-31 08:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-31 08:30:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
freedesktop.org Gitlab wayland wayland-protocols merge_requests 264 0 None opened staging: Add xdg-placement protocol for window positioning in "zones" (v2) 2024-01-31 05:05:04 UTC

Description Steven A. Falco 2023-09-14 19:37:08 UTC
If I launch a window and specify the window size and position, the window is of the correct size, but the position that I specify is ignored.  Here is a command that should put a window on my second (right hand) screen, specifically at coordinates X=3754, Y=870.  But instead, the window pops up in the upper left of the first (left hand) screen:

/usr/bin/konsole --qwindowgeometry 675x678+3754+870 &


Reproducible: Always

Steps to Reproduce:
1.Run the above command on a system with multiple screens.
2.
3.
Actual Results:  
Wayland ignores the requested placement.

Expected Results:  
Wayland honors the requested placement.

Comment 1 Nate Graham 2023-09-15 17:19:42 UTC
I'm afraid this is simply how things work on Wayland: traditional draggable windows aren't allowed to determine their own position; the compositor is exclusively in charge of that.

There are some exceptions and workarounds for non-traditional windows like DE Panels, drop-downs like for KRunner or Yakuake, full-screen overlays, etc. Using the xdg-shell and layer-shell protocols which go through the compositor, they can be positioned manually, relative to known parts of the screen. However those protocols are not intended for traditional app windows you can drag around.

Comment 2 Alessandro Astone 2024-01-30 15:43:35 UTC
To expand on "this is simply how things work on Wayland": it means it is an active design choice to not allow clients to position themselves, not a missing feature or a bug.

However, KWin allows the user to set the initial position of a specific window every time it is launched: look for "Window Rules" in the system settings.

Comment 3 Neal Gompa 2024-01-31 05:05:04 UTC
There is also upstream Wayland protocol discussion about supporting some way to do this: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264

Comment 4 Neal Gompa 2024-02-08 16:19:52 UTC
(In reply to Steven A. Falco from comment #0)
> If I launch a window and specify the window size and position, the window is
> of the correct size, but the position that I specify is ignored.  Here is a
> command that should put a window on my second (right hand) screen,
> specifically at coordinates X=3754, Y=870.  But instead, the window pops up
> in the upper left of the first (left hand) screen:
> 
> /usr/bin/konsole --qwindowgeometry 675x678+3754+870 &
> 

Out of curiosity, why do you do it this way verses using KWin's window rules mechanism? Is there a specific use-case you're missing here?

Comment 5 Steven A. Falco 2024-02-08 16:31:54 UTC
My understanding is that that mechanism will work fine for a single konsole window.  I don't see how to use those rules for multiple copies of konsole.  Here is more of the script that I use to launch konsole windows today:

/usr/bin/konsole --qwindowgeometry 675x678+2356+870 &
/usr/bin/konsole --qwindowgeometry 675x678+3054+870 &
/usr/bin/konsole --qwindowgeometry 675x678+3754+870 &
/usr/bin/konsole --qwindowgeometry 675x678+1920+0 &
/usr/bin/konsole --qwindowgeometry 1757x1468+2614+0 &

Is there a way to do that with the rules you mentioned?

Comment 6 Aoife Moloney 2024-05-31 08:30:40 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.