Skip to content

update keyboard focus when grabbing popup closed

Liu Jie requested to merge kylinliujie/kwin:work/liujie01 into master

For example, a wayland qt widget has an qlineedit with qcompleter.

  1. Input some words make qcompleter's popup window show. PopupInputFilter::keyEvent will set keyboard focus on the qcompleter's popup window.
  2. Continue to press a key which can make the qcompleter's popup window hidden and do not release it.
  3. Press the backspace key to make the qcompleter's popup window show again.

Result: Qcompleter's popup window will be created as an independent xdg_toplevel. This is because QT sets the surface of the focused window as the transient parent window of the popup window. If not found, QT will create a independent toplevel window. After step 2, the focused window is the qcompleter's popup window which has be hidden. QT can not find the transient parent of the qcompleter's popup window, finally creat the popup window as a independent xdg_toplevel.

Signed-off-by: Liu Jie liujie01@kylinos.cn

Edited by Liu Jie

Merge request reports