fix #811,timers to check previews/menus/tooltips

--there were cases that window previews/tasks context menu/
title tooltips were shown at the same time. This patch fixes this
by adding timers to catch these case and show the above on
priority. The priority used is tasks context menu/window
previews/title tooltips
pull/2/head
Michail Vourlakos 7 years ago
parent 9dbee82a4a
commit bc7a9eac9a

@ -1301,6 +1301,10 @@ DragDrop.DropArea {
titleTooltipDialog.update();
}
if (titleTooltipDialog.visible) {
titleTooltipCheckerToNotShowTimer.start();
}
if (root.debugModeTimers) {
console.log("containment timer: showTitleTooltipTimer called...");
}
@ -1325,6 +1329,19 @@ DragDrop.DropArea {
}
}
//! Timer to fix #811, rare cases that both a window preview and context menu are
//! shown
Timer {
id: titleTooltipCheckerToNotShowTimer
interval: 250
onTriggered: {
if (titleTooltipDialog.visible && latteApplet && (latteApplet.contextMenu || latteApplet.windowPreviewIsShown)) {
titleTooltipDialog.visible = false;
}
}
}
/////END: Title Tooltip///////////
///////////////BEGIN components

@ -137,7 +137,7 @@ Item {
property bool dockIsHidden: latteDock ? latteDock.dockIsHidden : false
property bool highlightWindows: latteDock ? latteDock.highlightWindows: plasmoid.configuration.highlightWindows
property bool indicateAudioStreams: latteDock ? latteDock.indicateAudioStreams : plasmoid.configuration.indicateAudioStreams
property bool mouseWheelActions: latteDock ? latteDock.mouseWheelActions : true
property bool mouseWheelActions: latteDock ? latteDock.mouseWheelActions : true
property bool reverseLinesPosition: latteDock ? latteDock.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition
property bool dotsOnActive: latteDock ? latteDock.dotsOnActive : plasmoid.configuration.dotsOnActive
property bool showGlow: latteDock ? latteDock.showGlow : plasmoid.configuration.showGlow
@ -150,6 +150,7 @@ Item {
property bool smartLaunchersEnabled: latteDock ? latteDock.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: latteDock ? latteDock.threeColorsWindows : plasmoid.configuration.threeColorsWindows
property bool titleTooltips: latteDock ? latteDock.titleTooltips : false
property alias windowPreviewIsShown: windowsPreviewDlg.visible
property int activeIndicatorType: latteDock ? latteDock.activeIndicatorType : Latte.Dock.LineIndicator
property int directRenderAnimationTime: latteDock ? latteDock.directRenderAnimationTime : 0
@ -375,6 +376,12 @@ Item {
property bool signalSent: false
property Item activeItem: null
onVisibleChanged: {
if (visible) {
windowsPreviewCheckerToNotShowTimer.start();
}
}
function hide(debug){
//console.log("on hide event called: "+debug);
@ -442,6 +449,19 @@ Item {
}
}
//! Timer to fix #811, rare cases that both a window preview and context menu are
//! shown
Timer {
id: windowsPreviewCheckerToNotShowTimer
interval: 250
onTriggered: {
if (windowsPreviewDlg.visible && root.contextMenu) {
windowsPreviewDlg.hide();
}
}
}
//! Timer to fix a crash that when going to Alternative Session through Context Menu,
//! animations are played during the destruction and because of that Latte.IconItem is crashing.
//! the timer makes sure that the animations will have ended and then change to alternative

Loading…
Cancel
Save