HI
you have to use gdk_widget_grab(your window)
and gdk_pointer_grab (..);
this will grab all kind of mouse event to your window .
to make gtk stop the execution of the current code and wait until you
destroy your modal window, you have to start a new event loop
with : gtk_main ();
and don't forget to destroy it, in order to return to the parent process with :
gtk_main_quit();
take a look to the event loop functions in the glib , once you
understand it it's easy to use it .
bye
mohamed
On Tue, Jul 24, 2001 at 04:05:26PM -0300, Pedro Zorzenon Neto wrote:
> Hi list,
>
> The program that I'm developing has some critical situations that I want it to
>show a message and the user will be able just to click on buttons in this message
>window. All other windows in this program can't get focus.
>
> I'm doing like this:
>
> GtkWidget *winmsg1;
> winmsg1 = gtk_window_new (GTK_WINDOW_DIALOG);
> ... ... ... set title, set buttons, ... ... ...
> gtk_window_set_modal (GTK_WINDOW (winmsg1), TRUE);
> gtk_grab_add(winmsg1);
> gtk_widget_show (winmsg1);
> printf("test\n");
>
> Then winmsg1 is the active window, but if I click in other window, it get the
>focus.
> How can I make the other windows do not respond and just winmsg1 active with focus?
> I'd also like to stop program execution in the "gtk_widget_show (winmsg1);" line
>and continue after the user closed the winmsg1 window.
>
> Thanks in advance,
> Pedro
>
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
--
Sevenval AG (HRB 32757)
ecommerce-base-technologies
D-50667 Koeln . Am Alter Markt 36-42
Fon +49 221 65007-51
www.sevenval.de
[EMAIL PROTECTED]
......................................
Mohamed Elassadi
Programmierer
----- End forwarded message -----
--
Sevenval AG (HRB 32757)
ecommerce-base-technologies
D-50667 Koeln . Am Alter Markt 36-42
Fon +49 221 65007-51
www.sevenval.de
[EMAIL PROTECTED]
......................................
Mohamed Elassadi
Programmierer
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list