This restores proper layering behaviour on Mac, fixing the regression described in the linked bug report (which has screenshots).
BUG: 387796
(https://bugs.kde.org/show_bug.cgi?id=387796)
Frameworks |
This restores proper layering behaviour on Mac, fixing the regression described in the linked bug report (which has screenshots).
BUG: 387796
(https://bugs.kde.org/show_bug.cgi?id=387796)
Changing the window type from Qt::Window to Qt::Dialog was the last tweak I tried and the only one that causes the completion list to display in front of the grandparent window in all known situations on Mac/Cocoa, Mac/X11 and Linux/X11 (even an explicit raise() in the evidently locations had no effect).
It seems thus safe to apply unconditionally, or else with a simple #ifdef Q_OS_MACOS .
Lint Skipped |
Unit Tests Skipped |
kurlrequestertest_gui on Mac, unpatched frameworks 5.38, Qt 5.8.0:
idem, with this patch:
src/kcompletionbox.cpp | ||
---|---|---|
68 | This looks wrong to me, it's not a dialog. Can you try q->setWindowFlags(q->windowFlags() | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint); or Qt::Popup | ... |
This looks wrong to me, it's not a dialog
But how often is the parent not a dialog?
I don't notice any difference under X11 whether I use Qt::Window or Qt::Dialog, apparently those are effectively equivalent in this situation. But they're clearly not on Mac.
My guess would be that if the parent has some sort of modal character the completion box should have at least that too ... or else it will remain behind the parent.
q->setWindowFlags(q->windowFlags() | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint);
With this the completion box doesn't even appear.
or Qt::Popup | ...
This steals focus (on Mac/Cocoa and even grabs the keyboard under Mac/X11).
Did you try either of your suggestions yourself? It'd be more efficient if you didn't ask me to try all kinds of alternatives that don't work on your end ;)
When you test with open completion box minimize or switch window (alt+tab) should dismiss it.
Esc should too.
No :) I suggest you because you're on.
Well, I could test anything but there isn't much point in testing something we already know won't work elsewhere. It's not like I can test multiple systems at once either.