d2phap / d2phap/ImageGlass

Cursor jumps to upper left corner of image viewport if ImageGlass already open, does not move back to original cursor if moving, clicks at new position.

Open
#2,043 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug
Dominant language
C#
Stars
14.4k
Forks
752
Avg merge
10d 14h
Merged PRs (30d)
1

Description

System information
  • Windows OS version: Windows 10 Pro 22H2 19045.5131
  • ImageGlass version: 9.1.8.723 (64-bit)
  • ImageGlass release: Classic
To Reproduce

Steps to reproduce the behavior:

  1. Open ImageGlass / Open via associated image file in Windows Explorer.
  2. Open another image file via Windows Explorer whose extension is associated with ImageGlass.
  3. Move cursor immediately following double-click on image file.
Actual behavior
  • Initial ImageGlass opening does not move cursor at all visibly, whether directly or via opening of an associated image file.
  • All subsequent image opening flashes cursor briefly to the upper left corner of the viewport within ImageGlass before returning the cursor to its original position. Seems to be function to grab window focus.
  • If cursor is in motion after double-clicking the image file in Windows Explorer, the cursor can move outside of ImageGlass before the function completes, placing a non-user generated click outside of the application and preventing the cursor from moving back to the original location.
Expected behavior
  • Initial ImageGlass opening does not move cursor at all visibly, whether directly or via opening of an associated image file.
  • Subsequent image opening does not relocate cursor, does not click cursor on its own.
  • If cursor relocation is maintained as a function, self-click should interrupt if user movement has occurred.
Additional context

Does not appear to correlate with particular format or file.
Appears to originate in /Source/Components/ImageGlass.Base/WinApi/WindowApi.cs#L76

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting Source/Components/ImageGlass.Base/WinApi/WindowApi.cs around line 76, then reproduce the issue by opening a second associated image while moving the cursor. Trace the focus and cursor behavior during that path. Done means opening images no longer visibly relocates or clicks the cursor, or user movement interrupts any retained relocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.