in reply to Finding windows with WNCK

My problem is that, for reasons I don't understand, this algorithm sometimes fails. The call to $screen->get_windows() returns a list of windows which sometimes contains our test window, and sometimes doesn't.

Without analyzing your code, I would remind you that the window lists which WNCK returns depends on the virtual desktop you are on. You have to cycle thru the virtual desktops, and get the window list from each. I have a program that fails like that, it used WNCK to get the Mozilla x_window_id, but it only worked if the Perl script was executed from the same virtual desktop as Mozilla.

I hope it made sense, it seems like common sense to me. :-)


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh