Bug 467908 - QCompelter window display error if qt use qt.qpa.wayland plugins
Summary: QCompelter window display error if qt use qt.qpa.wayland plugins
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 5.27.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-29 01:27 UTC by liujie01
Modified: 2023-04-03 11:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liujie01 2023-03-29 01:27:49 UTC
SUMMARY
 In qt App using wayland display server(Set QT_QPA_PLATFORM to wayland)with a QLineEdit which has been set a QCompleter,if I type some words which is in the wordlist of QCompleter the QCompleter window should show under the QLineEdit, but some time it will show at error pos with error windowType(with title bar)。

STEPS TO REPRODUCE
1.  Type a word in QLineEdit to make the QCompleter show;
2.  Press down BackSpace will delete the word in QLineEdit and the QCompleter will hide;
3.  Keeping Press BackSpace, type a word make QCompleter show again, the QCompleter will show at error pos with error windowType(with title bar)

OBSERVED RESULT
 QCompleter will show at error pos with error windowType(with title bar).

EXPECTED RESULT
 QCompleter show without error.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  ubuntu 22.10
KDE Plasma Version: The latest version on ubuntu 22.10
KDE Frameworks Version: The latest version on ubuntu 22.10
Qt Version: The latest version on ubuntu 22.10

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2023-04-03 11:11:41 UTC
This will be a client side bug. 

--

Make sure you have called QWindow::setTransientParent on your popup.

Under wayland all popups need a parent. In Qtwayland given we can often not rely on transientParents being set properly a heuristic is used. If that fails (I don't know why, you'll have to debug that your side) it falls back to creating a new toplevel, the window with the title bar.