Bug 294533 - Dolphin does not hide tool-tip when dragging files
Summary: Dolphin does not hide tool-tip when dragging files
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-20 22:40 UTC by Yannick Roehlly
Modified: 2012-02-28 12:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.1
Sentry Crash Report:


Attachments
Backtrace (11.44 KB, application/octet-stream)
2012-02-26 20:57 UTC, Yannick Roehlly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick Roehlly 2012-02-20 22:40:32 UTC
Version:           2.0 (using KDE 4.8.0) 
OS:                Linux

When dragging a file one a Dolphin window that has files in its view, the tool-tip of the files the mouse passes over are shown and the last one is not hidden. The "move here, copy here, link here..." menu may then be shown under this tool-tip.

Reproducible: Always

Steps to Reproduce:
1. Open two Dolphin windows.
2. Drag a file from one to the other passing over files of the target window until you reach a free space of the window.

Actual Results:  
The tool-tip of the last file is still shown even when the mouse reaches an empty space.

Expected Results:  
Dolphin should either hide the last tool-tip when the mouse reaches an empty space or not show any tool-tip at all.
Comment 1 Peter Penz 2012-02-21 16:06:56 UTC
Git commit 72fe0317cac590dec78283bc71d2bb98fcd4ea32 by Peter Penz.
Committed on 21/02/2012 at 17:05.
Pushed by ppenz into branch 'KDE/4.8'.

Don't show tooltips when dragging to another Dolphin window
FIXED-IN: 4.8.1

M  +1    -1    dolphin/src/views/dolphinview.cpp

http://commits.kde.org/kde-baseapps/72fe0317cac590dec78283bc71d2bb98fcd4ea32
Comment 2 Peter Penz 2012-02-21 16:07:26 UTC
Git commit 0a24745ffaee759e30a41b5424a13161a90d74bd by Peter Penz.
Committed on 21/02/2012 at 17:05.
Pushed by ppenz into branch 'master'.

Don't show tooltips when dragging to another Dolphin window
FIXED-IN: 4.8.1

M  +1    -1    dolphin/src/views/dolphinview.cpp

http://commits.kde.org/kde-baseapps/0a24745ffaee759e30a41b5424a13161a90d74bd
Comment 3 Yannick Roehlly 2012-02-21 19:10:09 UTC
Thanks Peter! I've compiled the git Dolphin source and it works perfectly.
Comment 4 Peter Penz 2012-02-21 19:18:49 UTC
Thanks for checking :-) It is always good if the testing is not done only by the developer himself.
Comment 5 Yannick Roehlly 2012-02-21 22:06:59 UTC
Hi Peter,

Looking at the diff, I guess it only works because the target window does not get the focus while drag-dropping. If I focus the target with Alt-Tab while dragging, the problem is still present. But maybe this is not a big issue.

The side effect is that people using "click to get focus" won't have the tool-tip if they don't click to focus the Dolphin window.

Also, I noted that the "open folder on drag-and-drop" does not work but I don't know if it's related to the fix. Do you want me to test with 4.8.0 source?

Yannick
Comment 6 Peter Penz 2012-02-22 08:57:57 UTC
> If I focus the target with Alt-Tab while dragging, the problem
> is still present. But maybe this is not a big issue.

I've reopened the issue: At least in my environment I get a crash in this case deep inside of Qt. I'm not sure whether it is a Qt-issue or whether Dolphin uses the drag-mechanism in a wrong way, however I need to investigate more deeply here...

> The side effect is that people using "click to get focus" won't
> have the tool-tip if they don't click to focus the Dolphin window.

I'd say that behavior is ok as it is consistent with the "default tooltip" mechanism. But as you say above it would get a problem for people where the window gets the focus during drag as in this case querying the mouse-button-state from QApplication still will report that nothing has been pressed...

> Also, I noted that the "open folder on drag-and-drop" does not work
> but I don't know if it's related to the fix. 

Hm, this works here (4.8.x latest). Does it not work for you also when using the split-view? Or only when dragging between windows?
Comment 7 Yannick Roehlly 2012-02-22 22:37:05 UTC
Hi Peter. In fact, the open folder while dragging works here. I think I was too tired when I tried yesterday.
Comment 8 Peter Penz 2012-02-23 09:16:13 UTC
These are good news ;-) I hope I've some time during the next days to really fix this issue.
Comment 9 Peter Penz 2012-02-23 14:54:55 UTC
Git commit 8d15abb84b059c9f29ea4d0ea06e6ebd1d800061 by Peter Penz.
Committed on 23/02/2012 at 15:51.
Pushed by ppenz into branch 'KDE/4.8'.

Fix drag and drop issue when dragging between windows

Explicitly check whether a dragging is ongoing to decide whether a
tooltip may be shown or not, just using QApplication::mouseButtons()
is not sufficient when dragging between windows.
FIXED-IN: 4.8.1

M  +19   -1    dolphin/src/views/dolphinview.cpp
M  +6    -4    dolphin/src/views/dolphinview.h

http://commits.kde.org/kde-baseapps/8d15abb84b059c9f29ea4d0ea06e6ebd1d800061
Comment 10 Peter Penz 2012-02-23 14:55:27 UTC
Git commit 725ec5772ad633f2b9c06354d35095a298240575 by Peter Penz.
Committed on 23/02/2012 at 15:51.
Pushed by ppenz into branch 'master'.

Fix drag and drop issue when dragging between windows

Explicitly check whether a dragging is ongoing to decide whether a
tooltip may be shown or not, just using QApplication::mouseButtons()
is not sufficient when dragging between windows.
FIXED-IN: 4.8.1

M  +19   -1    dolphin/src/views/dolphinview.cpp
M  +6    -4    dolphin/src/views/dolphinview.h

http://commits.kde.org/kde-baseapps/725ec5772ad633f2b9c06354d35095a298240575
Comment 11 Peter Penz 2012-02-23 14:57:53 UTC
@Yannick: I've updated the patch and I think it should work really well now. I've reverted my "hasFocus()"-check: Although it would be consistent with the behavior of Qt-tooltips I think it is helpful when e.g. having a split-view to also be able to show the metadata of the unfocused view.
Comment 12 Yannick Roehlly 2012-02-23 20:23:58 UTC
Hi Peter. I compiled the git head of kde-baseapps and now when I do the "alt tab" to drop onto an active target window the source Dolphin window crashes. I'll try to install debug files to investigate.
Comment 13 Peter Penz 2012-02-23 20:28:03 UTC
Strange:  I've tested exactly this usecase... Probably the backtrace might give some hints.
Comment 14 Peter Penz 2012-02-24 19:57:08 UTC
This seems to be the root-cause for the crash in Qt: https://bugreports.qt-project.org/browse/QTBUG-19363. But with the patch above at least in Dolphin there should (...) be no way now that a tooltip gets opened during dragging. However it seems to be a general issue (see also bug 192270).
Comment 15 Yannick Roehlly 2012-02-26 20:57:16 UTC
Created attachment 69121 [details]
Backtrace

Hi Peter. I've played with debug packages. Here is the backtrace of the Dolphin crash. The problem does not seem strictly related to dragging (do you want me to open another report?). I use the exposé-like app switching, if I trigger the apps switching while on a Dolphin window and move the mouse on another part of the desktop not covered by it, Dolphin crashes with the attached trace.
Comment 16 Peter Penz 2012-02-27 08:01:37 UTC
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f602018a760 (LWP 5471))]

