Bug 155320 - After using the arrow keys to move the cursor, a "shadow" of the cursor will stay in place (Skia / Vulkan)
Summary: After using the arrow keys to move the cursor, a "shadow" of the cursor will ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 157251 (view as bug list)
Depends on:
Blocks: Skia
  Show dependency treegraph
 
Reported: 2023-05-15 12:20 UTC by tumbleweed1024
Modified: 2024-05-06 15:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
截图 (246.59 KB, image/png)
2023-05-16 02:25 UTC, tumbleweed1024
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tumbleweed1024 2023-05-15 12:20:34 UTC
Description:
鼠标点选一段文字的某个位置的同时,使用方向键向左或向右移动光标,光标会在原地留下未刷新的残影

Steps to Reproduce:
1.鼠标点选一段文字的某个位置的同时,使用方向键向左或向右移动光标
鼠标点击比方向键移动稍晚一点

Actual Results:
光标在原地留下未刷新的残影

Expected Results:
光标正常移动


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: zh-CN
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Eike Rathke 2023-05-15 12:30:41 UTC
Description.
Use the arrow keys to move the cursor to the left or right while clicking on a position in the text, the cursor will leave an unrefreshed shadow in place.

Steps to Reproduce.
1. Use the arrow keys to move the cursor left or right while the mouse clicks on a position in the text.
The mouse click is a little later than the arrow keys.

Actual Results.
The cursor leaves an unrefreshed shadow in place

Expected Results.
Cursor moves normally

Translated with www.DeepL.com/Translator (free version)
Comment 2 Stéphane Guillou (stragu) 2023-05-15 14:37:31 UTC
Thank you for the report.
Can you please share:
- a screenshot of the issue
- the information copied from Help > About LibreOffice

I have seen something similar in recent versions but was unable to reproduce.

Not reproduced in:

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you!
Comment 3 tumbleweed1024 2023-05-16 02:25:37 UTC
Created attachment 187316 [details]
截图

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded
Comment 4 QA Administrators 2023-05-16 03:18:17 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2023-05-17 06:19:45 UTC Comment hidden (obsolete)
Comment 6 tumbleweed1024 2023-05-17 06:41:06 UTC
The problem is resolved when undoing "use Skia for all rendering".

Thanks!
Comment 7 V Stuart Foote 2024-05-06 11:08:29 UTC
*** Bug 157251 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2024-05-06 11:13:05 UTC
Ghost cursor residuals with Skia lib Vulkan GPU rendering. The macOS issues with Skia Metal alone were resolved for bug 153306
Comment 9 Patrick Luby (volunteer) 2024-05-06 14:01:00 UTC
Don't know if this will fix this bug, but if anyone has a Windows or Linux build, you might try using the same fix as I used for Skia/Metal on macOS. The following debug patch should enable the macOS fix for Skia/Vulcan:

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 4c34d9ab2870..030bcefd9b2a 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1509,7 +1509,6 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
                                                     SkSamplingOptions()));
             }
 
-#ifdef SK_METAL
             // tdf#153306 prevent subpixel shifting of X coordinate
             // HACK: for some unknown reason, if the X coordinate of the
             // path's bounds is more than 1024, SkBlendMode::kExclusion will
@@ -1527,7 +1526,6 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
                 aMatrix.set(SkMatrix::kMTransX, -0.001);
                 getDrawCanvas()->concat(aMatrix);
             }
-#endif
         }
         getDrawCanvas()->drawPath(aPath, aPaint);
     }
Comment 10 Julien Nabet 2024-05-06 15:36:50 UTC
(In reply to Patrick Luby (volunteer) from comment #9)
> Don't know if this will fix this bug, but if anyone has a Windows or Linux
> build, you might try using the same fix as I used for Skia/Metal on macOS.
> The following debug patch should enable the macOS fix for Skia/Vulcan:
> ...
I can just confirm it builds on pc Debian x86-64 with master sources updated today but for the rest I can't tell more.