fix #262,dont hide preview window for buffer init

pull/1/head
Michail Vourlakos 8 years ago
parent 652a1a5c82
commit c0fb3e7ede

@ -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

@ -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

@ -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,29 +355,7 @@ 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()
}
}

Loading…
Cancel
Save