Thread 3 (Thread 0x7f600b2bd700 (LWP 5472)):
#0  0x00007f601fa98cc3 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f6016f9c5d8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6016f9ca99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f601ca9bdf6 in QEventDispatcherGlib::processEvents (this=0x19e2f70, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f601ca6b5f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f601ca6b847 in QEventLoop::exec (this=0x7f600b2bcdf0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f601c96b307 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f601ca4b3af in QInotifyFileSystemWatcherEngine::run (this=0x1a018c0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f601c96e32b in QThreadPrivate::start (arg=0x1a018c0) at thread/qthread_unix.cpp:298
#9  0x00007f6017c70b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007f601faa390d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f60094f5700 (LWP 5481)):
#0  0x00007f601fa98cc3 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f6016f9c5d8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6016f9ca99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f601ca9bdf6 in QEventDispatcherGlib::processEvents (this=0x2127ec0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f601ca6b5f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f601ca6b847 in QEventLoop::exec (this=0x7f60094f4df0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f601c96b307 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f601ca4b3af in QInotifyFileSystemWatcherEngine::run (this=0x21cbba0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f601c96e32b in QThreadPrivate::start (arg=0x21cbba0) at thread/qthread_unix.cpp:298
#9  0x00007f6017c70b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007f601faa390d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f602018a760 (LWP 5471)):
[KCrash Handler]
#6  QDragManager::move (this=0x2659480, globalPos=...) at kernel/qdnd_x11.cpp:1651
#7  0x00007f601bbfe629 in QDragManager::eventFilter (this=0x2659480, o=<optimized out>, e=<optimized out>) at kernel/qdnd_x11.cpp:1299
#8  0x00007f601ca6c8dc in QCoreApplicationPrivate::sendThroughApplicationEventFilters (this=0x18034c0, receiver=0x250c800, event=0x7fff770873f0) at kernel/qcoreapplication.cpp:967
#9  0x00007f601bb72e36 in QApplicationPrivate::notify_helper (this=0x18034c0, receiver=0x250c800, e=0x7fff770873f0) at kernel/qapplication.cpp:4530
#10 0x00007f601bb78613 in QApplication::notify (this=<optimized out>, receiver=0x250c800, e=0x7fff770873f0) at kernel/qapplication.cpp:4098
#11 0x00007f601d51c5d6 in KApplication::notify (this=0x7fff7708ad20, receiver=0x250c800, event=0x7fff770873f0) at ../../kdeui/kernel/kapplication.cpp:311
#12 0x00007f601ca6c80c in QCoreApplication::notifyInternal (this=0x7fff7708ad20, receiver=0x250c800, event=0x7fff770873f0) at kernel/qcoreapplication.cpp:876
#13 0x00007f601bb73e92 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#14 QApplicationPrivate::sendMouseEvent (receiver=0x250c800, event=0x7fff770873f0, alienWidget=0x0, nativeWidget=0x250c800, buttonDown=0x1b8b2e0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3166
#15 0x00007f601bbf0255 in QETWidget::translateMouseEvent (this=0x250c800, event=<optimized out>) at kernel/qapplication_x11.cpp:4515
#16 0x00007f601bbef11a in QApplication::x11ProcessEvent (this=0x7fff7708ad20, event=0x7fff77087cb0) at kernel/qapplication_x11.cpp:3641
#17 0x00007f601bc17852 in x11EventSourceDispatch (s=0x1808150, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#18 0x00007f6016f9c0cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f6016f9c8c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f6016f9ca99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007f601ca9bd8f in QEventDispatcherGlib::processEvents (this=0x17de440, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#22 0x00007f601bc174de in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007f601ca6b5f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007f601ca6b847 in QEventLoop::exec (this=0x249eae0, flags=...) at kernel/qeventloop.cpp:204
#25 0x00007f601bbfe323 in QDragManager::drag (this=0x2659480, o=<optimized out>) at kernel/qdnd_x11.cpp:1982
#26 0x00007f601bb84a08 in QDrag::exec (this=0x20a18d0, supportedActions=..., defaultDropAction=Qt::CopyAction) at kernel/qdrag.cpp:284
#27 0x00007f601ede18f7 in KItemListController::startDragging (this=0x1be1f60) at ../../../dolphin/src/kitemviews/kitemlistcontroller.cpp:1036
#28 0x00007f601ede1a8e in KItemListController::mouseMoveEvent (this=0x1be1f60, event=0x7fff77089510, transform=...) at ../../../dolphin/src/kitemviews/kitemlistcontroller.cpp:600
#29 0x00007f601ede12a0 in KItemListController::processEvent (this=0x1be1f60, event=<optimized out>, transform=...) at ../../../dolphin/src/kitemviews/kitemlistcontroller.cpp:875
#30 0x00007f601edebfd5 in KItemListView::event (this=0x1b2ed60, event=0x7fff77089510) at ../../../dolphin/src/kitemviews/kitemlistview.cpp:737
#31 0x00007f601bb72ec4 in notify_helper (e=0x7fff77089510, receiver=0x1b2ed60, this=0x18034c0) at kernel/qapplication.cpp:4555
#32 QApplicationPrivate::notify_helper (this=0x18034c0, receiver=0x1b2ed60, e=0x7fff77089510) at kernel/qapplication.cpp:4527
#33 0x00007f601bb77d43 in QApplication::notify (this=0x7fff7708ad20, receiver=0x1b2ed60, e=0x7fff77089510) at kernel/qapplication.cpp:4416
#34 0x00007f601d51c5d6 in KApplication::notify (this=0x7fff7708ad20, receiver=0x1b2ed60, event=0x7fff77089510) at ../../kdeui/kernel/kapplication.cpp:311
#35 0x00007f601ca6c80c in QCoreApplication::notifyInternal (this=0x7fff7708ad20, receiver=0x1b2ed60, event=0x7fff77089510) at kernel/qcoreapplication.cpp:876
#36 0x00007f601c17c3ce in sendEvent (event=0x7fff77089510, item=0x1b2ed70, this=<optimized out>) at graphicsview/qgraphicsscene.cpp:1213
#37 QGraphicsScenePrivate::sendEvent (this=<optimized out>, item=0x1b2ed70, event=0x7fff77089510) at graphicsview/qgraphicsscene.cpp:1193
#38 0x00007f601c17cfda in QGraphicsScenePrivate::sendMouseEvent (this=0x1db8220, mouseEvent=0x7fff77089510) at graphicsview/qgraphicsscene.cpp:1291
#39 0x00007f601c17db0c in QGraphicsScene::mouseMoveEvent (this=<optimized out>, mouseEvent=0x7fff77089510) at graphicsview/qgraphicsscene.cpp:4098
#40 0x00007f601c18bd8b in QGraphicsScene::event (this=0x1bc7cd0, event=0x7fff77089510) at graphicsview/qgraphicsscene.cpp:3447
#41 0x00007f601bb72ec4 in notify_helper (e=0x7fff77089510, receiver=0x1bc7cd0, this=0x18034c0) at kernel/qapplication.cpp:4555
#42 QApplicationPrivate::notify_helper (this=0x18034c0, receiver=0x1bc7cd0, e=0x7fff77089510) at kernel/qapplication.cpp:4527
#43 0x00007f601bb77d43 in QApplication::notify (this=0x7fff7708ad20, receiver=0x1bc7cd0, e=0x7fff77089510) at kernel/qapplication.cpp:4416
#44 0x00007f601d51c5d6 in KApplication::notify (this=0x7fff7708ad20, receiver=0x1bc7cd0, event=0x7fff77089510) at ../../kdeui/kernel/kapplication.cpp:311
#45 0x00007f601ca6c80c in QCoreApplication::notifyInternal (this=0x7fff7708ad20, receiver=0x1bc7cd0, event=0x7fff77089510) at kernel/qcoreapplication.cpp:876
#46 0x00007f601c1a5ce9 in QGraphicsViewPrivate::mouseMoveEventHandler (this=0x1db87e0, event=0x7fff7708a020) at graphicsview/qgraphicsview.cpp:646
#47 0x00007f601c1a5f1e in QGraphicsView::mouseMoveEvent (this=0x1db87b0, event=0x7fff7708a020) at graphicsview/qgraphicsview.cpp:3276
#48 0x00007f601bbc3628 in QWidget::event (this=0x1db87b0, event=0x7fff7708a020) at kernel/qwidget.cpp:8346
#49 0x00007f601bf80436 in QFrame::event (this=0x1db87b0, e=0x7fff7708a020) at widgets/qframe.cpp:557
#50 0x00007f601c1aa0eb in QGraphicsView::viewportEvent (this=0x1db87b0, event=0x7fff7708a020) at graphicsview/qgraphicsview.cpp:2866
#51 0x00007f601ca6c998 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x1b8b2e0, event=0x7fff7708a020) at kernel/qcoreapplication.cpp:986
#52 0x00007f601bb72e8f in notify_helper (e=0x7fff7708a020, receiver=0x1b8b2e0, this=0x18034c0) at kernel/qapplication.cpp:4551
#53 QApplicationPrivate::notify_helper (this=0x18034c0, receiver=0x1b8b2e0, e=0x7fff7708a020) at kernel/qapplication.cpp:4527
#54 0x00007f601bb78613 in QApplication::notify (this=<optimized out>, receiver=0x1b8b2e0, e=0x7fff7708a020) at kernel/qapplication.cpp:4098
#55 0x00007f601d51c5d6 in KApplication::notify (this=0x7fff7708ad20, receiver=0x1b8b2e0, event=0x7fff7708a020) at ../../kdeui/kernel/kapplication.cpp:311
#56 0x00007f601ca6c80c in QCoreApplication::notifyInternal (this=0x7fff7708ad20, receiver=0x1b8b2e0, event=0x7fff7708a020) at kernel/qcoreapplication.cpp:876
#57 0x00007f601bb73e92 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#58 QApplicationPrivate::sendMouseEvent (receiver=0x1b8b2e0, event=0x7fff7708a020, alienWidget=0x1b8b2e0, nativeWidget=0x1ad9b80, buttonDown=0x1b8b2e0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3166
#59 0x00007f601bbf0255 in QETWidget::translateMouseEvent (this=0x1ad9b80, event=<optimized out>) at kernel/qapplication_x11.cpp:4515
#60 0x00007f601bbef11a in QApplication::x11ProcessEvent (this=0x7fff7708ad20, event=0x7fff7708a8e0) at kernel/qapplication_x11.cpp:3641
#61 0x00007f601bc17852 in x11EventSourceDispatch (s=0x1808150, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#62 0x00007f6016f9c0cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007f6016f9c8c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00007f6016f9ca99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#65 0x00007f601ca9bd8f in QEventDispatcherGlib::processEvents (this=0x17de440, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#66 0x00007f601bc174de in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#67 0x00007f601ca6b5f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#68 0x00007f601ca6b847 in QEventLoop::exec (this=0x7fff7708acb0, flags=...) at kernel/qeventloop.cpp:204
#69 0x00007f601ca708d7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#70 0x00007f601fd9c71d in kdemain (argc=5, argv=0x7fff7708b288) at ../../../dolphin/src/main.cpp:91
#71 0x00007f601f9e9ead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff7708b278) at libc-start.c:228
#72 0x00000000004006c1 in _start ()
Comment 17 Peter Penz 2012-02-27 08:08:06 UTC
Thanks for the backtrace! Please just but backtraces directly into the bug-report so that searching for duplicates get easier :-)

However this really looks like a separate issue in Qt (probably really just https://bugreports.qt-project.org/browse/QTBUG-19363 ) and there seems to be nothing in Dolphin I can do against this. Can you reproduce this issue also with other applications? E.g. When dragging something from Gwenview?

I'd say lets keep this bug as fixed. Opening a new Dolphin report only would make sense in my opinion if you cannot reproduce the issue in Gwenview (in this case I could check what Gwenview does different in comparison to Dolphin).
Comment 18 Yannick Roehlly 2012-02-27 21:27:18 UTC
Hi Peter. Gwenview segfaults in the same way a Dolphin. Thank for fixing the (real) bug. Yannick
Comment 19 Peter Penz 2012-02-28 12:34:11 UTC
... ah, "good" that Gwenview crashes too ;-) No seriously: This really indicates the root-cause is the Qt-bug mentioned above. A patch for Qt is already in the queue (submitted by Nick Shaforostoff), I hope it will get merged soon.