Bug 148019 - kf5 Wayland: Menus are shown as decorated separate windows when LO window was not focussed
Summary: kf5 Wayland: Menus are shown as decorated separate windows when LO window was...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Wayland KDE, KF5
  Show dependency treegraph
 
Reported: 2022-03-15 19:46 UTC by Jan Rathmann
Modified: 2022-04-09 04:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast (8.36 MB, video/x-matroska)
2022-04-08 04:39 UTC, Michael Weghorn
Details
Screencast with Qt dev version (2.15 MB, video/x-matroska)
2022-04-08 04:56 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Rathmann 2022-03-15 19:46:57 UTC
Description:
See below.

Steps to Reproduce:
1. Run KDE Plasma (tested on 5.24), Wayland session
1. Open e.g. LibreOffice Writer
2. Open or switch to any other window (-> LibreOffice window loses focus)
3. Inside the unfocussed LO window, click on a menu (File, Edit, etc.)


Actual Results:
The menu appears in the centre of the screen and has a window decoration.

Expected Results:
It should appear as a menu, not as a window on its own.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
* I originally reported this on the KDE bug tracker and was told that this is likely a bug in LO: https://bugs.kde.org/show_bug.cgi?id=450637
* Happens the same on LO 7.2 on Kubuntu 21.10 and LO 7.3 on Kubuntu 22.04.
* Is reproducable with a live image in a VM (e.g. VirtualBox)
Comment 1 Michael Weghorn 2022-04-08 04:39:07 UTC
Created attachment 179390 [details]
Screencast
Comment 2 Michael Weghorn 2022-04-08 04:49:23 UTC
I can reproduce with current master on Plasma Wayland (Debian testing), qtbase 5.15.2+dfsg-15 or libqt6core6:amd64 6.2.2+dfsg-6, plasma-workspace-wayland 4:5.24.4-1.

Screencast: attachment 179390 [details]

It also happens with the qt6 VCL plugin. Also happens when choosing the gtk3 platform theme by setting env variable QT_QPA_PLATFORMTHEME=gtk3.

On my other computer, the menu opened on the top left edge of the second screen instead of in the middle, and I think I have seen the same behavior for Kate a few times, not just LibreOffice, but it works most of the time for Kate.

LibreOffice uses a native Qt menu, so this appears to be a Qt bug.

