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

Bug 454940

Summary: [GTK3] DND does not work on ExpandBar
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: SWTAssignee: Leo Ufimtsev <lufimtse>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: akurtako, akurtakov, arnetheduck
Version: 4.4   
Target Milestone: 4.5 M5   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=538114
Whiteboard:
Bug Depends on:    
Bug Blocks: 428852    
Attachments:
Description Flags
DND issue on expand bar none

Description Leo Ufimtsev CLA 2014-12-11 15:38:49 EST
Similar to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=453827

Except DND doesn't function if a widget is inside a 'ExpandBar' on GTK3. 

I am investigating/working on a fix now.
Comment 1 Leo Ufimtsev CLA 2015-01-09 12:44:37 EST
Created attachment 249826 [details]
DND issue on expand bar

It looks like the issue with ExpandBar is similar as with:
Bug 454936 - [GTK3] DND does not work on TabFolder

In the sense that Expandbar's children are siblings of ExpandBar on the GTK side and DND events don't perculate down to them properly. 
(see screenshot of GTK Inspector)

I'll work on fixing the child nesting mechanism now.
Comment 2 Leo Ufimtsev CLA 2015-01-09 16:01:54 EST
I got DND to work in ExpandBar by nesting children under the ExpandItems when ExpandItem.setControl(..) is called.

However, size and positioning computations are broken. I'm working on fixing those.

Preview patch:
https://git.eclipse.org/r/39332
Comment 3 Leo Ufimtsev CLA 2015-01-13 11:38:19 EST
~~ Status update.

Fixed the child positioning issue on gtk3:

Now I'll investigate if I can back port this business to gtk2 and I'll need to do an array of testing.

This'll take a day or two.
Comment 4 Leo Ufimtsev CLA 2015-01-13 14:34:57 EST
All finished and tested. DND works and child widgets look legit.
More details in the commit msg. 

Please review:
https://git.eclipse.org/r/#/c/39332/
Comment 5 Leo Ufimtsev CLA 2015-01-13 14:47:25 EST
Please also review minor refactor of TabItem so that they use common code:
https://git.eclipse.org/r/#/c/39529/
Comment 6 Leo Ufimtsev CLA 2015-01-19 16:07:42 EST
(In reply to Leo Ufimtsev from comment #5)
> Please also review minor refactor of TabItem so that they use common code:
> https://git.eclipse.org/r/#/c/39529/

Please ignore that refactor. There was gtk code in the wrong place.
Instead I moved a gtk call that is common to TabItem/Expandbar Item into swt/gtk widget.

I.e, please only review:
https://git.eclipse.org/r/#/c/39332/

Note to self: refactor tabItem once this is merged.
Comment 7 Alexander Kurtakov CLA 2015-01-20 06:12:29 EST
Thanks for the patch. Merged in master.
Comment 8 Leo Ufimtsev CLA 2015-04-30 12:24:56 EDT
*** Bug 223486 has been marked as a duplicate of this bug. ***