GNOME Bugzilla – Bug 676522
Make DND work between images in *one* dockable, after in-DND image switching
Last modified: 2014-02-15 20:44:41 UTC
The layer dialog doesn't get updated when moving a layer to another image in single window mode. How to reproduce: 1. enable single window mode 2. activate 'Layer dialog' 3. open or create two images 4. move one layer from image 1 to image 2 by dragging it over the new images tab row This should happen: While user is dragging the image over the images tab row, the 'Layer dialog' gets constantly updated and shows the layer stack of the current destination image. This would make it possible to drop the layer on the right position in the 'Layer dialog'. This happens: 'Layer dialog' doesn't get updated. User has to drop the layer over the destination image itself. The layer is put onto the current selected layer and has to be positioned manually to the desired level. It happens always.
This must have got lost along the way, I'm pretty sure it used to switch windows.
switch *images*
I'm afraid I was wrong, this never worked because it needs quite some changed to how DND works -> 2.10.
Fix the actual image switching. That's as fixed as it gets in 2.8, getting DND working between two images in *one* layers dialog is, as mentioned, not 2.8 material. commit a4fb9692ae7af6af204962c3db35ec164968a32d Author: Michael Natterer <mitch@gimp.org> Date: Wed May 23 01:25:22 2012 +0200 Bug 676522 - Changing tabs in single-window-mode should switch the active im Change the active image when switching tabs in single-window-mode. (cherry picked from commit c1cfe98d35d29bc2bdae6a4cb53434db1aa3b8c9) app/display/gimpimagewindow.c | 3 +++ 1 file changed, 3 insertions(+)
*** Bug 682591 has been marked as a duplicate of this bug. ***
So the workaround until version 2.10. is to temporarily switch back to non-Single-Window-Mode (obvious but I thought is wouldn't hurt to say it)
Bug triaging results: Test with the current 2.8.2. build. Dragging a layer in single window mode from one image to another switches the image as well as the layer window. It's not possible anymore to drop the layer on the destination image. Working in multi window mode is well. Another workaround for single layers in the meantime till 2.10: 1. Copy the layer via Edit/Copy. 2. In the destination image use Edit/paste as/Paste as new layer.
*** Bug 690698 has been marked as a duplicate of this bug. ***
*** Bug 701066 has been marked as a duplicate of this bug. ***
Fixed in master and gimp-2-8: commit 174175f206fe461fab6a91a1749585074368bb6f Author: Michael Natterer <mitch@gimp.org> Date: Sat Feb 15 21:29:36 2014 +0100 Bug 676522 - Make DND work between images in *one* dockable... ...after in-DND image switching This was actually two issues: First, DND data is normally transferred on drop. In this situation the contents of the source widget change in the middle of DND, so when the drop happens there is nothing to transfer. Fixed this by attaching the thing to transfer (image, item, color etc) to the GdkDragContext when the DND operation starts, and trying to retrieve it on drop. Only when nothing is attached we fall back to the traditional way of asking the source widget. This is expected and an obvious fix. Second, and not so obvious, the source part of the GTK+-internal state of the DND operation (GtkDragSourceInfo) contains a *reference* (not a copy) of the source widget's target list. When we change images in the middle of DND, the source layer view's target list gets modified, and because GtkDragSourceInfo only references it, the state of the ongoing DND operation gets destroyed with it. Fixed this by changing gimp_dnd_data_source_remove() to never change a source widget's target list but instead create a new list without the removed target and replace the source widget's list, keeping the ongoing drag's list unaffected. Also kept all the GIMP_LOG() stuff I added during debugging there, it turned out to be quite useful. (cherry picked from commit 16938bb667d782979a9fe88be00ea2ecfd9c3c8a) app/widgets/gimpdnd.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 168 insertions(+), 39 deletions(-)