Yann:

Hm.. I thought groups are somehow handled on win32 platform, I don't know X and 
*nix WMs.

I just checked. Indeed I have two top-level windows (though I may reconsider it 
since I want some special effects particular to popup windows on win32 
platform). When I have my dialog transient to one of the main windows, I have 
the dialog centered over my window, but the window is still inaccessible :( 
That is what I've tried.

void MainWindow::OnCursorSettings() {
        ghost = new GhostWindow();
        cursor.set_transient_for(*ghost);
        ghost->show();
        int res = cursor.run();
}

I do want dialog to block MainWindow only, not the ghost one.

I assume you meant the opposite to have a main window transient for dialog.

void MainWindow::OnCursorSettings() {
        ghost = new GhostWindow();
        set_transient_for(cursor);
        ghost->show();
        cursor.show();
}

This froze my application. Also it seems awkward if dialog is not modal and I 
cannot get result in a usual way.

Any other suggestions? I was thinking about Gtk::Main::iteration . But it is a 
static function. I'm not sure how two different loops (in case of a dialog) 
coexist.

Mikhail


-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Yann LEYDIER
Sent: Sunday, June 12, 2011 2:52 PM
To: [email protected]
Subject: Re: extra alive window while dialog is running?

Aren't window groups only hints for the window manager ?

If you create two toplevel windows and then a dialog which is transient for one 
of the two toplevels, provided that the dialog is not modal, it should not 
prevent you from acting on the other toplevel window…

yann

On 12/06/11 21:27, Mikhail Titov wrote:
> Hi all!
>
> I’d like to have an extra window derived from Gtk::Window to be alive while 
> I’m running some dialog. I tried to create new Gtk::WindowGroup and add my 
> window to it prior to running the dialog, however it looks like I can’t 
> move/resize that window.
>
> Is there an extra step to make it work? Or can I somehow pump event 
> loop or something for that window within my dialog? Here is the 
> snippet
>
> void MainWindow::OnCursorSettings() {
>       ghost = new GhostWindow();
> //    Glib::RefPtr<Gtk::WindowGroup>  g = get_group();
>       Glib::RefPtr<Gtk::WindowGroup>  g = Gtk::WindowGroup::create();
>       g->add_window(*ghost);
>       g->add_window(*this);
>       Glib::RefPtr<Gtk::WindowGroup>  g2 = Gtk::WindowGroup::create();
>       g2->add_window(cursor);
> //    ghost->set_transient_for(*this);
>       ghost->show();
>       int res = cursor.run();
> }
>
>
> P.S. I'm on win32 running gtkmm 3.0.1 built on top of GTK+ 3.1.4 (from GIT).
>
> Mikhail
>
>
> _______________________________________________
> gtkmm-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to