wayland: Refuse starting dnd if there's another dnd session in progress
If a new drag and drop session is started while there is already one existing, it's possible to end up in a situation where the SeatInterface::dragEnded signal is emitted the second time when one of the data sources is destroyed. CCBUG: 460374
This commit is contained in:
parent
1c3a987d74
commit
ee4cf67371
1 changed files with 4 additions and 0 deletions
|
@ -1352,6 +1352,10 @@ void SeatInterface::setPrimarySelection(AbstractDataSource *selection)
|
|||
|
||||
void SeatInterface::startDrag(AbstractDataSource *dragSource, SurfaceInterface *originSurface, int dragSerial, DragAndDropIcon *dragIcon)
|
||||
{
|
||||
if (d->drag.mode != SeatInterfacePrivate::Drag::Mode::None) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasImplicitPointerGrab(dragSerial)) {
|
||||
d->drag.mode = SeatInterfacePrivate::Drag::Mode::Pointer;
|
||||
d->drag.transformation = d->globalPointer.focus.transformation;
|
||||
|
|
Loading…
Reference in a new issue