WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
43.98k stars 1.92k forks source link

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

Open Unknown78 opened 6 months ago

Unknown78 commented 6 months ago

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

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

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 commented 6 months ago

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

Unknown78 commented 6 months ago

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 commented 6 months ago

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

csBlueChip commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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

kiraio-moe commented 4 months ago

Thanks @Unknown78, it does the job 👍

iTrooz commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

@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 commented 3 months ago

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: a9915579a0ea5d850bddee9af1276c07a4e35a05

kiraio-moe commented 3 months ago

Intel i3-5005U / HD Graphics 5500

Pada Min, 23 Jun 2024 03.51, Unknown78 @.***> menulis:

@WerWolv https://github.com/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 https://github.com/csBlueChip @iTrooz https://github.com/iTrooz @kiraio-moe https://github.com/kiraio-moe @dmantisk https://github.com/dmantisk?

— Reply to this email directly, view it on GitHub https://github.com/WerWolv/ImHex/issues/1625#issuecomment-2184186254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4W4LS6KSNPKJJJQUM5AGDZIXPVPAVCNFSM6AAAAABFRLIDRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUGE4DMMRVGQ . You are receiving this because you were mentioned.Message ID: @.***>

WerWolv commented 3 months ago

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 commented 3 months ago

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 commented 1 month ago
As discussed at #1839: CPU GPU Works?
i3-3110M HD Graphics 4000
Vort commented 1 month ago

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

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

imhex_scr

Henning-Lenz commented 22 hours ago

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...