Actually, just now did I realize that it actually works when I use my local dev build of qt6 instead, so it seems to have been fixed there already.
I'll attach another screencast with that one.


Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: b426a8a4c672c20e515f1ce24404530748cc4df0
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: qt5 (qfont+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: b426a8a4c672c20e515f1ce24404530748cc4df0
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: qt6 (qfont+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 3 Michael Weghorn 2022-04-08 04:56:42 UTC
Created attachment 179391 [details]
Screencast with Qt dev version

This shows that it works with my self-compiled version of the current development version of Qt. Details of the status below.

Therefore, this looks like an already fixed Qt bug to me and I've closed this as NOTOURBUG. Should the bug still show up in your setup once you're using the qt6 (or then kf6) VCL plugin (to be seen in "Help" -> "About LibreOffice"), please reopen or create a new bug report.



michi@wegbook:~/development/git/qt5 (dev)$ git log -n1
commit d6a7527384a675fdc0a9d10fb3ae2f04208cea86 (HEAD -> dev, origin/dev, origin/HEAD)
Author: Heikki Halmet <heikki.halmet@qt.io>
Date:   Mon Apr 4 14:48:26 2022 +0300

    Make Windows 11 21H2 significant
    
    Pick-to: 6.3 6.2
    Task-number: QTQAINFRA-4673
    Change-Id: I7eebc889dbc9ecc7c741147a2703575b5bfeb04d
    Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
michi@wegbook:~/development/git/qt5 (dev)$ git submodule status 
-ec3b03ce4c6d20d3bef12d8e2599d4bb04c73c3a qt3d
-bfb51b1057cc7d0c9656b1b2989558dbb019e62d qt5compat
-48d5ab98b58d83b3709641b48f45208cf3ddb6c1 qtactiveqt
 2eb7a92aa373f10f4e6828dad640b393279637a3 qtbase (v6.0.0-beta5-6717-g2eb7a92aa3)
-1319e0965f6008f44f9216a7bb76e106a1710767 qtcanvas3d
-2618f6222990cfb0e1cf83928eb52c4d0a08d393 qtcharts
-400d6b7e685a89b67c96fb810d657326f81b4bd5 qtcoap
-c074ad95ec459f8d6bfb30799253e99971d8a9b7 qtconnectivity
-5c368d6a6753140465af3e8a7f66f50444b0840d qtdatavis3d
-e1ee2697ab48863c4f105bde066b1c22b65f093b qtdeclarative
-f7c628ad847efb839c64f2605038c39faaa1066d qtdoc
-9ac8d8c272fc93416016e094fc6b97226a400082 qtfeedback
-5fe6fd206f4aef1cb1ee9c328ee27e25e6b44f4a qtgamepad
-84393ba2b3347ca5de1eae6a720000e4941a9b19 qtimageformats
-51d48b5682356df058c584cd708d2dd2d2cd11dc qtlanguageserver
-7f6ee8fa23a92660c4728b950bb14a46d1ec6a5b qtlocation
-f7f4a035fdf969f292489dd066d60dd25a5f4a06 qtlottie
-a080da73bdee559aa9cafadd6b240be9bff2ceda qtmqtt
-36780742492c6f64cf13d79fe6b01ebc82ffd39c qtmultimedia
-c0797fd2ce96ae200fe781e66d5b10b457082681 qtnetworkauth
-dec0207f75d28fe3ad9defab716b20eeeed0966e qtopcua
-02efef5ee63bf2407526f81fd6b68f5a59ac1de3 qtpim
-644a9905b412f9484d2568e3d1759d620cd5c3e9 qtpositioning
-feeaef4a2147f7140e62d8569c0f712d20af401f qtqa
-91cb90a56159b2f408d0f3b149af148c4832c10f qtquick3d
-9e7784d4e8003a48f31721fb489151ba433ba775 qtquicktimeline
-14b9f1c9b42f0a77e455a187dc7942f2179a539c qtremoteobjects
-e3205793dc15bcc09a49f8080470169c6246a9c5 qtrepotools
-72267debea1eab54db02d0457b826f531b143bb4 qtscxml
-470a571d6268fdd9d1efbde89e466427211823ce qtsensors
-cfe8e23155e28a86ce21e10da702d68145b68080 qtserialbus
-60384a7babd3b6e74258ecd9bc5aae924eb769bb qtserialport
-0e47e21167e136d470ab5aadfdcecbb698b74127 qtshadertools
-25c1b5b74cc96ceaefeed6be76cda402f406a238 qtspeech
-f116f9ec244ca8dc37563b0aa4d817f63cb2370c qtsvg
-434af789f0d56ca7a521ca2d9ec8cf3b1057fd37 qtsystems
-fa7db21499a81e1176ea7a4dad4eb50bf89b90c8 qttools
-1dd0b181260130108a754e47aefa8299d02c42d1 qttranslations
-9c679ed59e2fed82a85d40a8925492c90e43df65 qtvirtualkeyboard
 bdf9580610455e3db4c8e98572afcce347c78ba5 qtwayland (v6.0.0-beta5-574-gbdf95806)
-6cd2f3e1980f32dd03ff36e2f33e653251d583a1 qtwebchannel
-3aef2f03c7e9e6fa5fe1e48c044a26a679a680c7 qtwebengine
-531fb30d539f09003946ab768873ef87e6117fa6 qtwebglplugin
-a7fefc3467310e50a5d13aca89896d633529f2fc qtwebsockets
-1f3021da4af9ad94aa54fef4b24fe7e17076c00d qtwebview
-05ab44484453673ee813bcac287fc9052ec9164f qtxmlpatterns
Comment 4 Michael Weghorn 2022-04-08 04:58:59 UTC
Side note: The the mouse cursor is shown weirdly in the OBS recording: LibreOffice window is on the right one of two screens. When I'm actually moving the mouse to the left screen to interact with other windows to move focus from the LO window, there's still a mouse cursor in the recording...