| Summary: | SWT.EMBEDDABLE Composites should be reusable after embedded client has disappeared | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Joonas Koivunen <joonas.koivunen> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ericwill, jim, remy.suen, xixiyan |
| Version: | 4.1 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
|
Description
Joonas Koivunen
I've tried to peek at the requirements for implementation: * os.h function: GTK_TYPE_SOCKET * OS.java signal constants: byte[] plug_added, plug_removed * Widget.java signal constants: PLUG_ADDED, PLUG_REMOVED * Widget.java increment Widget.LAST_SIGNAL to accomodate the two more sigs * Widget.java translate PLUG_ADDED, PLUG_REMOVED in windowProc(long,long) to new methods gtk_plug_added and gtk_plug_removed * Display.java closures for the signals, methods for closures * Composite.java override gtk_plug_removed to return GTK true (int=1) if embedded Could this be all? Altough Widget might be wrong place for PLUG_ADDED, PLUG_REMOVED as these are not signals of GtkWidget but GtkSocket; is there another common place for such signals? Having just tested on Windows, if one should embed an app (for example VLC) on a surface it can be done any number of times without any SWT interference. (In reply to comment #1) > I've tried to peek at the requirements for implementation: > * os.h function: GTK_TYPE_SOCKET > * OS.java signal constants: byte[] plug_added, plug_removed > * Widget.java signal constants: PLUG_ADDED, PLUG_REMOVED > * Widget.java increment Widget.LAST_SIGNAL to accomodate the two more sigs > * Widget.java translate PLUG_ADDED, PLUG_REMOVED in windowProc(long,long) to > new methods gtk_plug_added and gtk_plug_removed > * Display.java closures for the signals, methods for closures > * Composite.java override gtk_plug_removed to return GTK true (int=1) if > embedded > > Could this be all? Altough Widget might be wrong place for PLUG_ADDED, > PLUG_REMOVED as these are not signals of GtkWidget but GtkSocket; is there > another common place for such signals? Widget is the right place to put those constants? Please attach a patch and I will review it. Thanks! I see there was some discussion on this back in 2011, but that nothing seems to have come of the problem. This problem is affecting my project and I'm wondering if any progress has been made. Thanks. Jim (In reply to Jim Mayer from comment #4) > I see there was some discussion on this back in 2011, but that nothing seems > to have come of the problem. > > This problem is affecting my project and I'm wondering if any progress has > been made. Hi Jim, I did do some preliminary analysis but as we later decided to deploy only on Windows we never needed this implemented. Also I've personally been out of Java/SWT related application development for some time now. I think what I gathered in the comment #1 should still be valid, however the latest GTK versions might have move stuff around. It might even be that this feature has partially been implemented already -- I haven't checked. From what I understood implementing this shouldn't be too complicated, however there were some SWT building related issues back in the day.. Hopefully it's simpler today or at least more documented :) Thanks Joonas, I'm using the SWT version from the Kepler Eclipse release on a Fedora 20 system, and neither the SWT nor the GTK+ behavior appears to have changed. It's still the case that GTK+ destroys the socket unless the PLUG_REMOVED handler returns true. From an SWT API perspective, the two problems I see are: (1) There's no way find out when the plug has been removed. (2) There's no option to keep the socket open when a plug has been removed. Jim Is this still reproducible? Hello there. Sorry, I haven't been paying much attention to this issue after I quickly worked around it way back when. I never managed to understand how to implement this in SWT, and failed to find any mentorship at the time. From what I've documented here, this was just a case of missing feature. What I can remember from this issue I would expect the reproduction guide to still be accurate. Unrelated to this issue I no longer do anything with SWT. Re-assigning to the default assignee in case anyone wants to work on this. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |