mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-22 14:50:31 +03:00
fix contextmenu blocking parab.effect
This commit is contained in:
parent
f2f2a469d3
commit
b30caca172
@ -774,7 +774,19 @@ PlasmaComponents.ContextMenu {
|
||||
text: i18n("Add Internal Separator")
|
||||
|
||||
onClicked: {
|
||||
root.addSeparator(visualParent.itemIndex);
|
||||
var pos=visualParent.itemIndex;
|
||||
|
||||
var separatorName = parabolicManager.freeAvailableSeparatorName();
|
||||
|
||||
if (separatorName !== "") {
|
||||
parabolicManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
|
||||
|
||||
if (latteDock && latteDock.launchersGroup >= Latte.Dock.LayoutLaunchers) {
|
||||
latteDock.universalLayoutManager.launchersSignals.addLauncher(latteDock.launchersGroup, separatorName);
|
||||
} else {
|
||||
tasksModel.requestAddLauncher(separatorName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,7 @@ Item {
|
||||
|
||||
//! launchersToBeMoved, new launchers to have been added and must be repositioned
|
||||
function addLauncherToBeMoved(launcherUrl, toPos) {
|
||||
if (!hasLauncherToBeMoved(launcherUrl)) {
|
||||
if (!isLauncherToBeMoved(launcherUrl)) {
|
||||
launchersToBeMoved.push({launcher: launcherUrl, pos: Math.max(0,toPos)});
|
||||
//console.log("-add launcher-");
|
||||
//printLaunchersToBeMoved()
|
||||
@ -485,7 +485,7 @@ Item {
|
||||
}
|
||||
|
||||
function moveLauncherToCorrectPos(launcherUrl, from) {
|
||||
if (hasLauncherToBeMoved(launcherUrl)) {
|
||||
if (isLauncherToBeMoved(launcherUrl)) {
|
||||
launchersToBeMovedTimer.from = from;
|
||||
launchersToBeMovedTimer.to = posOfLauncherToBeMoved(launcherUrl);
|
||||
launchersToBeMovedTimer.launcherUrl = launcherUrl
|
||||
@ -496,7 +496,7 @@ Item {
|
||||
}
|
||||
|
||||
function removeLauncherToBeMoved(launcherUrl) {
|
||||
if (hasLauncherToBeMoved(launcherUrl)) {
|
||||
if (isLauncherToBeMoved(launcherUrl)) {
|
||||
var sLength = launchersToBeMoved.length;
|
||||
var index = -1;
|
||||
|
||||
@ -533,7 +533,7 @@ Item {
|
||||
return -1;
|
||||
}
|
||||
|
||||
function hasLauncherToBeMoved(launcher) {
|
||||
function isLauncherToBeMoved(launcher) {
|
||||
return (posOfLauncherToBeMoved(launcher) >= 0);
|
||||
}
|
||||
|
||||
@ -555,6 +555,10 @@ Item {
|
||||
latteDock.universalLayoutManager.launchersSignals.moveTask(plasmoid.id, latteDock.launchersGroup, from, to);
|
||||
}
|
||||
|
||||
if (isSeparator(launcherUrl)) {
|
||||
setSeparator(launcherUrl,to);
|
||||
}
|
||||
|
||||
tasksModel.syncLaunchers();
|
||||
}
|
||||
}
|
||||
|
@ -777,7 +777,7 @@ Item {
|
||||
if(root.latteDock)
|
||||
console.log("Plasmoid, checkListHoveredTimer was called, even though it shouldnt...");
|
||||
|
||||
if (!root.containsMouse()) {
|
||||
if ((latteDock && !latteDock.dockContainsMouse) || !root.containsMouse()) {
|
||||
if (enableDirectRenderTimer.running)
|
||||
enableDirectRenderTimer.stop();
|
||||
|
||||
@ -1488,8 +1488,8 @@ Item {
|
||||
for(var i=0; i<tasks.length; ++i){
|
||||
var task = tasks[i];
|
||||
|
||||
// console.log("Checking "+i+" - "+task.index+" - "+task.containsMouse);
|
||||
if(task && task.containsMouse){
|
||||
// console.log("Checking "+i+" - "+task.index+" - "+task.containsMouse);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ MouseArea{
|
||||
if (isSeparator) {
|
||||
parabolicManager.setSeparator(launcherUrl, itemIndex);
|
||||
|
||||
if (parabolicManager.hasLauncherToBeMoved(launcherUrl) && itemIndex>=0) {
|
||||
if (parabolicManager.isLauncherToBeMoved(launcherUrl) && itemIndex>=0) {
|
||||
parabolicManager.moveLauncherToCorrectPos(launcherUrl, itemIndex);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user