[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Re: [XaraXtreme-bugzilla] [Bug 1036] Non-modal dialogs wrongly take focus (was: Hotkeys don't toggle galleries)



Alex Bligh wrote:


--On 06 September 2006 11:45 +0100 Luke Hart <lukeh@xxxxxxxx> wrote:

Have you added a mechanism elsewhere to get around these problems?

DialogManager does this in places. What it does (in essence) is post itself
an event using AddPendingEvent. However, that's no use if the thing truly
works on idles (as opposed to just doing stuff AFTER sending the event),
because the idle won't execute until the queue is empty. I got bitten by
this on the colour editor resizing - it's a hard problem to fix properly
and I make no claim to have done so in the colour editor. In general the
technique seems to be to wait until whatever is executed on the idle
actually has occurred.

But I think you need to first determine whether SetFocus just "doesn't
work" between TLW hierarchies. If it doesn't work at all, then that's
a bigger problem. If it just doesn't work from where you are currently
calling it, we might have a hope of working around it. For instance,
you could call the stuff that would be done on the idle event manually.

Alex
Looks to me like the activation has already happens since the IsActive for the destination window is returning true (which basically means that it or one of its children has focus). I've fired off an e-mail to the wx mailing list.

   Luke