mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
bugfix: disable active item drop out
Change-Id: I75c6885421cdedb14efe6c0cffdbdcefa22073cd
This commit is contained in:
parent
be985ca876
commit
4edf104acd
Notes:
Deepin Code Review
2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: <mr.asianwang@gmail.com> Submitted-by: <mr.asianwang@gmail.com> Submitted-at: Wed, 16 Sep 2015 17:04:46 +0800 Reviewed-on: https://cr.deepin.io/7072 Project: dde/dde-dock Branch: refs/heads/master
@ -31,9 +31,16 @@ void ScreenMask::dropEvent(QDropEvent *event)
|
||||
sourceItem = dynamic_cast<AppItem *>(event->source());
|
||||
if (sourceItem)
|
||||
{
|
||||
DBusDockedAppManager dda;
|
||||
if (dda.IsDocked(sourceItem->itemData().id))
|
||||
//restore item to dock if item is actived
|
||||
if (sourceItem->itemData().isActived){
|
||||
emit itemMissing();
|
||||
return;
|
||||
}
|
||||
|
||||
if (sourceItem->itemData().isDocked){
|
||||
DBusDockedAppManager dda;
|
||||
dda.RequestUndock(sourceItem->itemData().id);
|
||||
}
|
||||
|
||||
qWarning() << "Item drop here:" << event->pos() << event->mimeData()->hasImage();
|
||||
QImage image = qvariant_cast<QImage>(event->mimeData()->imageData());
|
||||
|
Loading…
x
Reference in New Issue
Block a user