Summary: | [Wayland] Child toplevel window placement doesn't work | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Andrius Štikonas <andrius> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aspotashev, bugseforuns, fabian, kde, notuxius, null, soloturn, subdiff |
Priority: | NOR | Flags: | mgraesslin:
Wayland+
mgraesslin: X11- kde: ReviewRequest+ |
Version: | 5.12.4 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kwin/bdf348c603b8e342af2d6c97ab42b3703fd02813 | Version Fixed In: | |
Attachments: |
support information
Screenshot.png |
Description
Andrius Štikonas
2018-04-15 14:55:05 UTC
The placement strategies in general work - also on Wayland. If it doesn't work for you we need to figure out why. Can you post the support information? Created attachment 112045 [details]
support information
Where's your panel? (In reply to Martin Flöser from comment #3) > Where's your panel? At the bottom of the screen. Created attachment 112050 [details]
Screenshot.png
I did a few more comparisons between X11 and Wayland. I think it's actually just child windows that are placed on top left corner of the parent window. On X11 they are centred. I can also reproduce this on neon livecd (after installing plasma-wayland-desktop) Can reproduce - top left child windows placement - below the parent window titlebar: Plasma: 5.13.2 Apps: 18.04.2 Frameworks: 5.47.0 Qt: 5.11.1 Kernel: 4.18.0-1-MANJARO OS: Netrunner Rolling Video: Intel 4400 Driver: xf86-video-intel 1:2.99.917+831+ge7bfc906-1 Mesa 3D: 18.1.3 Screen: 1600x900 Xorg: 1.20 Wayland: 1.15.0-1 Wayland Protocols: 1.14-1 Child windows of Elisa player are opening in top left position of screen - not below the titlebar of parent window elisa-0.1.1-1 Updated Elisa - child windows are opening in top left, top right and bottom right screen position - after moving the main Elisa window elisa-0.2.0-1 (In reply to Alexander Mentyu from comment #9) > Updated Elisa - child windows are opening in top left, top right and bottom > right screen position - after moving the main Elisa window > > elisa-0.2.0-1 Elisa updates wouldn't help. That's not Elisa's problem. Windows are placed by kwin. *** Bug 375185 has been marked as a duplicate of this bug. *** If child windows of Elisa are missplaced that is Elisa's problem and not KWin's (In reply to Martin Flöser from comment #12) > If child windows of Elisa are missplaced that is Elisa's problem and not > KWin's So how can application position e.g. its about dialog? I don't think application controls that because if I choose centered window placement in system settings then it works. Or am I misunderstanding what child window in Elisa is (I haven't used it). Anyway my bug is not Elisa specific. A child window is from a window manager perspective a "transient". The application needs to tell that it is a transient and needs to provide a placement positioning hint. If it doesn't KWin will place the window given the placement strategy. So if a child window gets placed by KWin it is an application bug. (In reply to Martin Flöser from comment #14) > A child window is from a window manager perspective a "transient". The > application needs to tell that it is a transient and needs to provide a > placement positioning hint. If it doesn't KWin will place the window given > the placement strategy. So if a child window gets placed by KWin it is an > application bug. Ok, I agree. Then it is not bug in KWin. So from what you say it seems to me that every single Qt dialog created with new QDialog(this). Where is this set? QtWayland? Surely centered child windows would have been a better default... Or do we have to call some other function every time we create "new QDialog(this)"? (In reply to Andrius Štikonas from comment #15) > Ok, I agree. Then it is not bug in KWin. > > So from what you say it seems to me that every single Qt dialog created with > new QDialog(this). So from what you say it seems to me that this is a bug in every single Qt dialog created with new QDialog(this). This bug was meant to be about the placement of transients. I can reproduce the problem for example with the Help->About dialog of Dolphin. It is opened in the top-left corner, but should be positioned centered. So this means there is a bug in the handling of some Xdg shell version? I'm using Qt 5.11 and master Kwayland. no, it means that the about dialog does not get the correct hints. Might also be a bug in Qt. QT_WAYLAND_SHELL_INTEGRATION=wl-shell works though, dialogs are centered. This is the output with WAYLAND_DEBUG=1 | grep xdg; [4221669,270] zxdg_shell_v6@28.ping(4354) [4221669,320] -> zxdg_shell_v6@28.pong(4354) [4221669,811] zxdg_toplevel_v6@30.configure(0, 0, array) [4221669,861] zxdg_surface_v6@29.configure(4357) [4221669,884] -> zxdg_surface_v6@29.ack_configure(4357) [4222127,358] zxdg_shell_v6@28.ping(4361) [4222127,403] -> zxdg_shell_v6@28.pong(4361) [4222127,855] -> zxdg_shell_v6@28.get_xdg_surface(new id zxdg_surface_v6@51, wl_surface@46) [4222127,896] -> zxdg_shell_v6@28.create_positioner(new id zxdg_positioner_v6@53) [4222127,920] -> zxdg_positioner_v6@53.set_anchor_rect(612, 27, 1, 1) [4222127,962] -> zxdg_positioner_v6@53.set_anchor(5) [4222127,979] -> zxdg_positioner_v6@53.set_gravity(10) [4222127,997] -> zxdg_positioner_v6@53.set_size(339, 236) [4222128,026] -> zxdg_surface_v6@51.get_popup(new id zxdg_popup_v6@50, zxdg_surface_v6@29, zxdg_positioner_v6@53) [4222128,066] -> zxdg_positioner_v6@53.destroy() [4222128,082] -> zxdg_popup_v6@50.grab(wl_seat@6, 4362) [4222129,031] zxdg_popup_v6@50.configure(612, 27, 339, 236) [4222129,082] zxdg_surface_v6@51.configure(4363) [4222129,108] -> zxdg_surface_v6@51.ack_configure(4363) [4224958,779] -> zxdg_popup_v6@50.destroy() [4224958,804] -> zxdg_surface_v6@51.destroy() [4225095,841] -> zxdg_shell_v6@28.get_xdg_surface(new id zxdg_surface_v6@79, wl_surface@74) [4225095,877] -> zxdg_surface_v6@79.get_toplevel(new id zxdg_toplevel_v6@78) [4225095,884] -> zxdg_toplevel_v6@78.set_parent(zxdg_toplevel_v6@30) [4225095,891] -> zxdg_toplevel_v6@78.set_title("Über Kate") [4225095,897] -> zxdg_toplevel_v6@78.set_app_id("org.kde.kate") [4225260,576] zxdg_toplevel_v6@78.configure(0, 0, array) [4225260,587] zxdg_surface_v6@79.configure(4373) [4225260,595] -> zxdg_surface_v6@79.ack_configure(4373) *** Bug 373454 has been marked as a duplicate of this bug. *** *** Bug 374669 has been marked as a duplicate of this bug. *** This bug has gotten quite confusing, there's talk about toplevels on top of toplevels (i.e dolphin's help-> about) and there's a trace from popups in another app. The two are very different. I'm going to make this bug purely about toplevel on toplevel with a parent set. (and I can see an obvious bug there) @fvogt if you have any popup bugs can you make a new report. Git commit bdf348c603b8e342af2d6c97ab42b3703fd02813 by David Edmundson. Committed on 23/10/2018 at 11:37. Pushed by davidedmundson into branch 'master'. [wayland] Set better placement for XDG Toplevels Summary: XDG Popups will have a transient parent and positional information. XDG Toplevels can have a transient parent without having positional information. Currently we set that we have a transient placement hint of 0,0 which means the newly opened children go to the top left of the parent. This new code paths treat child top levels as dialogs centering them to the parent. Test Plan: Dolphin help->about Appeared where it does on X Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16293 M +2 -0 placement.cpp https://commits.kde.org/kwin/bdf348c603b8e342af2d6c97ab42b3703fd02813 |