disable debug messages, fix masking positioning

pull/1/head
Michail Vourlakos 8 years ago
parent 3745fbadf9
commit 4c0a97348c

@ -655,12 +655,13 @@ void DockView::mouseReleaseEvent(QMouseEvent *event)
void DockView::mousePressEvent(QMouseEvent *event) void DockView::mousePressEvent(QMouseEvent *event)
{ {
//qDebug() << "Step -1 ...";
if (!event || !this->containment()) { if (!event || !this->containment()) {
return; return;
} }
qDebug() << "Step 0..."; //qDebug() << "Step 0...";
// PlasmaQuick::ContainmentView::mousePressEvent(event);
//even if the menu is executed synchronously, other events may be processed //even if the menu is executed synchronously, other events may be processed
//by the qml incubator when plasma is loading, so we need to guard there //by the qml incubator when plasma is loading, so we need to guard there
@ -672,7 +673,7 @@ void DockView::mousePressEvent(QMouseEvent *event)
return; return;
} }
qDebug() << "1 ..."; //qDebug() << "1 ...";
const QString trigger = Plasma::ContainmentActions::eventToString(event); const QString trigger = Plasma::ContainmentActions::eventToString(event);
if (trigger == "RightButton;NoModifier") { if (trigger == "RightButton;NoModifier") {
@ -683,7 +684,7 @@ void DockView::mousePressEvent(QMouseEvent *event)
return; return;
} }
qDebug() << "2 ..."; //qDebug() << "2 ...";
//the plugin can be a single action or a context menu //the plugin can be a single action or a context menu
//Don't have an action list? execute as single action //Don't have an action list? execute as single action
//and set the event position as action data //and set the event position as action data
@ -735,12 +736,12 @@ void DockView::mousePressEvent(QMouseEvent *event)
applet = this->containment(); applet = this->containment();
} }
qDebug() << "3 ..."; //qDebug() << "3 ...";
if (applet) { if (applet) {
KPluginMetaData meta = applet->kPackage().metadata(); KPluginMetaData meta = applet->kPackage().metadata();
qDebug() << "3.5 ..."; //qDebug() << "3.5 ...";
if (meta.pluginId() != "org.kde.latte.plasmoid") { if (meta.pluginId() != "org.kde.latte.plasmoid") {
qDebug() << "4..."; qDebug() << "4...";
@ -755,14 +756,14 @@ void DockView::mousePressEvent(QMouseEvent *event)
return; return;
} }
qDebug() << "5 ..."; //qDebug() << "5 ...";
if (applet) { if (applet) {
qDebug() << "5.3 ..."; //qDebug() << "5.3 ...";
emit applet->contextualActionsAboutToShow(); emit applet->contextualActionsAboutToShow();
addAppletActions(desktopMenu, applet, event); addAppletActions(desktopMenu, applet, event);
} else { } else {
qDebug() << "5.6 ..."; //qDebug() << "5.6 ...";
emit this->containment()->contextualActionsAboutToShow(); emit this->containment()->contextualActionsAboutToShow();
addContainmentActions(desktopMenu, event); addContainmentActions(desktopMenu, event);
} }
@ -774,7 +775,7 @@ void DockView::mousePressEvent(QMouseEvent *event)
QPoint pos = event->globalPos(); QPoint pos = event->globalPos();
if (applet) { if (applet) {
qDebug() << "6 ..."; //qDebug() << "6 ...";
desktopMenu->adjustSize(); desktopMenu->adjustSize();
if (this->screen()) { if (this->screen()) {
@ -797,10 +798,10 @@ void DockView::mousePressEvent(QMouseEvent *event)
} }
} }
qDebug() << "7..."; //qDebug() << "7...";
if (desktopMenu->isEmpty()) { if (desktopMenu->isEmpty()) {
qDebug() << "7.5 ..."; //qDebug() << "7.5 ...";
delete desktopMenu; delete desktopMenu;
event->accept(); event->accept();
return; return;
@ -813,13 +814,13 @@ void DockView::mousePressEvent(QMouseEvent *event)
return; return;
} }
qDebug() << "8 ..."; //qDebug() << "8 ...";
} }
qDebug() << "9 ..."; //qDebug() << "9 ...";
} }
qDebug() << "10 ..."; //qDebug() << "10 ...";
PlasmaQuick::ContainmentView::mousePressEvent(event); PlasmaQuick::ContainmentView::mousePressEvent(event);
} }

@ -245,12 +245,6 @@ Item{
} else if (root.animationsNeedThickness > 0) { } else if (root.animationsNeedThickness > 0) {
tempThickness = thicknessMidOriginal; tempThickness = thicknessMidOriginal;
} }
//configure the x,y position based on thickness
if(plasmoid.location === PlasmaCore.Types.RightEdge)
localX = dock.width - tempThickness;
else if(plasmoid.location === PlasmaCore.Types.BottomEdge)
localY = dock.height - tempThickness;
} else{ } else{
//use all thickness space //use all thickness space
if (dock.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) { if (dock.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) {
@ -259,6 +253,12 @@ Item{
tempThickness = thicknessZoomOriginal; tempThickness = thicknessZoomOriginal;
} }
} }
//configure the x,y position based on thickness
if(plasmoid.location === PlasmaCore.Types.RightEdge)
localX = dock.width - tempThickness;
else if(plasmoid.location === PlasmaCore.Types.BottomEdge)
localY = dock.height - tempThickness;
} }
var maskArea = dock.maskArea; var maskArea = dock.maskArea;

@ -621,7 +621,7 @@ MouseArea{
} }
onPressed: { onPressed: {
console.log("Pressed Task Delegate.."); //console.log("Pressed Task Delegate..");
if (windowSystem.compositingActive) { if (windowSystem.compositingActive) {
windowsPreviewDlg.hide(2); windowsPreviewDlg.hide(2);
} }
@ -647,7 +647,7 @@ MouseArea{
} }
onReleased: { onReleased: {
console.log("Released Task Delegate..."); //console.log("Released Task Delegate...");
if (draggingResistaner != null){ if (draggingResistaner != null){
draggingResistaner.destroy(); draggingResistaner.destroy();
draggingResistaner = null; draggingResistaner = null;

Loading…
Cancel
Save