unfocussed windows



hi hi,

as part of my test suite I run GUI tests. Now this is a bit disturbing
as windows flicker around.

A first idea I had was to avoid that these windiows become active. I
thought about using:
 gtk_window_set_focus_on_map(GTK_WINDOW(main_window),FALSE);
 gtk_window_set_accept_focus(GTK_WINDOW(main_window),FALSE);

The problem here is, when I get hold of the window-object reference it
already did the call to
 gtk_widget_show_all(GTK_WIDGET(main_window));

Anyone a cool idea to get around that problem?

A second but more complex idea is to use an virtual frame-buffer like: 
 /usr/X11R6/bin/Xvfb -ac :9 -screen 9 1024x786x16

And the setting this display as the default one before opening any
window. Unfortunately this involves
1) setting up the virtual display from the test suite
1a) either checking if its already up and using it
1b) finding a 'free' display number, using it and afterwards teminate it
2) redirecting the app there

I have no idea wheter 1a) or 1b) is more practical, both sound tricky.
I've just started up one such virtual display and then run the
ChangeDisplay example of the gtk-demo and it not lists my virtual
framebuffer X. Still running
 gtk-demo --display=:9.0
works. Any idea why its not listed? And any plan how you would do it?

Nuff asked ;) Have a nice weekend!

Stefan





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