Ticket #1125 (closed defect: duplicate)
drawWindowGetPointer raises "NonExhaustivePattern" or something...
|Reported by:||guest||Owned by:||somebody|
|Component:||general (Gtk+, Glib)||Version:||0.9.12|
|Keywords:||drawWindowGetPointer, non exhaustive pattern||Cc:||dignor.sign@…|
..when called inside a callback for onScroll... anyways in Events.hsc there is that little function "toModifier" which is used for everything else and that works. It have a nice comment:
-- Turn an int into a modifier. -- -- * Use instead of (toFlags . fromIntegral) since the latter will fail -- if flags are set for which no constructor exists --
which is exactly what gets done in DrawWindow.hsc.pp, and then the error. I would gladly post a patch, but I'm not very skilled on making patches. The obvious fix however worked for me:
- Export toModifier in the Events module
- import it in DrawWindow
- change (toEnum (fromIntegral m) ) by toModifier (... m). The three dots represents my ugly hack for converting a Word to a CInt.