From 0e6c41f83e6bad3ebfd3832eb5b8bed7fc6d38ca Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sat, 4 Jul 2015 10:21:37 +0200 Subject: [PATCH] Set visualParent of the QueryDialog Now when the applet is on the Desktop the dialog is positioned properly but in a panel it's still broken. Looks like a bug in PlasmaComponents.Dialog CCBUG: 349887 --- applets/lock_logout/contents/ui/lockout.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applets/lock_logout/contents/ui/lockout.qml b/applets/lock_logout/contents/ui/lockout.qml index 635389a3c..3ac3a89eb 100644 --- a/applets/lock_logout/contents/ui/lockout.qml +++ b/applets/lock_logout/contents/ui/lockout.qml @@ -97,7 +97,7 @@ Flow { id: mouseArea anchors.fill: parent hoverEnabled: true - onReleased: clickHandler(modelData.operation) + onReleased: clickHandler(modelData.operation, this) PlasmaCore.ToolTipArea { anchors.fill: parent @@ -140,19 +140,19 @@ Flow { } property QueryDialog sleepDialog - function clickHandler(what) { + function clickHandler(what, button) { if (what == "suspendToDisk") { if (!hibernateDialog) { hibernateDialog = hibernateDialogComponent.createObject(lockout); } - + hibernateDialog.visualParent = button hibernateDialog.open(); } else if (what == "suspendToRam") { if (!sleepDialog) { sleepDialog = sleepDialogComponent.createObject(lockout); } - + sleepDialog.visualParent = button sleepDialog.open(); } else {