GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Nov 28, 2014 12:15 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Deactive Windows Parent in Modeless Dialog
PostPosted: Tue May 27, 2014 10:58 am 
Offline
Familiar Face

Joined: Fri Apr 04, 2014 11:39 am
Posts: 10
Hi,

I am creating a modeless dialog and I would like to desactive the windows parent while modeless dialog is run. How can i desactive a window?

Thank you very much.

Gabriel.


Top
 Profile  
 
 Post subject: Re: Deactive Windows Parent in Modeless Dialog
PostPosted: Tue May 27, 2014 1:54 pm 
Offline
GTK+ Guru

Joined: Sun Apr 06, 2008 6:43 pm
Posts: 286
Location: Fortress of solitude
You'll have to run your child dialog in another thread, see g_thread_new. Just be sure to use gtk_window_set_destroy_with_parent in the child dialog (for sanity).

So you can use gtk_widget_set_sensitive in parent without "frozen" events. You can also read about gtk_events_pending, if you planning to work both parent and child at the same time.

_________________
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.


Top
 Profile  
 
 Post subject: Re: Deactive Windows Parent in Modeless Dialog
PostPosted: Wed May 28, 2014 6:11 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 781
Location: UK
Hello,

You can not call GTK or GDK from different threads specially on Microsoft Windows. It is possible on a X Window based system with the use of the "Global GDK Lock" which is now deprecated.

This may sound like a silly question. Why can you not run your mode-less dialog modal? It is possible to do this.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group