Bug 312784

Summary: Can't drag and drop files or folders on edgeless windows
Product: [Plasma] kwin Reporter: Josep Febrer <jfebrer>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: hugo.pereira.da.costa
Priority: NOR    
Version: 4.9.95 (RC 1)   
Target Milestone: 4.10 RC 3   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Josep Febrer 2013-01-07 00:06:31 UTC
After upgrading to KDE 4.10 RC1 I discovered that I can't drag-and-drop files or folders using Dolphin or Konqueror file managers or even in the open file dialog.
I can start DnD but when I point to the target and unclick sometimes nothing happens and other times the cursor shows the crossed circle.
But it only happens with the fileview, it can be on the same Dolphin window or another one, but I can DnD an image or folder to the Plasma Desktop or a folderview widget.
On Amarok I also can't DnD to the playlist.
Initially I thought that this bug was due to the style I was using, Bespin, so I reported there, but after some investigation it's mantainer suggested me to open a bug report here.

http://sourceforge.net/p/cloudcity/bugs/132/

To summarize, it only affected when I was using Bespin, using other styles didn't, but neither with Bespin default settings, so I investigated my settings and I discovered that an option on Bespin decoration to use edgeless windows was the culprit here.
Thomas Luebking, Bespin creator, believes it's an input shaping bug on KWin.

From my testing it only affects KDE applications, but not GTK+ applications like Thunar file manager.

My system is Debian unstable using Xorg 1.12.4, my graphic card is Intel SandyBridge using a current git build of 2.20.7 version with mesa 9.0.1.

These are other X11 packages I have installed:

x11-common               1:7.7+1        
x11-session-utils        7.6+2          
x11-utils                7.7~1          
x11-xfs-utils            7.7~1          
x11-xkb-utils            7.7~1          
x11-xserver-utils        7.7~3          
x11proto-composite       1:0.4.2-2      
x11proto-core            7.0.23-1       
x11proto-damage          1:1.2.1-2      
x11proto-dri2            2.6-2          
x11proto-fixes           1:5.0-2        
x11proto-fonts           2.1.2-1        
x11proto-gl              1.4.15-1       
x11proto-input           2.2-1          
x11proto-kb              1.0.6-2        
x11proto-print           1.0.5-2        
x11proto-randr           1.3.2-2        
x11proto-record          1.14.2-1       
x11proto-render          2:0.11.1-2     
x11proto-scrnsaver       1.2.2-1        
x11proto-video           2.3.1-2        
x11proto-xext            7.2.1-1        
x11proto-xf86dri         2.1.1-2        
x11proto-xf86vidmode     2.3.1-2       
x11proto-xinerama        1.2.1-2 
libva-x11-1              1.0.16 
libx11-6                 2:1.5.0-1        
libx11-xcb1              2:1.5.0-1   
libx86-1                 1.1+ds1-10  
libxau6                  1:1.0.7-1      
libxaw7                  2:1.0.10-2     
libxcb-composite0        1.8.1-2        
libxcb-damage0           1.8.1-2        
libxcb-dri2-0            1.8.1-2        
libxcb-glx0              1.8.1-2        
libxcb-image0            0.3.9-1        
libxcb-keysyms1          0.3.9-1        
libxcb-randr0            1.8.1-2         
libxcb-render-util0      0.3.8-1.1       
libxcb-render0           1.8.1-2         
libxcb-shape0            1.8.1-2         
libxcb-shm0              1.8.1-2         
libxcb-sync0             1.8.1-2         
libxcb-util0             0.3.8-2         
libxcb-xfixes0           1.8.1-2         
libxcb-xv0               1.8.1-2         
libxcb1                  1.8.1-2         
libxcomposite1           1:0.4.3-2       
libxcursor1              1:1.1.13-1      
libxdamage1              1:1.1.3-2       
libxdmcp6                1:1.1.1-1       
libxext6                 2:1.3.1-2       
libxfixes3               1:5.0-4         
libxfont1                1:1.4.5-2       
libxft2                  2.3.1-1         
libxi6                   2:1.6.1-1       
libxinerama1             2:1.1.2-1       
libxkbcommon0            0.2.0   
libxkbfile1              1:1.0.8-1       
libxmu6                  2:1.1.1-1    
libxmuu1                 2:1.1.1-1    
libxp6                   1:1.0.1-2    
libxpm4                  1:3.5.10-1   
libxrandr2               2:1.3.2-2    
libxrender1              1:0.9.7-1    
libxss1                  1:1.2.2-1    
libxt6                   1:1.1.3-1    
libxtst6                 2:1.2.1-1    
libxv1                   2:1.0.7-1    
libxvmc1                 2:1.0.7-1    
libxwiimote1             0.3+20120630
libxxf86dga1             2:1.1.3-2    
libxxf86vm1              1:1.1.2-1

And the output of xdpyinfo:

