1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-01 12:58:26 +03:00

fix #901,show windows only from launchers

--add an option to tasks filters in order to
hide windows that do not have launchers
This commit is contained in:
Michail Vourlakos 2018-04-06 17:49:57 +03:00
parent 0c956fac77
commit 2742be427b
11 changed files with 147 additions and 28 deletions

View File

@ -227,6 +227,10 @@
<entry name="showWindowActions" type="Bool"> <entry name="showWindowActions" type="Bool">
<default>false</default> <default>false</default>
</entry> </entry>
<entry name="showWindowsOnlyFromLaunchers" type="Bool">
<default>false</default>
<label>show only windows that there is a launcher for them</label>
</entry>
<entry name="showOnlyCurrentScreen" type="Bool"> <entry name="showOnlyCurrentScreen" type="Bool">
<default>false</default> <default>false</default>
</entry> </entry>

View File

@ -48,7 +48,8 @@ Item {
var taskIndex = -1; var taskIndex = -1;
var internSepStep = 0; var internSepStep = 0;
if(appIndex<root.latteAppletPos){ if(appIndex<root.latteAppletPos){
if (root.latteApplet.parabolicManager.taskIsSeparator(0)) if (root.latteApplet.parabolicManager.taskIsSeparator(0)
|| (!root.showWindowsWithNoLaunchers && root.latteApplet.parabolicManager.taskIsHiddenBecauseNoLauncherExists(0)) )
internSepStep = root.latteApplet.parabolicManager.availableHigherIndex(0); internSepStep = root.latteApplet.parabolicManager.availableHigherIndex(0);
taskIndex = signalStep-appStep+internSepStep; taskIndex = signalStep-appStep+internSepStep;
@ -57,7 +58,8 @@ Item {
//console.log("normal:" + taskIndex + " step:"+internSepStep + " zoom:"+zScale); //console.log("normal:" + taskIndex + " step:"+internSepStep + " zoom:"+zScale);
} else if (appIndex>root.latteAppletPos){ } else if (appIndex>root.latteAppletPos){
if (root.latteApplet.parabolicManager.taskIsSeparator(root.tasksCount-1)) if (root.latteApplet.parabolicManager.taskIsSeparator(root.tasksCount-1)
|| (!root.showWindowsWithNoLaunchers && root.latteApplet.parabolicManager.taskIsHiddenBecauseNoLauncherExists(root.tasksCount-1)) )
internSepStep = Math.abs(root.tasksCount-1 - root.latteApplet.parabolicManager.availableLowerIndex(root.tasksCount-1)); internSepStep = Math.abs(root.tasksCount-1 - root.latteApplet.parabolicManager.availableLowerIndex(root.tasksCount-1));
taskIndex = root.tasksCount-1 - (signalStep-appStep) - internSepStep; taskIndex = root.tasksCount-1 - (signalStep-appStep) - internSepStep;

View File

@ -278,7 +278,8 @@ DragDrop.DropArea {
//! for that value between 0.04 - 0.5 of iconSize, this way 100% iconMargin means //! for that value between 0.04 - 0.5 of iconSize, this way 100% iconMargin means
//! equal to the iconSize //! equal to the iconSize
property int iconMargin: Math.ceil( ((0.5 * (plasmoid.configuration.iconMargin))/100) * iconSize) property int iconMargin: Math.ceil( ((0.5 * (plasmoid.configuration.iconMargin))/100) * iconSize)
property int statesLineSize: latteApplet || (activeIndicator !== Latte.Dock.NoneIndicator) ? Math.ceil( root.iconSize/13 ) : 0 property int statesLineSize: (latteApplet && !(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator))
|| (activeIndicator !== Latte.Dock.NoneIndicator) ? Math.ceil( root.iconSize/13 ) : 0
///FIXME: <delete both> I can't remember why this is needed, maybe for the anchorings!!! In order for the Double Layout to not mess the anchorings... ///FIXME: <delete both> I can't remember why this is needed, maybe for the anchorings!!! In order for the Double Layout to not mess the anchorings...
@ -322,6 +323,7 @@ DragDrop.DropArea {
property bool glow3D: plasmoid.configuration.glow3D property bool glow3D: plasmoid.configuration.glow3D
property bool showToolTips: plasmoid.configuration.showToolTips property bool showToolTips: plasmoid.configuration.showToolTips
property bool showWindowActions: plasmoid.configuration.showWindowActions property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity

View File

@ -636,6 +636,7 @@ PlasmaComponents.ContextMenu {
} else { } else {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
root.launchersUpdatedFor(launcher);
} }
} else { } else {
@ -645,6 +646,7 @@ PlasmaComponents.ContextMenu {
latteDock.launchersGroup, launcher); latteDock.launchersGroup, launcher);
} else { } else {
tasksModel.requestAddLauncher(launcher); tasksModel.requestAddLauncher(launcher);
root.launchersUpdatedFor(launcher);
} }
} }
} }
@ -696,6 +698,7 @@ PlasmaComponents.ContextMenu {
} }
tasksModel.requestAddLauncherToActivity(url, id); tasksModel.requestAddLauncherToActivity(url, id);
root.launchersUpdatedFor(url);
} }
} else { } else {
if (latteDock && latteDock.launchersGroup >= Latte.Dock.LayoutLaunchers) { if (latteDock && latteDock.launchersGroup >= Latte.Dock.LayoutLaunchers) {
@ -706,6 +709,7 @@ PlasmaComponents.ContextMenu {
root.launcherForRemoval = url; root.launcherForRemoval = url;
} }
tasksModel.requestRemoveLauncherFromActivity(url, id); tasksModel.requestRemoveLauncherFromActivity(url, id);
root.launchersUpdatedFor(url);
} }
} }
} }
@ -761,6 +765,7 @@ PlasmaComponents.ContextMenu {
} else { } else {
root.launcherForRemoval = launcher root.launcherForRemoval = launcher
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
root.launchersUpdatedFor(launcher);
} }
} }
} }
@ -803,6 +808,7 @@ PlasmaComponents.ContextMenu {
} else { } else {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
root.launchersUpdatedFor(launcher);
} }
} }
} }

