fixes for disable Windows Functionality

pull/2/head
Michail Vourlakos 7 years ago
parent 2742be427b
commit b8c07b8523

@ -60,6 +60,7 @@ Item {
property bool editMode: latteDock ? latteDock.editMode : plasmoid.userConfiguring
property bool disableRestoreZoom: false //blocks restore animation in rightClick
property bool disableAllWindowsFunctionality: root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator
property bool dropNewLauncher: false
readonly property bool hasInternalSeparator: parabolicManager.hasInternalSeparator
property bool inActivityChange: false

@ -823,7 +823,7 @@ MouseArea{
//positive direction
if (angle > 12) {
if (isLauncher) {
if (isLauncher || root.disableAllWindowsFunctionality) {
inWheelAction = true;
wrapper.runLauncherAnimation();
} else if (isGroupParent) {
@ -841,7 +841,7 @@ MouseArea{
}
//negative direction
} else if (angle < -12) {
if (isLauncher) {
if (isLauncher || root.disableAllWindowsFunctionality) {
// do nothing
} else if (isGroupParent) {
tasksWindows.activatePreviousTask();
@ -894,7 +894,7 @@ MouseArea{
}
function activateTask() {
if( mainItemContainer.isLauncher || (root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)){
if( mainItemContainer.isLauncher || root.disableAllWindowsFunctionality){
if (Latte.WindowSystem.compositingActive) {
wrapper.runLauncherAnimation();
} else {
@ -1008,12 +1008,12 @@ MouseArea{
// if ((lastButtonClicked == Qt.LeftButton)||(lastButtonClicked == Qt.MidButton)){
if (Latte.WindowSystem.compositingActive) {
inBouncingAnimation = true;
if (!(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)) {
if (!root.disableAllWindowsFunctionality) {
root.addWaitingLauncher(mainItemContainer.launcherUrl);
}
}
if (root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator) {
if (root.disableAllWindowsFunctionality) {
tasksModel.requestNewInstance(modelIndex());
} else {
tasksModel.requestActivate(modelIndex());

@ -151,7 +151,7 @@ Item{
&& !root.reverseLinesPosition)
|| (((root.position === PlasmaCore.Types.BottomPositioned) || (root.position === PlasmaCore.Types.RightPositioned))
&& root.reverseLinesPosition) )
&& !(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)
&& !root.disableAllWindowsFunctionality
visible: active
sourceComponent: Component{
@ -165,7 +165,7 @@ Item{
active: secondIndicator.active && !root.reverseLinesPosition
&& (mainItemContainer.inAttentionAnimation || mainItemContainer.inFastRestoreAnimation)
&& !(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)
&& !root.disableAllWindowsFunctionality
visible: active
sourceComponent: Component{
@ -194,7 +194,7 @@ Item{
active: firstIndicator.active && !root.reverseLinesPosition
&& (mainItemContainer.inAttentionAnimation || mainItemContainer.inFastRestoreAnimation)
&& !(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)
&& !root.disableAllWindowsFunctionality
visible: active
sourceComponent: Component{
@ -218,7 +218,7 @@ Item{
Loader{
id: secondIndicator
active: !firstIndicator.active
&& !(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)
&& !root.disableAllWindowsFunctionality
visible: active
sourceComponent: Component{

@ -60,7 +60,7 @@ SequentialAnimation {
//trying to fix the ListView nasty behavior
//during the removal the anchoring for ListView children changes a lot
var previousTask = icList.childAtIndex(mainItemContainer.lastValidIndex-1);
if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation && !root.showWindowsOnlyFromLaunchers){
if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation){
if (root.vertical) {
mainItemContainer.anchors.top = previousTask.bottom;
} else {
@ -158,6 +158,14 @@ SequentialAnimation {
hidePreview();
}
if (root.showWindowsOnlyFromLaunchers) {
if (root.vertical) {
mainItemContainer.anchors.top = undefined;
} else {
mainItemContainer.anchors.left = undefined;
}
}
//send signal that the launcher is really removing
if (mainItemContainer.inBouncingAnimation) {
mainItemContainer.visible = false;

@ -336,6 +336,7 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
visible: plasmoid.configuration.advanced
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked

Loading…
Cancel
Save