Hey all, if somebody is willing to help and knows ...
# compose-desktop
a
Hey all, if somebody is willing to help and knows a bit about the Windows (Win32, Dwm, User32 etc) API, I'm trying to expand the content of the whole window to the title in the ComposeWindowStyler library, but I'm stuck and have limited time to look into this https://github.com/MayakaApps/ComposeWindowStyler/pull/36
Currently, I have indeed succeeded expanding the content, but what happens is the hit test for the system buttons (close-maximise-minimise) is ignored for some reason. To be more specific, the
WM_NCHITTEST
message doesn't get called once the window content is expanded, hence not giving the procedure a possibility to tell about what to be hit by the system or what is managed by the app itself.
k
There’s a lot of OS-specific handling of title panes and window decorations in FlatLaf if you want to take a look at how that project is handling it.
a
They seem to use JNI instead of JNA, but thanks for pointing to that project as there might be some clue about what is not being called
s
WM_NCHITTEST was consumed in CanvasLayer, you can try register a windowproc to the skia layer
Copy code
(window as? ComposeWindow)?.findSkiaLayer()?.let { User32.SetWindowLong(it.contentHandle, WinUser.GWL_WNDPROC, YourHitTestWindowProc)
more detail see pull request
kodee happy 1
u
your work is amazing! 🤩
😁 1