View File

@ -368,7 +368,8 @@ Item {
function availableLowerIndex(from) { function availableLowerIndex(from) {
var next = from; var next = from;
while (next>=0 && taskIsSeparator(next)) while (next>=0
&& (taskIsSeparator(next) || (root.showWindowsOnlyFromLaunchers && taskIsHiddenBecauseNoLauncherExists(next))) )
next = next - 1; next = next - 1;
return next; return next;
@ -377,8 +378,10 @@ Item {
function availableHigherIndex(from) { function availableHigherIndex(from) {
var next = from; var next = from;
while (next<=root.tasksCount-1 && taskIsSeparator(next)) while (next<=root.tasksCount-1
&& (taskIsSeparator(next) || (root.showWindowsOnlyFromLaunchers && taskIsHiddenBecauseNoLauncherExists(next))) ) {
next = next + 1; next = next + 1;
}
return next; return next;
} }
@ -402,6 +405,22 @@ Item {
return false; return false;
} }
function taskIsHiddenBecauseNoLauncherExists(taskIndex) {
var task = icList.childAtIndex(taskIndex);
if (task && root.showWindowsOnlyFromLaunchers) {
var launcherExists = !(((tasksModel.launcherPosition(task.launcherUrl) == -1)
&& (tasksModel.launcherPosition(task.launcherUrlWithIcon) == -1) )
|| !task.launcherIsPresent(task.launcherUrl));
//console.log(task.launcherUrl + " ::: " +!launcherExists + " _ " + task.isWindow);
return (!launcherExists && task.isWindow);
}
return false;
}
function separatorExists(separator){ function separatorExists(separator){
return (tasksModel.launcherPosition(separator)>=0); return (tasksModel.launcherPosition(separator)>=0);
} }
@ -444,7 +463,7 @@ Item {
return pseudoIndex + root.tasksNumbersBase; return pseudoIndex + root.tasksNumbersBase;
} }
//! first available task index found after consequent internal separators in the start //! first available task index found after consequent internal separators or hidden tasks in the start
function firstRealTask() { function firstRealTask() {
if (hasInternalSeparator) { if (hasInternalSeparator) {
var i=0; var i=0;
@ -463,11 +482,11 @@ Item {
//! last available task index found after consequent internal separators in the end //! last available task index found after consequent internal separators in the end
function lastRealTask() { function lastRealTask() {
if (hasInternalSeparator) { if (hasInternalSeparator || root.showWindowsOnlyFromLaunchers) {
var i=root.tasksCount - 1; var i = tasksModel.count - 1;
while (i>=0) { while (i>=0) {
if (!taskIsSeparator(i)) { if (!taskIsSeparator(i) && !taskIsHiddenBecauseNoLauncherExists(i) ) {
return i; return i;
} }
@ -478,7 +497,7 @@ Item {
return root.tasksCount > 0 ? root.tasksCount-1 : -1; return root.tasksCount > 0 ? root.tasksCount-1 : -1;
} }
//! the real number of tasks if we remove the internal separators //! the real number of tasks if we remove the internal separators and hidden windows in the end
function realTasks() { function realTasks() {
var space = lastRealTaskIndex - firstRealTaskIndex; var space = lastRealTaskIndex - firstRealTaskIndex;

View File

@ -181,11 +181,13 @@ Item {
property bool showOnlyCurrentActivity: latteDock ? latteDock.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity property bool showOnlyCurrentActivity: latteDock ? latteDock.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity
property bool showPreviews: latteDock ? latteDock.showToolTips : plasmoid.configuration.showToolTips property bool showPreviews: latteDock ? latteDock.showToolTips : plasmoid.configuration.showToolTips
property bool showWindowActions: latteDock ? latteDock.showWindowActions : plasmoid.configuration.showWindowActions property bool showWindowActions: latteDock ? latteDock.showWindowActions : plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: latteDock ? latteDock.showWindowsOnlyFromLaunchers : false
property bool smartLaunchersEnabled: latteDock ? latteDock.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled property bool smartLaunchersEnabled: latteDock ? latteDock.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: latteDock ? latteDock.threeColorsWindows : plasmoid.configuration.threeColorsWindows property bool threeColorsWindows: latteDock ? latteDock.threeColorsWindows : plasmoid.configuration.threeColorsWindows
property bool titleTooltips: latteDock ? latteDock.titleTooltips : false property bool titleTooltips: latteDock ? latteDock.titleTooltips : false
property alias windowPreviewIsShown: windowsPreviewDlg.visible property alias windowPreviewIsShown: windowsPreviewDlg.visible
property int activeIndicator: latteDock ? latteDock.activeIndicator : Latte.Dock.AllIndicator
property int activeIndicatorType: latteDock ? latteDock.activeIndicatorType : Latte.Dock.LineIndicator property int activeIndicatorType: latteDock ? latteDock.activeIndicatorType : Latte.Dock.LineIndicator
property int animationStep: latteDock ? latteDock.animationStep : 1 property int animationStep: latteDock ? latteDock.animationStep : 1
property int directRenderAnimationTime: latteDock ? latteDock.directRenderAnimationTime : 0 property int directRenderAnimationTime: latteDock ? latteDock.directRenderAnimationTime : 0
@ -244,6 +246,7 @@ Item {
signal clearZoomSignal(); signal clearZoomSignal();
signal draggingFinished(); signal draggingFinished();
signal launchersUpdatedFor(string launcher);
signal presentWindows(variant winIds); signal presentWindows(variant winIds);
signal requestLayout; signal requestLayout;
signal separatorsUpdated(); signal separatorsUpdated();
@ -1499,6 +1502,7 @@ Item {
function extSignalAddLauncher(group, launcher) { function extSignalAddLauncher(group, launcher) {
if (group === latteDock.launchersGroup) { if (group === latteDock.launchersGroup) {
tasksModel.requestAddLauncher(launcher); tasksModel.requestAddLauncher(launcher);
launchersUpdatedFor(launcher);
} }
} }
@ -1506,6 +1510,7 @@ Item {
if (group === latteDock.launchersGroup) { if (group === latteDock.launchersGroup) {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
launchersUpdatedFor(launcher);
} }
} }
@ -1518,6 +1523,7 @@ Item {
} }
tasksModel.requestAddLauncherToActivity(launcher, activity); tasksModel.requestAddLauncherToActivity(launcher, activity);
launchersUpdatedFor(launcher);
} }
} }
@ -1528,6 +1534,7 @@ Item {
} }
tasksModel.requestRemoveLauncherFromActivity(launcher, activity); tasksModel.requestRemoveLauncherFromActivity(launcher, activity);
launchersUpdatedFor(launcher);
} }
} }
@ -1685,6 +1692,7 @@ Item {
} }
tasksModel.requestAddLauncher(url); tasksModel.requestAddLauncher(url);
launchersUpdatedFor(url);
} }
function resetDragSource() { function resetDragSource() {

View File

@ -221,6 +221,10 @@ MouseArea{
property int previousCount: 0 property int previousCount: 0
onWindowsCountChanged: { onWindowsCountChanged: {
if (root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator) {
return;
}
if ((windowsCount >= 2) && (windowsCount > previousCount) if ((windowsCount >= 2) && (windowsCount > previousCount)
&& !(mainItemContainer.containsMouse || parabolicManager.neighbourIsHovered(itemIndex)) ){ && !(mainItemContainer.containsMouse || parabolicManager.neighbourIsHovered(itemIndex)) ){
if(root.dragSource == null) if(root.dragSource == null)
@ -333,6 +337,20 @@ MouseArea{
restoreAnimation.stop(); restoreAnimation.stop();
} }
} }
onShowWindowsOnlyFromLaunchersChanged: {
if (!root.editMode) {
return;
}
mainItemContainer.updateVisibilityBasedOnLaunchers();
}
onInActivityChangeChanged: {
if (root.showWindowsOnlyFromLaunchers && !root.inActivityChange) {
mainItemContainer.updateVisibilityBasedOnLaunchers();
}
}
} }
Rectangle { Rectangle {
@ -876,7 +894,7 @@ MouseArea{
} }
function activateTask() { function activateTask() {
if( mainItemContainer.isLauncher){ if( mainItemContainer.isLauncher || (root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)){
if (Latte.WindowSystem.compositingActive) { if (Latte.WindowSystem.compositingActive) {
wrapper.runLauncherAnimation(); wrapper.runLauncherAnimation();
} else { } else {
@ -990,10 +1008,16 @@ MouseArea{
// if ((lastButtonClicked == Qt.LeftButton)||(lastButtonClicked == Qt.MidButton)){ // if ((lastButtonClicked == Qt.LeftButton)||(lastButtonClicked == Qt.MidButton)){
if (Latte.WindowSystem.compositingActive) { if (Latte.WindowSystem.compositingActive) {
inBouncingAnimation = true; inBouncingAnimation = true;
if (!(root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator)) {
root.addWaitingLauncher(mainItemContainer.launcherUrl); root.addWaitingLauncher(mainItemContainer.launcherUrl);
} }
}
if (root.showWindowsOnlyFromLaunchers && root.activeIndicator === Latte.Dock.NoneIndicator) {
tasksModel.requestNewInstance(modelIndex());
} else {
tasksModel.requestActivate(modelIndex()); tasksModel.requestActivate(modelIndex());
// } }
} }
///window previews/// ///window previews///
@ -1197,6 +1221,34 @@ MouseArea{
} }
} }
function slotLaunchersChangedFor(launcher) {
if (root.showWindowsOnlyFromLaunchers && launcher === launcherUrl) {
updateVisibilityBasedOnLaunchers()
}
}
function updateVisibilityBasedOnLaunchers(){
var launcherExists = !(((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1)
&& (tasksModel.launcherPosition(mainItemContainer.launcherUrlWithIcon) == -1) )
|| !launcherIsPresent(mainItemContainer.launcherUrl));
if (root.showWindowsOnlyFromLaunchers) {
var hideWindow = !launcherExists && mainItemContainer.isWindow;
if (hideWindow) {
taskRealRemovalAnimation.start();
} else if (launcherExists && mainItemContainer.isWindow && !mainItemContainer.isVisible) {
showWindowAnimation.showWindow();
}
} else {
var showWindow = !launcherExists && mainItemContainer.isWindow;
if (showWindow) {
showWindowAnimation.showWindow();
}
}
}
function toggleMuted() { function toggleMuted() {
if (muted) { if (muted) {
mainItemContainer.audioStreams.forEach(function (item) { item.unmute(); }); mainItemContainer.audioStreams.forEach(function (item) { item.unmute(); });
@ -1261,6 +1313,7 @@ MouseArea{
root.publishTasksGeometries.connect(slotPublishGeometries); root.publishTasksGeometries.connect(slotPublishGeometries);
root.showPreviewForTasks.connect(slotShowPreviewForTasks); root.showPreviewForTasks.connect(slotShowPreviewForTasks);
root.mimicEnterForParabolic.connect(slotMimicEnterForParabolic); root.mimicEnterForParabolic.connect(slotMimicEnterForParabolic);
root.launchersUpdatedFor.connect(slotLaunchersChangedFor);
//startup without launcher //startup without launcher
var hideStartup = ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1) var hideStartup = ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1)
@ -1290,6 +1343,7 @@ MouseArea{
root.publishTasksGeometries.disconnect(slotPublishGeometries); root.publishTasksGeometries.disconnect(slotPublishGeometries);
root.showPreviewForTasks.disconnect(slotShowPreviewForTasks); root.showPreviewForTasks.disconnect(slotShowPreviewForTasks);
root.mimicEnterForParabolic.disconnect(slotMimicEnterForParabolic); root.mimicEnterForParabolic.disconnect(slotMimicEnterForParabolic);
root.launchersUpdatedFor.disconnect(slotLaunchersChangedFor);
wrapper.sendEndOfNeedBothAxisAnimation(); wrapper.sendEndOfNeedBothAxisAnimation();
} }
@ -1413,9 +1467,14 @@ MouseArea{
repeat: false repeat: false
onTriggered: { onTriggered: {
if (mainItemContainer.itemIndex >= 0) if (mainItemContainer.itemIndex >= 0){
mainItemContainer.lastValidIndex = mainItemContainer.itemIndex; mainItemContainer.lastValidIndex = mainItemContainer.itemIndex;
if (root.showWindowsOnlyFromLaunchers) {
parabolicManager.updateTasksEdgesIndexes();
}
}
if (latteDock && latteDock.debugModeTimers) { if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: lastValidTimer called..."); console.log("plasmoid timer: lastValidTimer called...");
} }

View File

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

View File

@ -60,7 +60,7 @@ SequentialAnimation {
//trying to fix the ListView nasty behavior //trying to fix the ListView nasty behavior
//during the removal the anchoring for ListView children changes a lot //during the removal the anchoring for ListView children changes a lot
var previousTask = icList.childAtIndex(mainItemContainer.lastValidIndex-1); var previousTask = icList.childAtIndex(mainItemContainer.lastValidIndex-1);
if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation){ if (previousTask !== undefined && !previousTask.isStartup && !previousTask.inBouncingAnimation && !root.showWindowsOnlyFromLaunchers){
if (root.vertical) { if (root.vertical) {
mainItemContainer.anchors.top = previousTask.bottom; mainItemContainer.anchors.top = previousTask.bottom;
} else { } else {

View File

@ -131,16 +131,24 @@ SequentialAnimation{
//startup without launcher, animation should be blocked //startup without launcher, animation should be blocked
var hideStartup = ((((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1) var launcherExists = !(((tasksModel.launcherPosition(mainItemContainer.launcherUrl) == -1)
&& (tasksModel.launcherPosition(mainItemContainer.launcherUrlWithIcon) == -1) ) && (tasksModel.launcherPosition(mainItemContainer.launcherUrlWithIcon) == -1) )
|| !launcherIsPresent(mainItemContainer.launcherUrl)) || !launcherIsPresent(mainItemContainer.launcherUrl));
&& mainItemContainer.isStartup);
var hideStartup = launcherExists && mainItemContainer.isStartup;
var hideWindow = root.showWindowsOnlyFromLaunchers && !launcherExists && mainItemContainer.isWindow;
if (root.immediateLauncherExists(mainItemContainer.launcherUrl) && mainItemContainer.isLauncher) { if (root.immediateLauncherExists(mainItemContainer.launcherUrl) && mainItemContainer.isLauncher) {
root.removeImmediateLauncher(mainItemContainer.launcherUrl); root.removeImmediateLauncher(mainItemContainer.launcherUrl);
} }
if (!Latte.WindowSystem.compositingActive || root.inDraggingPhase if (hideStartup || hideWindow) {
mainItemContainer.visible = false;
wrapper.tempScaleWidth = 0;
wrapper.tempScaleHeight = 0;
wrapper.opacity = 0;
mainItemContainer.inAnimation = false;
} else if (!Latte.WindowSystem.compositingActive || root.inDraggingPhase
|| mainItemContainer.isSeparator) { || mainItemContainer.isSeparator) {
mainItemContainer.visible = true; mainItemContainer.visible = true;
wrapper.tempScaleWidth = 1; wrapper.tempScaleWidth = 1;
@ -149,15 +157,10 @@ SequentialAnimation{
wrapper.opacity = 1; wrapper.opacity = 1;
mainItemContainer.inAnimation = false; mainItemContainer.inAnimation = false;
} else if (( animation2 || animation3 || animation6) && (root.durationTime !== 0)){ } else if (( animation2 || animation3 || animation6) && (root.durationTime !== 0)){
mainItemContainer.visible = true;
wrapper.tempScaleWidth = 0; wrapper.tempScaleWidth = 0;
wrapper.tempScaleHeight = 0; wrapper.tempScaleHeight = 0;
start(); start();
} else if (hideStartup) {
mainItemContainer.visible = false;
wrapper.tempScaleWidth = 0;
wrapper.tempScaleHeight = 0;
wrapper.opacity = 0;
mainItemContainer.inAnimation = false;
} else { } else {
var frozenTask = parabolicManager.getFrozenTask(mainItemContainer.launcherUrl); var frozenTask = parabolicManager.getFrozenTask(mainItemContainer.launcherUrl);
@ -169,6 +172,7 @@ SequentialAnimation{
wrapper.tempScaleHeight = 1; wrapper.tempScaleHeight = 1;
} }
mainItemContainer.visible = true;
wrapper.opacity = 1; wrapper.opacity = 1;
mainItemContainer.inAnimation = false; mainItemContainer.inAnimation = false;
} }

View File

@ -330,6 +330,17 @@ PlasmaComponents.Page {
plasmoid.configuration.showOnlyCurrentActivity = checked plasmoid.configuration.showOnlyCurrentActivity = checked
} }
} }
PlasmaComponents.CheckBox {
id: showWindowsOnlyFromLaunchersChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
}
}
} }
//! END: Tasks Filters //! END: Tasks Filters