GNOME Bugzilla – Bug 588230
Add MetaWindow::modal property
Last modified: 2009-08-04 07:08:13 UTC
We found it handy in Moblin to have this read-only property, but perhaps it might be better to turn the window type into read-only property instead ?
Created attachment 138177 [details] [review] The patch as we have it in moblin
I'm fine with this patch as is, if you want to commit it, but it does seem like adding a ::window-type property to go along with and provide notification for meta_window_get_window_type() would be a little conceptually simpler and less confusing. Just two comments about the patch as is: + PROP_MODAL, That trailing comma (which was already existing it looks like prior to your patch) can cause problems with some compilers. + "Whether window is modal", I think it might be better to describe the property as: "Whether the application has marked the window as a modal dialog" Since there are probably quite a few modal windows for some apps that don't have the appropriate window type on them.
Yep, I am going to prepare patch providing the ::window-type property instead.
Created attachment 139626 [details] [review] Patch adding read-only MetaWindow::window-type property
Looks good. Might be a slightly better practice to surround the notifications with a g_object_freeze_notify()/g_object_thaw_notify() pair. [ I forget at this point why that's good practice; I think it gives you some extra efficiency :-) ]
committed as 897814a1530abc50aebb201c31cbffd29e531856 (with the addition of the freeze/thaw bracketing).