Greg Ercolano wrote:
> Kveto Ilencik wrote:
>> I do not want to allow the user to close their application with Alt+F4
>> key combination.
>       
>       ..you'd do this by setting a callback for the Fl_Window..

    Also, to highlight what Ian mentioned:

>> Anyway, I'm pretty certain that key-combination is handled by the
>> win32 window manager, so it is very likely that the key presses never
>> really find their way to you app.

    ..yes, the window manager gets a first shot at interpreting
    keyboard events, so in this case, it's trapping the key combo
    before it ever gets to your app's handle() method.

    I believe this is true for all window manager specific key sequences
    (such as keys to stow, pop/push, and move windows), and it's to the
    window manager's discretion whether those sequences are 'passed through'
    to the app or not. (typically not)

    So in the case of ALT-F4, instead of delivering the key sequence,
    the window manager tells the app to close down, which you can trap
    by setting the callback for the window.

    Some window managers have a LOT of key sequences, and users can
    even customize them, which sometimes leads to interfering with
    app's that expect those keys for themselves, which can lead to
    weird support calls from users of your app..
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to