Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Loose Focus event?

<< < (2/2)

daniloz:

--- Quote from: MortenMacFly on February 03, 2011, 03:34:27 pm ---
--- Quote from: daniloz on February 03, 2011, 01:40:03 pm ---Wouldn't it be better to go through a cbEvent, anyway?

--- End quote ---
So yes - that's the way to go. If you want to, to can try to design/implement a SDK event accordingly and provide a patch. It shouldn't be too hard. This would mean a change of the SDK API... just for the record.

--- End quote ---
Here is the patch against trunk... it provides two events:
- cbEVT_APP_ACTIVATED: triggered when the C::B window gets the focus
- cbEVT_APP_DEACTIVATED: triggered when the C::B window looses the focus

I've tested them here with my "Save all editors when loosing focus" plugin (still a work in progress, but as soon as it becomes stable, I'll also post-it here) and everything works fine.

I'd really appreciate if you could consider this to go into the "official" C::B. ;-)

daniloz:
@morten: Thank you very much for the commit... :-)

Navigation

[0] Message Index

[*] Previous page

Go to full version