Alkl58 / NotEnoughAV1Encodes

GUI for AV1 (aomenc, rav1e & svt-av1)
MIT License
538 stars 24 forks source link

WM_NCHITTEST Messages #91

Open Ichisich opened 2 years ago

Ichisich commented 2 years ago

Currently, NEAV1E lacks any distinction and reports every part of its GUI as WM_NCHITTEST=1 (In a client area). Would be nice to have more distinctions, especially title bar=2, minimize button=8, maximize button=9 and close button=20 are often used in scripts and window-management tools.

Documentation: https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest

Alkl58 commented 2 years ago

I can't seem to find good information about this.

You documentation you send is for C++ and for win32 Apps - this however is WPF on C#.

Ichisich commented 2 years ago

Indeed, I searched and the documentation for WPF is quite lacking. WM_NCHITTEST messages get at least mentioned in the issue tracker of dotnet/wpf, but nothing helpful how to implement them.

WPF applications definitely send some kind of messages though. PowerToys titlebar(correct); Powertoys

NEAV1E titlebar(wrong): NEAV1E

UWP applications for example often have a mixed "titlebar". Movies&TV (kinda): Filme

RamonUnch commented 2 years ago

related issue: https://github.com/dotnet/wpf/issues/4825

RamonUnch commented 2 years ago

I guess also this could help: https://stackoverflow.com/questions/69797178/support-windows-11-snap-layout-in-wpf-app

Alkl58 commented 2 years ago

After some further investigating it is an issue with WPF and MahApps.Metro/ControlzEx. So we have to wait for them to update their packages with the nescessary fixes.

Alkl58 commented 8 months ago

Not sure if this issue still applies, as I updated MahApps.Metro to a Pre-Release version which supports the Windows 11 snap layout and rounded corners. Maybe this fixed the WM_NCHITTEST?

Screenshot 2024-01-29 002233

Ichisich commented 8 months ago

The titlebar is still wrong, but the buttonbox is now correctly classified.