SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** QScreen::availiableSize api on x11 environment will return rect without dock, but on wayland environment will return fullscreen size STEPS TO REPRODUCE use QScreen::availiableSize to get screen availiable size OBSERVED RESULT show fullscreen size with dock region EXPECTED RESULT show region except such as dock panel SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: 5.27.10 (available in About System) KDE Plasma Version: 5.27.10 KDE Frameworks Version: Qt Version: 5.12 ADDITIONAL INFORMATION
Can you explain why you need that information?
Regardless, since this is Qt API, isn't this a Qt bug?
(In reply to Vlad Zahorodnii from comment #1) > Can you explain why you need that information? I want my window to not extend onto the dock, so I want get availiableSize to limit my window geometry like x11
(In reply to Nate Graham from comment #2) > Regardless, since this is Qt API, isn't this a Qt bug? Although this is a Qt API, there is no related protocol on Wayland to pass this geometry.
(In reply to uniqueding from comment #3) > (In reply to Vlad Zahorodnii from comment #1) > > Can you explain why you need that information? > > I want my window to not extend onto the dock, so I want get availiableSize > to limit my window geometry like x11 It works slightly different on wayland. There's xdg_toplevel.configure_bounds https://wayland.app/protocols/xdg-shell#xdg_toplevel:event:configure_bounds kwin and qt support it. although I believe they are available only in plasma 6.
note that qt will take care of honoring xdg_toplevel.configure_bounds
To rephrase Vlad's comment, it means the window will be resized automatically, but you don't get this ahead of time in a useful way. It's a broken design, but we're limited within the scope of Wayland. Anything else needs to be taken up on the wayland-protocols repository.