wayland: End the drag properly when user cancels the drag

This commit is contained in:
Sergio Martins
2020-10-15 19:02:46 +01:00
parent d44a173945
commit f3d7400c15
2 changed files with 14 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
#include "FloatingWindow_p.h"
#include "Config.h"
#include "indicators/ClassicIndicators_p.h"
#include "Utils_p.h"
#ifdef KDDOCKWIDGETS_QTWIDGETS
# include "indicators/ClassicIndicators_p.h"
@@ -90,6 +91,12 @@ FloatingWindow *DefaultWidgetFactory::createFloatingWindow(Frame *frame, MainWin
DropIndicatorOverlayInterface *DefaultWidgetFactory::createDropIndicatorOverlay(DropArea *dropArea) const
{
if (isWayland() && s_dropIndicatorType == DropIndicatorType::Classic) {
qWarning() << Q_FUNC_INFO << "Classical indicators aren't supported on Wayland yet."
<< "Falling back to Segmented Indicators";
s_dropIndicatorType = DropIndicatorType::Segmented;
}
switch (s_dropIndicatorType) {
case DropIndicatorType::Classic:
return new ClassicIndicators(dropArea);