mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-04 08:58:20 +03:00
delay hiding previews when creating contextmenu
-- there are cases that hiding previews too early can create crashes under wayland. Such a case is when the user uses the touchpad to emulate a right-click event to create a context menu for specific task BUG: 397635 FIXED-IN: 0.8.1
This commit is contained in:
parent
afb34a85cf
commit
b4dd016ed0
@ -85,8 +85,12 @@ PlasmaComponents.ContextMenu {
|
||||
// backend.ungrabMouse(visualParent);
|
||||
openRelative();
|
||||
|
||||
windowsPreviewDlg.contextMenu = true;
|
||||
windowsPreviewDlg.hide("8.2");
|
||||
if (Latte.WindowSystem.isPlatformWayland){
|
||||
//!Hiding previews under wayland it needs a delay otherwise it creates crashes
|
||||
windowsPreviewCheckerToNotShowTimer.start();
|
||||
} else {
|
||||
windowsPreviewDlg.hide("9.4");
|
||||
}
|
||||
|
||||
icList.directRender = false;
|
||||
|
||||
@ -276,7 +280,6 @@ PlasmaComponents.ContextMenu {
|
||||
|
||||
Component.onDestruction: {
|
||||
if (!changingLayout) {
|
||||
windowsPreviewDlg.contextMenu = false;
|
||||
root.contextMenu = null;
|
||||
backend.ungrabMouse(visualParent);
|
||||
root.signalActionsBlockHiding(-1);
|
||||
|
@ -483,7 +483,6 @@ Item {
|
||||
mainItem: toolTipDelegate
|
||||
visible: false
|
||||
|
||||
property bool contextMenu: false
|
||||
property bool signalSent: false
|
||||
property Item activeItem: null
|
||||
|
||||
@ -505,7 +504,7 @@ Item {
|
||||
|
||||
windowsPreviewDlg.activeItem = null;
|
||||
|
||||
if (!contextMenu)
|
||||
if (!root.contextMenu)
|
||||
root.disableRestoreZoom = false;
|
||||
|
||||
visible = false;
|
||||
@ -572,7 +571,7 @@ Item {
|
||||
|
||||
onTriggered: {
|
||||
if (windowsPreviewDlg.visible && root.contextMenu) {
|
||||
windowsPreviewDlg.hide();
|
||||
windowsPreviewDlg.hide("8.2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user