After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588230 - Add MetaWindow::modal property
Add MetaWindow::modal property
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-10 10:25 UTC by Tomas Frydrych
Modified: 2009-08-04 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch as we have it in moblin (3.20 KB, patch)
2009-07-10 10:26 UTC, Tomas Frydrych
reviewed Details | Review
Patch adding read-only MetaWindow::window-type property (2.54 KB, patch)
2009-07-31 13:03 UTC, Tomas Frydrych
committed Details | Review

Description Tomas Frydrych 2009-07-10 10:25:58 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 ?
Comment 1 Tomas Frydrych 2009-07-10 10:26:55 UTC
Created attachment 138177 [details] [review]
The patch as we have it in moblin
Comment 2 Owen Taylor 2009-07-28 22:58:34 UTC
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.
Comment 3 Tomas Frydrych 2009-07-31 12:31:49 UTC
Yep, I am going to prepare patch providing the ::window-type property instead.
Comment 4 Tomas Frydrych 2009-07-31 13:03:31 UTC
Created attachment 139626 [details] [review]
Patch adding read-only MetaWindow::window-type property
Comment 5 Owen Taylor 2009-08-03 18:06:17 UTC
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 :-) ]
Comment 6 Tomas Frydrych 2009-08-04 07:08:13 UTC
committed as 897814a1530abc50aebb201c31cbffd29e531856 (with the addition of the freeze/thaw bracketing).