31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 506baacdce54a39307fa01d296b8eb2b9850226e Mon Sep 17 00:00:00 2001
|
|
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
|
Date: Sat, 19 Aug 2023 16:03:29 +0800
|
|
Subject: [PATCH] fix(grab): keyboard not released when mouse capture failed.
|
|
cause keyboard cannot be typed
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
- 修复鼠标抓取失败时,未释放键盘.导致抓取判断为失败.导致后续键盘无法输入
|
|
---
|
|
src/grab/grab.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/grab/grab.cpp b/src/grab/grab.cpp
|
|
index e7fed6c..3c4a079 100644
|
|
--- a/src/grab/grab.cpp
|
|
+++ b/src/grab/grab.cpp
|
|
@@ -177,7 +177,7 @@ bool Grab::doGrab(WId wid, bool grabPointer)
|
|
{
|
|
int errCode = reply ? reply->status:1;
|
|
KLOG_WARNING() << "grab pointer to" << wid << "failed!" << getGrabError(errCode);
|
|
- xcb_ungrab_pointer(QX11Info::connection(), XCB_TIME_CURRENT_TIME);
|
|
+ xcb_ungrab_keyboard(QX11Info::connection(), XCB_TIME_CURRENT_TIME);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.33.0
|
|
|