1 Star 0 Fork 23

zhangxingrong/mutter

forked from src-openEuler/mutter 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Do-not-wrongly-set-window-as-not-alive-when-pings-are-disabled.patch 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxingrong 提交于 2024-07-31 17:51 . add some upstream patchs
From eee5eab85b54c5337dc7a2940fdda922655c49a7 Mon Sep 17 00:00:00 2001
From: Sebastian Keller <skeller@gnome.org>
Date: Tue, 7 Nov 2023 00:23:19 +0100
Subject: [PATCH] delete: Don't wrongly set window as not alive when pings are
disabled
meta_display_ping_window() does nothing when check-alive-timeout is set
to 0, but meta_window_check_alive_on_event() was relying on it to reset
the events_during_ping. Without this events_during_ping was just
counting up until the threshold was reached and the window was marked as
not alive, preventing further pointer events from being sent to the
window.
Fix this by not doing anything in meta_window_check_alive_on_event() if
check-alive-timeout is 0, similar to meta_display_ping_window().
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3142
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3367>
(cherry picked from commit d978ab189012317f64dbc8f519393bb1456d9ba5)
---
src/core/delete.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/core/delete.c b/src/core/delete.c
index 1270ea0899..888bf18620 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -96,9 +96,15 @@ void
meta_window_check_alive_on_event (MetaWindow *window,
uint32_t timestamp)
{
+ unsigned int check_alive_timeout;
+
if (!meta_window_can_ping (window))
return;
+ check_alive_timeout = meta_prefs_get_check_alive_timeout ();
+ if (check_alive_timeout == 0)
+ return;
+
meta_display_ping_window (window, timestamp);
window->events_during_ping++;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxingrong/mutter.git
git@gitee.com:zhangxingrong/mutter.git
zhangxingrong
mutter
mutter
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385