Re: notification about desktop switch

"trier" <gumgum.mugmug@xxxxxxxxx> wrote in message news:94484301-33b8-46b6-922b-8f34681a33da@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am relatively new to perl tk - love it, but cant solve the following

My perl/tk application (Mandriva 2010.0) uses a popup help feature.
When I hover over a widget, a toplevel widget is created and will
display the help text, and I delete it when the focus leaves the
popped up window -no problem so far.

I call the overrideredirect method on the help toplevel widget to drop
the window decoration - and here my problem comes: I am using KDE4,
and can switch between desktops. Due to the overrideredirect, the
popup window is "sticky" and appears on each desktop. How can I make
the popup window be deleted when a desktop switch occurs? I am
familiar with using events and binding procedures to events - would be
nice to have an event that is launched when a desktop switch occurs -
but I have not found any such event.

An alternative solution would be to find a way to un-decorate the
window without the drawback that the windowmanager does not handle
overrideredirect windows.

Any advice please?

My first suggestion is to use Tk::Balloon (as Christoph implies). If that is not an option - then (untested) try binding to the visibility event of either your widget or your mainwindow to delete the toplevel window. I would assume a visibility event would be triggered when you switch desktops? This combined with a boolean flag that indicates if the popup is shown or not might work for you. I could test something out - but not until Monday as I only have windows at home.