Bug 129071 - Transient windows / dialogs are not ignored in the task bar
Summary: Transient windows / dialogs are not ignored in the task bar
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Jan-Marek Glogowski
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2019-11-28 06:15 UTC by Jan-Marek Glogowski
Modified: 2019-12-09 16:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2019-11-28 06:15:38 UTC
Description:
While cleaning up my mail I stumbled over bug 125921 comment 10, which was added after the bug was closed. A little quote from the comment: "I tested 6.3 ... [but] the Open/Save file dialog still shows up as "soffice.bin" and as a result creates a second entry in the taskbar when it is invoked."

For me it's not just the file picker, but also all other dialogs I could test. Doesn't matter if the are modal or not, doesn't matter if they are transient or not. This happens in LO KF5 only. Other KDE apps, like kate, won't have separate entries in the task bar for opened dialogs or file pickers. Same for the gen and gtk3 backends. Oh - and I noticed before, that there is something broken with the transient setting wrt Qt5. If one opens "About Libre Office" and clicks on the start center => not so nice flickering.

Finding the origin of this problem was a longer journey of comparing xprops of windows, reading the Xcb Qt backend and identifying (now fixed) Qt bugs and in the end drawing the right conclusions.

Long story short: the KDE task bar ignores dialogs, which are transient to a main window and grouped.

Huh - but LO qt5 sets transiency and also WM_CLIENT_LEADER, like gtk3 or gen. Yes, but Qt Xcb is a little picky for which Qt::WindowType's it will really tell the window manager about the transient state (xprop WM_TRANSIENT_FOR; if you're curious look for the little isTransient function in Qt5's source). Qt::Window is not in that list, and the dialogs I tested all have no SalFrameStyleFlags::DIALOG set. On top of it is QTBUG-46626, which I originally thought to be the problem, before actually checking kate, and were I already implemented a "non-working" fix (the fix works to set the missing WM_HINTS window group, but it doesn't fix this problem).

The other half of the story is the file picker, which just runs in application modal state, but also with no parent. I have an older patch for that too, but that needs some "dedusting".

Time for some sleep.

Steps to Reproduce:
1. Open any LO dialog, like "About LO" or the file picker


Actual Results:
The dialog shows up as a separate taskbar entry.

Expected Results:
The dialog doesn't shows up as a separate taskbar entry.


Reproducible: Always


User Profile Reset: No



Additional Info:
I didn't really check, but I guess it's broken since qt5 was added.
Comment 1 Michael Weghorn 2019-11-28 15:48:36 UTC
Confirmed for the "Help" -> "About LibreOffice" dialog with KDE Plasma on Debian testing and

Version: 6.5.0.0.alpha0+
Build ID: 141c34f559e9d1d6a8e2a40d9787331621a75e53
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: kf5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Commit Notification 2019-12-06 11:59:39 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d8e3a08f06dcfea02c3f2f2a8578486381d77df7

tdf#129071 Qt5 handle windows with parents as dialogs

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2019-12-06 15:22:42 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/61cd5e13368bf7511fef519d7cefaa43d6094cb6

tdf#129071 Qt5 handle windows with parents as dialogs

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2019-12-09 14:33:45 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d79a41a02cd46c50cab08ba1a5d5b213b6843251

tdf#129071 Qt5 set file picker parent widget

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2019-12-09 16:19:22 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/e756a570cc18427a4ad61af15c42e3d8d54beb13

tdf#129071 Qt5 set file picker parent widget

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.