Skip to content

Commit

Permalink
fix: The completerView is hidden on input
Browse files Browse the repository at this point in the history
On wayland `Qt::ActiveWindowFocusReason` is triggered again!

Log: fix completerView is hidden on input

Bug: https://pms.uniontech.com/bug-view-249081.html
  • Loading branch information
Johnson-zs committed Apr 9, 2024
1 parent 5af6f89 commit c6563f7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ void AddressBar::focusOutEvent(QFocusEvent *e)
// out event, so we comment out this case for now and see if it still happens.
// fix bug#38455 文管启动后第一次点击搜索,再点击筛选按钮,会导致搜索框隐藏
// 第一次点击筛选按钮,会发出Qt::OtherFocusReason信号导致搜索框隐藏,所以将其屏蔽
if (/*e->reason() == Qt::ActiveWindowFocusReason || */ e->reason() == Qt::PopupFocusReason || e->reason() == Qt::OtherFocusReason) {
// zhangs: 2024/04/09:On wayland `Qt::ActiveWindowFocusReason` is triggered again! (bug-249081)
if (e->reason() == Qt::ActiveWindowFocusReason || e->reason() == Qt::PopupFocusReason || e->reason() == Qt::OtherFocusReason) {
e->accept();
setFocus();
return;
Expand Down

0 comments on commit c6563f7

Please sign in to comment.