ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Bug] Cursor is not properly mapped to the window

Open Unknown78 opened this issue 1 year ago • 20 comments
trafficstars

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
i5-6200U HD Graphics 520

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?

  • OS: Windows 11 Pro for Workstations x64 23H2 v10.0.22631.3296
  • CPU: Intel Core i3-2310M
  • GPU: Intel HD Graphics 3000
  • GPU Drivers: https://winraid.level1techs.com/t/get-your-intel-hd3000-sandy-bridge-windows-10-64bit-drivers-here/40044

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 avatar Apr 01 '24 09:04 Unknown78

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

Unknown78 avatar Apr 01 '24 09:04 Unknown78

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 avatar Apr 01 '24 09:04 Unknown78

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

Unknown78 avatar Apr 01 '24 09:04 Unknown78

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.

csBlueChip avatar Apr 16 '24 10:04 csBlueChip

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.

WerWolv avatar Apr 16 '24 11:04 WerWolv

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

Unknown78 avatar Apr 17 '24 01:04 Unknown78

Thanks @Unknown78, it does the job 👍

kiraio-moe avatar May 16 '24 17:05 kiraio-moe

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)

iTrooz avatar Jun 22 '24 13:06 iTrooz

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

WerWolv avatar Jun 22 '24 20:06 WerWolv

@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?

Unknown78 avatar Jun 22 '24 20:06 Unknown78

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

WerWolv avatar Jun 22 '24 20:06 WerWolv

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: @.***>

kiraio-moe avatar Jun 23 '24 03:06 kiraio-moe

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 avatar Jun 23 '24 09:06 WerWolv

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

WerWolv avatar Jun 23 '24 10:06 WerWolv

As discussed at #1839:

CPU GPU Works?
i3-3110M HD Graphics 4000

Poikilos avatar Aug 08 '24 17:08 Poikilos

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

Vort avatar Aug 13 '24 13:08 Vort