Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320918

Summary: [Compatibility] cannot drag stack in second WorkbenchWindow
Product: [Eclipse Project] e4 Reporter: Paul Webster <pwebster>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, emoffatt, remy.suen
Version: 1.0Flags: pwebster: review+
Target Milestone: 1.0 RC3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to add a DnDManager to each window none

Description Paul Webster CLA 2010-07-26 11:08:34 EDT
I started with a new workspace and dragged around my outline view.  Then I opened a second window and attempted to place its outline view in a similar position.

The second window won't allow dragging of any views/stacks.

Remy mentioned:

Widget widget = (Widget) event.getProperty(EventTags.NEW_VALUE);
if (widget instanceof Shell) {
  if (dndMgr == null) {
    dndMgr = new DnDManager((MWindow) changedElement);
  }
}

PW
Comment 1 Remy Suen CLA 2010-07-26 11:10:37 EDT
(In reply to comment #0)
> Remy mentioned:
> 
> Widget widget = (Widget) event.getProperty(EventTags.NEW_VALUE);
> if (widget instanceof Shell) {
>   if (dndMgr == null) {
>     dndMgr = new DnDManager((MWindow) changedElement);
>   }
> }

That's from org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon.

Looks like we only ever make a manager for one window, or so it seems to me anyway.
Comment 2 Eric Moffatt CLA 2010-07-26 11:11:54 EDT
Sheesh, good pickup...patch on the way.
Comment 3 Eric Moffatt CLA 2010-07-26 11:24:38 EDT
Created attachment 175229 [details]
Patch to add a DnDManager to each window
Comment 4 Paul Webster CLA 2010-07-26 11:43:32 EDT
(In reply to comment #3)
> Created an attachment (id=175229) [details]
> Patch to add a DnDManager to each window

Definitely fixed the problem for me.

PW
Comment 5 Remy Suen CLA 2010-07-26 12:06:03 EDT
(In reply to comment #4)
> Definitely fixed the problem for me.

Same.
Comment 6 Paul Webster CLA 2010-07-26 13:07:59 EDT
+1

PW
Comment 7 Boris Bokowski CLA 2010-07-26 13:15:14 EDT
+1.
Comment 8 Eric Moffatt CLA 2010-07-26 13:26:43 EDT
Committed in >20100726. Applied the patch.
Comment 9 Eric Moffatt CLA 2010-07-27 14:58:18 EDT
Verified on XP in I20100726-2152.