get rid of manual window flags setting on controller
ClosedPublic

Authored by mart on Jun 27 2017, 8:46 AM.

Details

Summary

with Qt 5.9, the panel controller can't get focus, so
it can't be dismissed by clicking anywhere, (couldn't
figure out what was the commit that caused the regression)
removing the manual setting of flags seems to fix it,
while the behavior seems unaltered with Qt 5.7 and 5.8

Test Plan

tested on machines with Qt 5.7, 5.8 and 5.9 installed

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Jun 27 2017, 8:46 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 27 2017, 8:46 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Any idea why it was set to not take focus in the first place?

What makes the other 2 flags redundant?

mart added a comment.Jun 27 2017, 12:46 PM

Any idea why it was set to not take focus in the first place?

What makes the other 2 flags redundant?

it's ~Qt::WindowDoesNotAcceptFocus so the idea was to make it take focus again after it was set to dock.

being set to dock as far i know is to make kwin never attempt to position the window itself

David in Latte we solved this by keeping the flag but removing the dock type for the configuration window and of course keep also the keepabove

David in Latte we solved this by keeping the flag but removing the dock type for the configuration window and of course keep also the keepabove

That was about the missing clicks?

That was about the missing clicks?

Sorry if I understood wrongly the case... we did this for config window in wayland in order to receive the focuslost event and close itself

mart added inline comments.Jun 30 2017, 3:05 PM
shell/panelconfigview.cpp
69

note: removing the whole line seems to be necessary as seems that setting any flag does break focus

davidedmundson accepted this revision.Jun 30 2017, 5:22 PM
davidedmundson added inline comments.
shell/panelconfigview.cpp
69

I can see why it would break KeepAbove.

QXcbWindow::setWindowFlags explicitly sets setNetWmStateWindowFlags without reading it from the window first.

This revision is now accepted and ready to land.Jun 30 2017, 5:22 PM
This revision was automatically updated to reflect the committed changes.