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

fix #262,dont hide preview window for buffer init

This commit is contained in:
Michail Vourlakos 2017-03-20 19:40:18 +02:00
parent 652a1a5c82
commit c0fb3e7ede
3 changed files with 21 additions and 26 deletions

View File

@ -653,7 +653,12 @@ MouseArea{
////window previews/////////
if (isWindow) {
if(containsMouse && root.showPreviews && Latte.WindowSystem.compositingActive){
hoveredTimerObj = hoveredTimerComponent.createObject(mainItemContainer);
// if (!windowsPreviewDlg.visible) {
hoveredTimerObj = hoveredTimerComponent.createObject(mainItemContainer);
// } else {
// mainItemContainer.preparePreviewWindow(false);
// }
// preparePreviewWindow();
}
else{
@ -1134,7 +1139,7 @@ MouseArea{
Timer {
id: hoveredTimer
interval: 2*root.durationTime*units.longDuration
interval: 600
repeat: false

View File

@ -178,11 +178,23 @@ Column {
// TODO: this causes XCB error message when being visible the first time
property int winId: isWin && windows[flatIndex] != undefined ? windows[flatIndex] : 0
onWinIdChanged: {
if (winId !== previewThumb.prevWinId){
previewThumb.visible = false;
previewThumb.prevWinId = winId;
previewThumb.visible = true;
}
}
PlasmaCore.WindowThumbnail {
id: previewThumb
anchors.fill: parent
visible: !albumArtImage.visible && !thumbnailSourceItem.isMinimized
winId: thumbnailSourceItem.winId
winId: prevWinId //thumbnailSourceItem.winId
property int prevWinId: 0
ToolTipWindowMouseArea {
id: area2

View File

@ -345,7 +345,7 @@ Item {
//console.log("preview show called: accepted...");
//used to initialize windows previews buffers from task to task
visible = false;
visible = true;
activeItem = taskItem;
toolTipDelegate.parentTask = taskItem;
@ -355,32 +355,10 @@ Item {
signalSent = true;
//root.signalDraggingState(true);
}
//small delay to show in order to not mess up with the buffers clearing
//from previous visible:false
initializePreviewComponent.createObject(windowsPreviewDlg);
}
}
}
//A Timer to delay to show in order to not mess up with the buffers clearing
//from previous visible:false
Component {
id: initializePreviewComponent
Timer {
id: initializePreviewTimer
interval: 100
repeat: false
onTriggered: {
windowsPreviewDlg.visible = true;
initializePreviewTimer.destroy();
}
Component.onCompleted: initializePreviewTimer.start()
}
}
/////Window Previews/////////
TaskManager.TasksModel {