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 565225 - GtkPlug socket-window property should be writeable and G_PARAM_CONSTRUCT_ONLY.
GtkPlug socket-window property should be writeable and G_PARAM_CONSTRUCT_ONLY.
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-12-21 03:59 UTC by Robert Carr
Modified: 2018-02-10 03:24 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Make socket-window writeable at construction. (1.84 KB, patch)
2008-12-21 04:01 UTC, Robert Carr
needs-work Details | Review
A patch that works for the in-process case. (3.98 KB, patch)
2008-12-21 05:15 UTC, Robert Carr
none Details | Review

Description Robert Carr 2008-12-21 03:59:53 UTC
GtkPlug not allowing the socket-window property to be set at construction is awkward for language bindings, which often depend on being able to meaningfully construct the object using a single call to g_object_new, for example (in the JavaScript case) one might expect to be able to do something like the following: p = new Gtk.Plug({socket_window: win}).
Comment 1 Robert Carr 2008-12-21 04:01:00 UTC
Created attachment 125079 [details] [review]
Make socket-window writeable at construction.
Comment 2 Allison Karlitskaya (desrt) 2008-12-21 04:15:44 UTC
You need to check the window that the user gives you to see if it's in the same process as you and, if so, form an association with the GtkSocket (see how _gtk_plug_add_socket ()) does this.

Also, if you're doing this then it probably makes sense to also expose a "socket-window-id" property (GdkNativeWindow type) and make that user-settable on construct to better match the _new() function.
Comment 3 Allison Karlitskaya (desrt) 2008-12-21 04:17:07 UTC
+1 for general sanity of the idea, though.
Comment 4 Allison Karlitskaya (desrt) 2008-12-21 04:29:07 UTC
oh.  also, you should g_value_dup_object, unless your intention is to steal the user's reference.

and maybe the properties shouldn't be construct-only, but rather always writable but have a g_return_if_fail (plug->socket_window == NULL); so you can't set the window more than once...
Comment 5 Robert Carr 2008-12-21 05:15:04 UTC
Created attachment 125082 [details] [review]
A patch that works for the in-process case.

This patch works for the in-process case. In addition it does g_return_if_fail(plug->socket_window == NULL) rather than being construct only.
Comment 6 Matthias Clasen 2018-02-10 03:24:44 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.