Don't close plasmoid when closing a subdialog
ClosedPublic

Authored by hein on Jan 17 2018, 2:44 PM.

Details

Summary

This patch redoes the fencing mechanism around
plasmoid.hideOnWindowDeactivate for window focus
handovers to be more reliable and generic. It's now
always disabled when a dialog is about to be
destroyed, and renabled on focus-in or when exiting
the root list. The dialog code is also fixed not
to close the plasmoid when it knows it's window
deactivation is part of its own destruction.

WindowSystem::monitorWindowFocus is also changed
to work in a single-shot sort of way, removing
the event filter again once it caught an event.

Fixes a refactoring regression from 84f1cb1c1.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hein created this revision.Jan 17 2018, 2:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 17 2018, 2:44 PM
hein requested review of this revision.Jan 17 2018, 2:44 PM
cfeck added a subscriber: cfeck.EditedJan 17 2018, 3:49 PM

This partly fixes the issue. After applying this I can still reproduce by moving the mouse from the list to the gap between the list and the search box.

ngraham edited the summary of this revision. (Show Details)Jan 17 2018, 4:56 PM
hein added a comment.Jan 18 2018, 1:27 PM
In D9945#192419, @cfeck wrote:

This partly fixes the issue. After applying this I can still reproduce by moving the mouse from the list to the gap between the list and the search box.

The gap between the list and the search box is in the top-level dialog, not a subdialog. This is not what this patch is about as per the description.

The issue you mention is a related thing as mentioned in the second paragraph. It will need a seperate patch as it's a seperate issue. Please ignore it in this review.

hein added a subscriber: ngraham.Jan 18 2018, 1:28 PM

@ngraham: "BUG:number" is the correct form, please don't add the spaces there :).

Sorry about that. I was going by https://community.kde.org/Policies/Commit_Policy#Special_keywords_in_GIT_and_SVN_log_messages, which lists them with spaces. between the colon and the number.

hein updated this revision to Diff 25639.Jan 19 2018, 1:04 PM

Address both bugs in one.

hein added a comment.Jan 19 2018, 1:05 PM

@ngraham: I guess both work but the non-space one is the historical one ... oh well :)

hein retitled this revision from Don't close plasmoid when closing a subdialog via index change in a parent subdialog to Don't close plasmoid when closing a subdialog.Jan 19 2018, 1:06 PM
hein edited the summary of this revision. (Show Details)

Sorry, please ignore the .desktop noise in review. I'll fix it on push.

mart accepted this revision.Jan 22 2018, 9:55 AM
mart added a subscriber: mart.
mart added inline comments.
kcms/keyboard/kcm_keyboard.desktop
126 ↗(On Diff #25639)

this shouldn't be in the final commit

This revision is now accepted and ready to land.Jan 22 2018, 9:55 AM
This revision was automatically updated to reflect the committed changes.