Fix KCompletionBox on wayland
ClosedPublic

Authored by apol on Apr 22 2018, 2:20 PM.

Details

Summary

On wayland it would immediately disappear, now it doesn't anymore.

Test Plan

Tried kcompletionuitest on xcb and wayland

Diff Detail

Repository
R284 KCompletion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Apr 22 2018, 2:20 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 22 2018, 2:20 PM
apol requested review of this revision.Apr 22 2018, 2:20 PM
davidedmundson accepted this revision.Apr 22 2018, 4:56 PM

It's a bit cheeky, but it's the only soltuion that doesn't require an invasive patch inverting the way input is eventFiltered.

This revision is now accepted and ready to land.Apr 22 2018, 4:56 PM

Why not

static const auto flags = qGuiApp->platformName() == QLatin1String("wayland") ? Qt::WindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint) :
                                                                                Qt::WindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint);
q->setWindowFlags(flags);

It's not need to check in every completion construction.

apol added a comment.Apr 22 2018, 5:35 PM

Why not

static const auto flags = qGuiApp->platformName() == QLatin1String("wayland") ? Qt::WindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint) :
                                                                                Qt::WindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint);
q->setWindowFlags(flags);

It's not need to check in every completion construction.

It's not blocking or anything, I don't see a reason to cache the value.

This revision was automatically updated to reflect the committed changes.