Re: [gtkmm] Getting notfified when window opens on display?



Anastasios Bassoukos wrote:

On Mon, 2004-02-02 at 20:40, Toralf Lund wrote:

/Actually, I think I'll rephrase the question from earlier today... I
might have asked:

Is there a way I can setup gtkmm so that my app is notified whenever a
new window is opened on the current display?

With XLib you can do this by checking for "Substructure" events
(SubstructureNotifyMask) of type "CreateNotify" on the root window. In
other words, if I can catch an XLib event in general, the problem is
probably solved, but I'm open to other solutions, too.

- Toralf/


Hi,
Depends on why you want to do that. I think that gtk or gdk drops notifications for unknown windows - but I may be wrong, as it has been two years since I last looked at that.
Have you checked the Window Manager-related protocols?

Yes and no. I haven't checked the specs at freedesktop.org etc. (yet), but I do know exactly what XLib event I'm looking for, and how I might catch it if I weren't using a toolkit. Using XLib event calls directly in a Gtk application is probably a bad idea, however, as Gtk has its own way of dealing with events.


HTH,
Tassos

--
Beware of he who would deny you access to information, for in his
heart he dreams himself your master." -- Commissioner Pravin Lal, Sid Meier's Alpha Centauri







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