haskell / haskell/win32

trackPopupMenuEx, trackPopupMenu

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
fridge help wanted need information
Dominant language
Haskell
Stars
101
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I get unsafe reentries when trying to use either trackPopupMenuEx or trackPopupMenu. They are fixed when I use a safe imports instead.
Also the Microsoft documentation calls the return value of the API functions a BOOL, but the value is actually needed for identifying which option was clicked when the TPM_RETURNCMD flag is set.
I think the return value should be IO (Maybe MenuID). If they get back a zero they should fail like now, if they get back a positive value but the flag wasn't set they should return Nothing and if the flag was set they should return Just MenuID.

Should I send a pull request?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.