DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current I also thought about a 2nd flag to remember the state before the widget was hidden, but unfortunately this wouldn't work in a reliable way. Example: mywidget->deactivate(); mywidget->hide(); mywidget->activate(); mywidget->show(); What would be the widget's active() state after this sequence? Note that these instruction may not be consecutive. Instead, we must assume that *all* instructions would be triggered by individual button callbacks in an arbitrary order. Conclusion: We /must/ not change the active() flag in show/hide, because they (i.e. INACTIVE and INVISIBLE) are completely independent of each other! -- To the docs[1]: "An invisible widget never gets redrawn and does not get events." This obviously contradicts the above mentioned docs of the INVISIBLE flag, but both are somewhat incorrect. What they should say is: An invisible widget never gets redrawn and does not get *normal mouse and keyboard* events. It can, however, get *some* events like FL_SHOW etc.. The same applies to the INVISIBLE flag. As a workaround to solve the OP's problem I would propose to move the widget/group outside the window (and its enclosing group) range, so that it doesn't get redrawn because of clipping and can still receive shortcut events. If this doesn't work (why?), then the way to go would be to register global shortcuts instead. Corvid, could you please test one or both suggestions and report whether they solve your problem, so that we can close this STR? ... unless someone has a better idea, of course. -- [1] <http://www.fltk.org/doc-1.3/classFl__Widget.html#ab572c6fbc922bf3268b72cf9e2939606> Link: http://www.fltk.org/str.php?L2574 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
