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 598289 - Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow
Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: 598227
 
 
Reported: 2009-10-13 14:35 UTC by Colin Walters
Modified: 2009-10-14 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow (4.23 KB, patch)
2009-10-13 14:35 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2009-10-13 14:35:53 UTC
For some consumers it's significantly more convenient to be able
to directly connect to a signal on the Window to know when
Mutter is done with it, rather than having to connect to each
Workspace object (and handle workspace additions, etc.).

Similarly, add window-created which acts globally.
Comment 1 Colin Walters 2009-10-13 14:35:56 UTC
Created attachment 145357 [details] [review]
Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow
Comment 2 Tomas Frydrych 2009-10-14 07:12:36 UTC
Unless I am misreading the patch, the window-created signal does not seem to be ever emitted. Also, I don't know if the ::unmanaged signal is of much use, since by the time it's emitted there is very little you can do with the MetaWindow object, it's not far removed from just having a weak ref on the MetaWindow object.
Comment 3 Colin Walters 2009-10-14 17:03:35 UTC
(In reply to comment #2)
> Unless I am misreading the patch, the window-created signal does not seem to be
> ever emitted.

Oops yes, will fix.

> Also, I don't know if the ::unmanaged signal is of much use,
> since by the time it's emitted there is very little you can do with the
> MetaWindow object, it's not far removed from just having a weak ref on the
> MetaWindow object.

Well, it's tricky.  I do have some C code I could convert to use weakrefs, but in the presence of garbage collection, we really want to be able to have a more deterministic lifecycle for "heavyweight" objects like MetaWindow and Clutter actors.  ClutterActor has the DESTROY signal which works fine for those, it'd be nice to have something similar for MetaWindow.
Comment 4 Tomas Frydrych 2009-10-14 17:16:39 UTC
(In reply to comment #3)
> Well, it's tricky.  I do have some C code I could convert to use weakrefs, but
> in the presence of garbage collection, we really want to be able to have a more
> deterministic lifecycle for "heavyweight" objects like MetaWindow and Clutter
> actors.  ClutterActor has the DESTROY signal which works fine for those, it'd
> be nice to have something similar for MetaWindow.

OK, that makes sense. That reminds me, we need to  start adding doc comments to signals, I don't think any of our signals are documented :(.
Comment 5 Colin Walters 2009-10-14 18:39:24 UTC
Attachment 145357 [details] pushed as 9311add - Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow