Bug 430376 - QWidget doesn't correctly open in full screen on specific monitor if told to do so on Wayland
Summary: QWidget doesn't correctly open in full screen on specific monitor if told to ...
Status: REOPENED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.19.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-14 14:19 UTC by Michael Weghorn
Modified: 2022-06-05 06:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Sample program to reproduce the issue (474 bytes, text/x-c++src)
2020-12-14 14:19 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2020-12-14 14:19:44 UTC
Created attachment 134071 [details]
Sample program to reproduce the issue

SUMMARY

In a dual screen setup, trying to open a QWidget in full screen on a specific monitor does not work on Wayland, which breaks e.g. LibreOffice Impress presentation mode.

STEPS TO REPRODUCE
0. use KDE Plasma Wayland with a dual screen setup
1. compile and run the attached sample program "main.cpp" (source code also given below)
2. run the program

OBSERVED RESULT

Two white/empty widgets open in full screen on the first/same screen.

EXPECTED RESULT

One full screen widget on each  of the two screens.

SOFTWARE/OS VERSIONS

Operating System: Debian GNU/Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.9.0-4-amd64
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-9850H CPU @ 2.60GHz
Memory: 62.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

ADDITIONAL INFORMATION

* It works as expected when run with env variable 'QT_QPA_PLATFORM=xcb' set, i.e. using XWayland.
* My setup for testing includes a laptop with an internal screen + an attached external screen, both with a resolution of 1920x1080.
* This was originally reported as a LibreOffice Impress bug at https://bugs.documentfoundation.org/show_bug.cgi?id=128214
* The LibreOffice scenario works fine when using LibreOffice with the gtk3 integration ("VCL plugin") on GNOME Wayland, but not when using the gtk3 integration on Plasma Wayland either (tested with LibreOffice from Debian testing, package version 7.0.3-4+b1).
* Sample program:

#include <QApplication>
#include <QScreen>
#include <QWidget>
#include <QWindow>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    for (QScreen* screen : qApp->screens()) {
        QWidget * widget = new QWidget;
        widget->show();
        QRect screenGeometry = screen->geometry();
        widget->windowHandle()->setScreen(screen);
        widget->move(screenGeometry.topLeft());
        widget->showFullScreen();
    }

    return a.exec();
}
Comment 1 David Edmundson 2021-02-02 17:56:40 UTC
This is fixed in QtWayland.
Not in 5.15.2 though.

There's nothing we can do our side.
Comment 2 ybx332 2022-06-05 06:32:58 UTC
(In reply to David Edmundson from comment #1)
> This is fixed in QtWayland.
> Not in 5.15.2 though.
> 
> There's nothing we can do our side.

So could you please tell me which version it is fixed in? My distribution is packaging qt5.15.4 and qt6, so I can request them to package the correct version with the fix included.