mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-11 13:18:13 +03:00
tasks:support plasma 5.25 window view effect
--support window view effect from plasma 5.25 when the user tries to activate a grouped task BUG:454296
This commit is contained in:
parent
771f059e63
commit
3c3b5c6d11
@ -50,6 +50,7 @@ Item {
|
||||
property bool plasma518: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,18,0)
|
||||
property bool plasma520: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,20,0)
|
||||
property bool plasmaGreaterThan522: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,21,75)
|
||||
property bool plasmaAtLeast525: LatteCore.Environment.plasmaDesktopVersion >= LatteCore.Environment.makeVersion(5,24,75)
|
||||
|
||||
property bool disableRestoreZoom: false //blocks restore animation in rightClick
|
||||
property bool disableAllWindowsFunctionality: plasmoid.configuration.hideAllTasks
|
||||
@ -205,6 +206,7 @@ Item {
|
||||
signal draggingFinished();
|
||||
signal hiddenTasksUpdated();
|
||||
signal presentWindows(variant winIds);
|
||||
signal activateWindowView(variant winIds);
|
||||
signal requestLayout;
|
||||
signal signalPreviewsShown();
|
||||
//signal signalDraggingState(bool value);
|
||||
@ -1296,14 +1298,24 @@ Item {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
root.presentWindows.connect(backend.presentWindows);
|
||||
if (root.plasmaAtLeast525) {
|
||||
root.activateWindowView.connect(backend.activateWindowView);
|
||||
} else {
|
||||
root.presentWindows.connect(backend.presentWindows);
|
||||
}
|
||||
|
||||
root.windowsHovered.connect(backend.windowsHovered);
|
||||
dragHelper.dropped.connect(resetDragSource);
|
||||
updateListViewParent();
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
root.presentWindows.disconnect(backend.presentWindows);
|
||||
if (root.plasmaAtLeast525) {
|
||||
root.activateWindowView.disconnect(backend.activateWindowView);
|
||||
} else {
|
||||
root.presentWindows.disconnect(backend.presentWindows);
|
||||
}
|
||||
|
||||
root.windowsHovered.disconnect(backend.windowsHovered);
|
||||
dragHelper.dropped.disconnect(resetDragSource);
|
||||
}
|
||||
|
@ -428,9 +428,18 @@ AbilityItem.BasicItem {
|
||||
activateLauncher();
|
||||
} else{
|
||||
if (model.IsGroupParent) {
|
||||
var canPresentWindowsIsSupported = LatteCore.WindowSystem.compositingActive && (root.plasmaGreaterThan522 ? backend.canPresentWindows : backend.canPresentWindows());
|
||||
if (canPresentWindowsIsSupported) {
|
||||
root.presentWindows(root.plasma515 ? model.WinIdList: model.LegacyWinIdList );
|
||||
if (root.plasmaAtLeast525) {
|
||||
//! At least Plasma 5.25 case
|
||||
var isWindowViewAvailable = LatteCore.WindowSystem.compositingActive && backend.windowViewAvailable;
|
||||
if (isWindowViewAvailable) {
|
||||
root.activateWindowView(model.WinIdList);
|
||||
}
|
||||
} else {
|
||||
//! Plasma 5.24 case
|
||||
var isPresentWindowsAvailable = LatteCore.WindowSystem.compositingActive && backend.canPresentWindows;
|
||||
if (isPresentWindowsAvailable) {
|
||||
root.presentWindows(model.WinIdList);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (windowsPreviewDlg.visible) {
|
||||
|
Loading…
Reference in New Issue
Block a user