Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cursor is not properly mapped to the window #1625

Open
1 task
Unknown78 opened this issue Apr 1, 2024 · 18 comments
Open
1 task

[Bug] Cursor is not properly mapped to the window #1625

Unknown78 opened this issue Apr 1, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@Unknown78
Copy link

Unknown78 commented Apr 1, 2024

List of GPUs that work/don't work

CPU GPU Works?
i3-2310M HD Graphics 3000
i3-5005U HD Graphics 5500
i5-7300HQ HD Graphics 630 ✔️
i5-7300U HD Graphics 620 ✔️
i5-8250U UHD Graphics 620
i3-3110M HD Graphics 4000
i5-4690 HD Graphics 4600
i7-4900MQ HD Graphics 4600
i7-6700HQ HD Graphics 530

Operating System

Windows

What's the issue you encountered?

Screenshot 2024-04-01 163157

The GUI elements appears to be misaligned.
However, the mechanics such as click or drag is in the original correct position.
So for example, if I want to click the exit button, then I need to hover it to the top right corner instead of the rendered one.

How can the issue be reproduced?

Just run imhex-gui.exe

ImHex Version

1.33.2

ImHex Build Type

  • Nightly or built from sources

Installation type

imhex-1.33.2-Windows-Portable-x86_64.zip

Additional context?

image
image

Pay attention that with the unofficial drivers, it supports 100% up to OpenGL 3.1 instead of the default Microsoft GDI Generic renderer that is OpenGL 1.1.

@Unknown78 Unknown78 added the bug Something isn't working label Apr 1, 2024
@Unknown78
Copy link
Author

Do you have any other solution other than the one in #442 ?

@Unknown78
Copy link
Author

Unknown78 commented Apr 1, 2024

UPDATE

Even better solutions if this is your first portable installation/extraction

  1. Run imhex-gui.exe, then Close Window or End Task of it from the Taskbar.
  2. Go to the config directory and open settings.json
  3. Find "hex.builtin.setting.interface.native_window_decorations" and change the false to true
  4. Run imhex-gui.exe again.
  5. Enjoy.

ImHex needs to be launched for the first time in order for it to create the settings.json file that we can edit.


I've just found the workaround.
It's rather annoying to find it, but hey it's working.

Extras > Settings > Interface > Window > Check Use OS Window Decorations
And then restart the program.
You don't need to click the exit button x and then click Yes to restart it within the program, just End Task within the Taskbar and then run it again shall suffice.

Screenshot 2024-04-01 165238

@Unknown78
Copy link
Author

Will there be any negative impact if Use OS Window decorations is enabled?

@csBlueChip
Copy link

I can verify that Extras > Settings > Interface > Window > Check Use OS Window Decorations > Restart the program from the task bar solves the issue. Should probably make this default.

NB. When clicking the above options, ignore your mouse pointer, and watch for options to highlight when you are "near" the option.

@WerWolv
Copy link
Owner

WerWolv commented Apr 16, 2024

It used to be auto disabled on Intel GPUs because it's exclusively an issue with their driver. I rather improve the detection than just having it turned off by default because it works without issues in almost all cases.

@Unknown78
Copy link
Author

Unknown78 commented Apr 17, 2024

@WerWolv By auto disabled, do you mean that by default the value of native_window_decorations was true or false?

@kiraio-moe
Copy link

kiraio-moe commented May 16, 2024

Thanks @Unknown78, it does the job 👍

@iTrooz iTrooz changed the title [Bug] GUI is messed up [Bug] Cursor is not properly mapped to the window Jun 22, 2024
@iTrooz
Copy link
Collaborator

iTrooz commented Jun 22, 2024

IMO the solution would be to enable the option by default, simply because that means less things to handle for us (ImHex is a Hex editor, let the OS handle the window)

But I'm not against any other solution (e.g. better detection)

@WerWolv
Copy link
Owner

WerWolv commented Jun 22, 2024

I think the first step to solving this would require getting some old laptop or something to reproduce the issue reliably. The reason why I never had a go at it anymore is because it just works on all my machines.

Up until a few versions ago I just disabled the custom window rendering for all Intel GPUs. This solves the issue but it's too broad of a condition. I've used ImHex on many computers that only had an Intel HD GPU without any issues so it only applies to either Intel HD GPUs of certain models or if there's some specific setting set in the driver I guess.
Until we either figure out the root cause of it or have a way to circumvent it somehow, I'd suggest we try to build a blacklist. As a start we should probably auto disable the setting if we detect a Intel HD GPU of Gen 6 or lower and from there on fine-tune until we find a pattern.

Of course this solution is far from perfect but I really want to keep the custom window rendering by default because in my opinion it makes the whole app look and feel a lot better

@Unknown78
Copy link
Author

@WerWolv Just make a survey then?

I have i3-2310M with Intel HD 3000 with unofficial driver to support 100% OpenGL 3.1 in Windows 11

Which GPU do you have @csBlueChip @iTrooz @kiraio-moe @dmantisk?

@WerWolv WerWolv pinned this issue Jun 22, 2024
@WerWolv
Copy link
Owner

WerWolv commented Jun 22, 2024

Let's do that. I'll keep the issue pinned for the foreseeable future and will manually filter out reported GPUs until we find a better solution. For now, this here should "solve" the issue for new users: a991557

@kiraio-moe
Copy link

kiraio-moe commented Jun 23, 2024 via email

@WerWolv
Copy link
Owner

WerWolv commented Jun 23, 2024

The two Intel machines I have at home use a Intel i5-7300HQ (HD Graphics 630) and a Intel i5 7300U (HD Graphics 620). Both from the same generation (Kaby Lake) sadly but at least we have some upper bounds with that.

@WerWolv
Copy link
Owner

WerWolv commented Jun 23, 2024

Yeah out of the window with that upper bound, another person with a Intel i5-8250U (UHD Graphics 620) had the issue as well.

@Poikilos
Copy link

Poikilos commented Aug 8, 2024

As discussed at #1839:

CPU GPU Works?
i3-3110M HD Graphics 4000

@Vort
Copy link

Vort commented Aug 13, 2024

Windows 7 SP1 x64,
Latest nightly of ImHex (212d2f9),

CPU: i5-4690,
Video: Intel HD Graphics 4600 (with driver 10.18.14.5162 from 06.08.2020)

imhex_scr

@Henning-Lenz
Copy link

Just updated ImHex on a rather old (but still running well) laptop to v1.35.4 and stumbled across the same thing.
The OS window decoration workaround does the job.

Therefore add Core i7-4900MQ with Intel HD 4600 running Win10 (driver 20.19.15.5063) to the list of bad ones...

@euamotubaina
Copy link

euamotubaina commented Oct 30, 2024

Same problem with Intel HD Graphics 530.
"hex.builtin.setting.interface.native_window_decorations": true workaround also works well.

ImHex Version

592f613
https://github.com/WerWolv/ImHex/actions/runs/11493675034

ImHex Build Type

  • [✔️] Nightly or built from sources

Installation type

Windows Portable x86_64.zip

Additional context?

  • OS: Windows 11 Pro x64 22H2 10.0.22621.2506
  • CPU: Intel Core i7-6700HQ
  • GPU: Intel HD Graphics 530
  • GPU Drivers: P65_67RSRP 20.19.15.4474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants