Bug 488616 - It should not be possible to close a non-closable floating QDockWidget with keyboard shortcuts
Summary: It should not be possible to close a non-closable floating QDockWidget with k...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-17 10:18 UTC by Tobias Leupold
Modified: 2024-06-17 12:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2024-06-17 10:18:27 UTC
Hi all :-)

This surfaced in Bug #488597.

The problem is that a QDockWidget that is declared as non-closable but as floatable cannot be closed by clicking an "X" button (it's omitted then), but one can actually close such a floating dock nevertheless by using a keyboard shortcut (Alt+F4).

After that, there's no way to re-show that closed dock, as the menu bar's context menu containing checkboxes for all dock widgets is grayed out (it becomes enabled when adding docks with the "QDockWidget::DockWidgetClosable" feature set). The only way to get the dock back is to delete the window state from the rc file (in case of KGeoTag, as the default dock arrangement will be restored then).

My understanding is that a QDockWidget that is marked as not closable should not only not be closable by omitting the "X"/"Close" button, but also an attempt to close it using keyboard shortcuts should be ignored, to also prevent it from closing this way.

Cheers, Tobias
Comment 1 Zamundaaa 2024-06-17 11:31:15 UTC
Please report this to Qt, it's up to it to ignore the close request if it's inappropriate for the window
Comment 2 Tobias Leupold 2024-06-17 12:48:16 UTC
Sorry, I thought this was a window manager issue. Reported as https://bugreports.qt.io/browse/QTBUG-126418