On Sat, 01 Dec 2012 15:18:51 +0800 John Roberts wrote:
JR> On 01/12/12 8:23 AM, Vadim Zeitlin wrote:
JR> > On Sat, 01 Dec 2012 07:45:57 +0800 John Roberts wrote:
JR> >
JR> > JR> Generic tip activates parent window to the front with focus set to
JR> > JR> parent and removed from what was the current active window (not
JR> > JR> restricted to that app)
JR> >
JR> > I think not activating the window is actually a better idea. But I think
JR> > the best is to avoid showing the tooltips for the windows which are not
JR> > active
JR>
JR> Ok, I have created #14869 to do this. It should avoid any problems with
JR> WS_EX_TOPMOST.
Wouldn't it be better to simply avoid calling ShowFor() if the window is
not active? IMO we should have either an assert checking that the window is
active or nothing at all inside wx itself, otherwise the behaviour is just
too surprising: you call the function and absolutely nothing happens.
JR> > Honestly, I'd prefer to just avoid using it like this rather than
JR> changing
JR> > wxPopupWindow. But maybe we could have some option (dare I say style?) to
JR> > make wxPopupWindow behave in either way.
JR>
JR> I understand not wanting to change it. Then the options not in any
JR> preferential order are to:
JR> a. use a style or bool flag and some method SetAs...
JR> b. create a new derivative window
JR> c. use a shaped wxWindow of some type.
(c) is not really a solution as it would still need to derive from
wxPopupWindow presumably. So the choice is between (a) and (b). If we think
that the behaviour you want is only really useful for tooltip-like windows,
then I probably would prefer (b). The only problem is that we already have
wxTipWindow so we'd need to invent a yet another name...
Regards,
VZ