36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
From 78d16412005f188c799dbf80bc9072bc77471fe2 Mon Sep 17 00:00:00 2001
|
|
From: yangfeng <yangfeng@kylinsec.com.cn>
|
|
Date: Mon, 11 Dec 2023 10:49:16 +0800
|
|
Subject: [PATCH 0/5] fix(tasklist-app-button):Fix touch screen taskbar button
|
|
click judged as drag
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
- 修复触摸屏任务栏按钮点击被判定为拖动
|
|
|
|
Related #23600
|
|
---
|
|
src/tasklist/tasklist-app-button.cpp | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/tasklist/tasklist-app-button.cpp b/src/tasklist/tasklist-app-button.cpp
|
|
index cd8b2c3..15c8cb0 100644
|
|
--- a/src/tasklist/tasklist-app-button.cpp
|
|
+++ b/src/tasklist/tasklist-app-button.cpp
|
|
@@ -397,6 +397,11 @@ void TasklistAppButton::on_gesture_drag_update(double x, double y)
|
|
{
|
|
Gtk::Allocation allocation;
|
|
|
|
+ if (x < 10 && y < 10)
|
|
+ {
|
|
+ return;
|
|
+ }
|
|
+
|
|
/* 设置拖动过程中的光标样式 */
|
|
auto cursor = Gdk::Cursor::create(get_display(), "move");
|
|
get_window()->set_cursor(cursor);
|
|
--
|
|
2.27.0
|
|
|