Re: keep window above other
| From: | Adz07 | Date: | Sun, 27 May 2007 18:11:01 +0000 |
| Subject: | Re: keep window above other | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7883@lists.php.net to get a copy of this message | ||
Ah, so there isn't really a way to create the same flashing/alert effect when
you click on a disabled window like you can in xp? Shame :(
bob majdak jr wrote:
>
> Well there is only so much you can do, the rest is decided by your
> os/window manager. Best you could do is to set_sensitive(false) on the
> main window for the time the little window is up. that will make
> everything on it gray and very apparent they cannot do stuff with it.
> but they will always be able to move it.
>
> there might be a way to catch a move event, but that means writing
> special cases for everything you don't want them to do, which is a lot
> of wasted effort for something not very big deal.
>
> - bob.
>
> Adz07 wrote:
>> Ok,
>> I have done this and it works to an extent but not exactly how i was
>> hoping. The main window is kept behind the smaller one but can still be
>> minimized or moved while the small window is open. I want to make sure
>> that
>> the main window is not usable when the smaller on is visible. Here is my
>> code for a test:
>>
>> <?php
>> //create a main window
>> $wnd = new GtkWindow();
>> $wnd->set_title('Hello world');
>> $wnd->connect_simple('destroy', array('gtk',
>> 'main_quit'));
>> $wnd->set_default_size(600,600);
>> $wnd->set_position(GTK_WIN_POS_CENTER);
>> $lblHello = new GtkLabel("Just wanted to say\r\n'Hello world!'");
>> $wnd->add($lblHello);
>> $wnd->show_all();
>> $wnd->set_accept_focus(false);
>>
>> //create the child window
>> $wnd_s = new GtkWindow();
>> $wnd_s->set_title('Hello world 2');
>> $wnd_s->set_default_size(200,400);
>> $wnd_s->set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
>> $wnd_s->set_transient_for($wnd);
>> $wnd_s->set_modal(true);
>> $wnd_s->show_all();
>>
>> Gtk::main();
>> ?>
>>
>> Any ideas??
>>
>>
>>
>>
>>
>>
>> bob majdak jr wrote:
>>> on the small window:
>>>
>>> set_transient_for(parent)
>>> set_modal(true)
>>>
>>> that should prevent the big window from doing anything while the little
>>> window is up - but that depends on if your window manager honours those
>>> things. the small window should probably even follow the big one if it
>>> was moved. i would probably recommend:
>>>
>>> set_position(Gtk::WIN_POS_CENTER_ON_PARENT)
>>>
>>> on the small window too.
>>>
>>> - bob.
>>>
>>>
>>>
>>> Adz07 wrote:
>>>> If i load a large indow and small window at the start up of an app is
>>>> it
>>>> possible to keep the small window infront of the larger one and not
>>>> allow
>>>> focus on the big one untill the small one is closed??
>>>>
>>>> The only way i can see is to set the small window to set keep above,
>>>> but
>>>> this isn't really what i am after.
>>> --
>>> PHP-GTK General Mailing List (http://gtk.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
View this message in context: http://www.nabble.com/keep-window-above-other-tf3822470.html#a10827107
Sent from the Php - GTK - General mailing list archive at Nabble.com.