Article # 375, added by Geoworks, historical record
| first | previous | index | next | last |

Where should MSG_VIS_RELEASE_MOUSE be called?



Q. The techdocs state that MSG_VIS_RELEASE_MOUSE will typically be
   called in the handler to MSG_META_END_SELECT; however, in the
   TicTac sample app, it is called in the handler for
   MSG_VIS_LOST_GADGET_EXCLUSIVE. Where is the preferred place
   to call MSG_VIS_RELEASE_MOUSE?

A. The MSG_META_END_SELECT handler calls MSG_VIS_RELEASE_GADGET_EXCL,
   so that ends up sending MSG_VIS_LOST_GADGET_EXCLUSIVE anyway.
   The latter is preferable (at least in cases where the object grabbing
   the mouse can get the gadget exclusive), because if the gadget
   exclusive is lost in some other way (like the application exiting or
   something unexpected like that), the mouse will still be released.