diff options
| author | Felix Ernst <[email protected]> | 2025-01-04 18:58:22 +0100 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2025-01-06 15:09:14 +0000 |
| commit | bfeeb46c3ae0b6e933b0381cc10eebad38a2b8c0 (patch) | |
| tree | dcaf65988ce4738e4dcee13aa23d2fb54526bd45 /src/dolphindockwidget.h | |
| parent | 738a51dddd410ef0a639a8eddd5dc26b30dbfe48 (diff) | |
Fix focus changing when unminimising on X11
In f220e3b0783a24a6c7195f170297cf4b12a29d85 I made the keyboard
focus move to the places and terminal panel whenever they are
toggled visible. Unfortunately the QDockWidget::visibilityChanged()
signal is also emitted (at least on X11) simply when the window
containing that panel is minimized or restored. This commit
overrides the QDockWidget::event() method to ignore such
spontaneous show or hide events so QDockWidget won't emit the
visibilityChanged() signal then.
BUG: 497803
Diffstat (limited to 'src/dolphindockwidget.h')
| -rw-r--r-- | src/dolphindockwidget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dolphindockwidget.h b/src/dolphindockwidget.h index 114a11b55..127525b5a 100644 --- a/src/dolphindockwidget.h +++ b/src/dolphindockwidget.h @@ -27,6 +27,12 @@ public: void setLocked(bool lock); bool isLocked() const; +protected: + /** + * Make sure we do not emit QDockWidget::visibilityChanged() signals whenever Dolphin's window is minimized or restored. + */ + bool event(QEvent *event) override; + private: bool m_locked; QWidget *m_dockTitleBar; |