name of display:    :0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    11204000
X.Org version: 1.12.4
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x380001c, revert to PointerRoot
number of extensions:    27
    BIG-REQUESTS
    Composite
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    DRI2
    GLX
    Generic Event Extension
    MIT-SCREEN-SAVER
    MIT-SHM
    RANDR
    RECORD
    RENDER
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-VidModeExtension
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0xe5
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x22
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xfac031
    KeyPressMask             EnterWindowMask          LeaveWindowMask          
    KeymapStateMask          ExposureMask             StructureNotifyMask      
    SubstructureNotifyMask   SubstructureRedirectMask FocusChangeMask          
    PropertyChangeMask       ColormapChangeMask       
  number of visuals:    40
  default visual id:  0x20
  visual:
    visual id:    0x20
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x21
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xbf
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc0
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc1
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc2
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc3
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc4
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc5
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc6
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc7
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc8
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xc9
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xca
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xcb
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xcc
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xcd
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xce
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xcf
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd0
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd1
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd2
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd3
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd4
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd5
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd6
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd7
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd8
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xd9
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xda
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xdb
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xdc
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xdd
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xde
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xdf
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xe0
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xe1
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xe2
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0xe3
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x82
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits

Reproducible: Always

Steps to Reproduce:
1. On Dolphin drag a file or a directory and drop it to another directory or device.
2. Instead of appearing the move/copy/link menu nothing happens and sometimes while you are dragging the cursor show the crossed circle on every possible target.
3. Droping from Dolphin to the Plasma Desktop or folderview widget works, and dragging from Thunar to Dolphin also works but not the opposite.
Actual Results:  
Nothing.

Expected Results:  
It should appear the move/copy/link menu.
Comment 1 Thomas Lübking 2013-01-07 00:39:45 UTC
Hey Hugo, you got a confirmer ;-)

Observation from my side:
i'm on libxext 1.3.1 as well, but server 1.13 since first half of september .

Matching that against https://git.reviewboard.kde.org/r/106715/ i've never tried it on a 1.12 server.
Comment 2 Thomas Lübking 2013-01-07 06:42:57 UTC
Oh, and @Jopsep
which Qt version do you use? (Just recalling that there was something and there's at least a fix mention in the 4.8.3 release note...)

http://qt-project.org/uploads/community_updates/changes-4.8.3
Comment 3 Hugo Pereira Da Costa 2013-01-07 09:36:57 UTC
if indeed Qt is below 4.8.3, I suspect it to be a duplicate of another bug which I can't find anymore.
In all cases, I guess  we could #ifdef the feature based on Qt version. Thomas ? you agree ?
Comment 4 Josep Febrer 2013-01-07 10:14:28 UTC
I'm using Qt 4.8.2, I'll try later with Qt 4.8.3 and report here.
Comment 5 Martin Flöser 2013-01-07 10:25:53 UTC
> In all cases, I guess  we could #ifdef the feature based on Qt version.
> Thomas ? you agree ?
Disagree. An update to Qt will fix it, but kde-workspace doesn't get 
recompiled once Qt is updated. It would need a runtime check...
Comment 6 Hugo Pereira Da Costa 2013-01-07 10:41:26 UTC
@Martin
Correct. So  should use qVersion()
Should create no overhead in oxygen at least since there is already an hidden option to disable the feature. Will just make the check at the same time.
Comment 7 Martin Flöser 2013-01-07 10:49:01 UTC
> @Martin
> Correct. So  should use qVersion()
> Should create no overhead in oxygen at least since there is already an
> hidden option to disable the feature. Will just make the check at the same
> time.
maybe in KWin core? Because Aurorae also supports it now. Maybe we should also 
add a check in the styles KCM so that one cannot select the option in window 
decoration if the Qt version is incorrect?
Comment 8 Thomas Lübking 2013-01-07 14:21:42 UTC
If we get confirmation on the Qt bug, it should happen in KWin core to affect all decos (or craig and cristoph would have to know and clone the code anyway)

Ideally ... does someone still use Qt 4.8.1? Otherwise i'll try to figure whether the bug only affected 4.8.2

@Hugo: i couldn't find your bug anymore either, so i advised the josep to create a new one; much luck searching ;-)
Comment 9 Josep Febrer 2013-01-07 22:06:36 UTC
I just build Qt 4.8.3 and I can confirm this bug is fixed with it.
Comment 10 Thomas Lübking 2013-01-08 20:52:02 UTC
Git commit 9b2f9cc354cbb1a4032b8238299b5f57f68cb10b by Thomas Lübking.
Committed on 07/01/2013 at 19:50.
Pushed by luebking into branch 'KDE/4.10'.

don't use input windows on Qt < 4.8.3

According to aacid, it's been broken in every Qt version before
REVIEW: 108249

M  +14   -0    kwin/client.cpp

http://commits.kde.org/kde-workspace/9b2f9cc354cbb1a4032b8238299b5f57f68cb10b