Bug 310363

Summary: problem with extendedWindowBorders and dragAndDrop
Product: [Plasma] kwin Reporter: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Severity: normal CC: hugo.pereira.da.costa
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: example code that shows the drag and drop issue. See "steps to reproduce" above

Description Hugo Pereira Da Costa 2012-11-19 18:28:37 UTC
As soon as I enable ExtendedWindowBorders in oxygen (or use a decoration that implements it, e.g. BeSpin), I get issues with drag and drop for some (but not all) applications: basically dragging is still possible but all drop targets (that are normally enabled), gets forbidden, and nothing happens on drop. 
Applications for which drag-and-drop gets broken: 
- amarok (dragging music from collection to playlist for instance)
- ark (dragging files from archive to dolphin, or konsole)
- the super simple application that I will attach in next comment (dragging from it to e.g. dolphin)

Applications that are not affected: 
- dolphin.
(I believe it is because it uses a QGraphicsView instead of QTreeView, as the other application do). 

Note: I already discussed the issue with Thomas, who apparently could not reproduce the issue, so first thing I want to check is whether or not someone else can reproduce. (this is somewhat critical, since ExtendedWindowBorders will be one of the very few new features for oxygen in KDE-4.10)

Reproducible: Always

Steps to Reproduce:
1. compile the application provided in the next comment
2. see how drag and drop "works" from the main (and only) window, to e.g. dolphin, to copy/paste files (this is non destructive: dolphin allows you to cancel, after dropping), as long as you use, for instance, Plastique for a window decoration
3. try achieve the same when using latest oxygen (or latest bespin). Here at least, the same drag and drop action fails. Dropping remains disabled in dolphin, and nothing happens on drop.
Comment 1 Hugo Pereira Da Costa 2012-11-19 18:29:52 UTC
Created attachment 75358 [details]
example code that shows the drag and drop issue. See "steps to reproduce" above
Comment 2 Thomas Lübking 2012-11-21 00:10:40 UTC
FTR: Hugo contacted me on this before.

I've so far failed to reproduce the problem (with either combo of bespin/oxygen deco/style) and can confirm that the testcase doesn't expose this issue here as well =)

Might be a local issue with the xshape extension, but we need more ppl. to test this.

Iirc, Hugo has so far tested:
- client graphicssystem
- kwin graphicssystem
- compositor type
- unix event dispatcher in clients

(@Hugo: turned out i only get the XdndSelection events  on few testedit windows - that's not related)
Comment 3 Hugo Pereira Da Costa 2012-11-21 20:16:55 UTC
@Thomas, for my information, which Qt version do you run ? 
(I somehow believe this is a Qt issue in fact, or its way  to handle drag and drop, since no Gtk application seems affected, and dolphin is not either).
Comment 4 Thomas Lübking 2012-11-21 20:50:25 UTC
4.8.3-5 (atm, some earlier build when this started)


There should not be no custom downstream patches applied
Comment 5 Hugo Pereira Da Costa 2012-11-21 23:24:23 UTC
... that was it.
Upgrading from Qt 4.8.2 (from distro) to 4.8.3 (compiled from source) fixed it.
Closing as upstream, then ...
Thomas, thanks for the help and suggestions.

Comment 6 Thomas Lübking 2012-11-21 23:52:11 UTC
Probably been https://codereview.qt-project.org/#change,24361
Comment 7 Martin Flöser 2012-11-23 07:06:13 UTC
I can confirm that the problem exists with Qt 4.8.2, which is unfortunately 
still shipped with Debian Testing. Seems I have to disable the feature again - 
easier than compiling Qt :-P