Skip to content

Commit 0b65191

Browse files
authored
[0702] fix: ImGui 中协作多光标颜色异常 (#4201)
1 parent 24a2285 commit 0b65191

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

devel/0702.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# [0702] fix: ImGui 中多光标颜色异常
2+
## 如何测试
3+
```
4+
xmake f --loro=yes --qt_frontend=no
5+
xmake b stem
6+
xmake r stem
7+
```
8+
多个客户端,测试协同编辑中光标颜色可见

src/Plugins/ImGui/im_gui.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,11 @@ void
484484
gui_open (int& argc, char** argv) {
485485
(void) argc;
486486
(void) argv;
487+
// 补初始化全局颜色常量(red/blue/... 等 moebius 全局 color)。X11 移除后原
488+
// 初始化路径已断,Qt 在 qt_gui.cpp 的 gui_open 里补了;ImGui 此前漏补,导致
489+
// 这些常量保持零初始化,peer_color() 返回 0、remote 协作光标被画成全透明
490+
// (alpha=0)而不可见。
491+
initialize_colors ();
487492
// The guard makes repeated calls harmless
488493
if (!s_glfw_initialized) {
489494
glfwSetErrorCallback (&im_glfw_error_callback);

0 commit comments

Comments
 (0)