Ordering windows on the desktop

I am experiencing some trouble with multiple windows opened up by my
app. For example, here is a snippet. When I run this, two windows show
up. Everything is okay.

But if I obscure the 'parent' window by bringing up another app (one
that covers the entire desktop.. my browser for example), the parent
window behaves and gets out of the way. But the child window stays on
top and shows up in front of my browser.

What I need is for the 'child' window to behave just like the parent.
Get out of the way if another app is taking up the desktop.

The funny thing is, the following piece of code does what I want to do
on my WinXP env. The child window gets out of the way. But on my linux
env , the child window always stays on top.

Most likely this has nothing to do with the perl bindings themselves.
But if some one has ideas on what I am running into, that'll be great.



# -------------------------------- #
use strict;
use warnings;
use Glib qw(TRUE FALSE);
use Gtk2 qw/-init/;
use Data::Dumper;

my $window = Gtk2::Window->new;
$window->signal_connect('destroy', sub { Gtk2->main_quit; });
$window->set_default_size(300, 300);

my $childwindow = Gtk2::Window->new('toplevel');
$childwindow->modify_bg ('normal', Gtk2::Gdk::Color->parse('red'));
$childwindow->set_default_size(100, 300);
$childwindow->move(100, 100);


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