mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-07 09:18:03 +03:00
Merge branch 'v0.9' into fix
This commit is contained in:
commit
502aa04765
@ -3,6 +3,7 @@
|
||||
<id>org.kde.latte-dock.desktop</id>
|
||||
<name>Latte</name>
|
||||
<name xml:lang="ar">لاتيه</name>
|
||||
<name xml:lang="ast">Latte</name>
|
||||
<name xml:lang="ca">Latte</name>
|
||||
<name xml:lang="ca-valencia">Latte</name>
|
||||
<name xml:lang="cs">Latte</name>
|
||||
@ -121,6 +122,7 @@
|
||||
<url type="bugtracker">@BUG_ADDRESS@</url>
|
||||
<url type="faq">@FAQS@</url>
|
||||
<developer_name>Michail Vourlakos, Johan Smith Agudelo Rodriguez</developer_name>
|
||||
<developer_name xml:lang="ast">Michail Vourlakos, Johan Smith Agudelo Rodriguez</developer_name>
|
||||
<developer_name xml:lang="ca">Michail Vourlakos, Johan Smith Agudelo Rodriguez</developer_name>
|
||||
<developer_name xml:lang="ca-valencia">Michail Vourlakos, Johan Smith Agudelo Rodriguez</developer_name>
|
||||
<developer_name xml:lang="cs">Michail Vourlakos, Johan Smith Agudelo Rodriguez</developer_name>
|
||||
|
@ -1,5 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Latte
|
||||
Name[ast]=Latte
|
||||
Name[ca]=Latte
|
||||
Name[ca@valencia]=Latte
|
||||
Name[cs]=Latte
|
||||
|
@ -58,16 +58,25 @@ Positioner::Positioner(Latte::View *parent)
|
||||
|
||||
if (m_corona) {
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_corona->wm()->registerIgnoredWindow(m_view->winId());
|
||||
m_trackedWindowId = m_view->winId();
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
|
||||
connect(m_view, &Latte::View::forcedShown, this, [&]() {
|
||||
m_corona->wm()->unregisterIgnoredWindow(m_trackedWindowId);
|
||||
m_trackedWindowId = m_view->winId();
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
});
|
||||
} else {
|
||||
connect(m_corona->wm(), &WindowSystem::AbstractWindowInterface::latteWindowAdded, this, [&]() {
|
||||
if (m_waylandWindowId.isNull()) {
|
||||
m_waylandWindowId = m_corona->wm()->winIdFor("latte-dock", m_view->geometry());
|
||||
m_corona->wm()->registerIgnoredWindow(m_waylandWindowId);
|
||||
if (m_trackedWindowId.isNull()) {
|
||||
m_trackedWindowId = m_corona->wm()->winIdFor("latte-dock", m_view->geometry());
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/////
|
||||
|
||||
m_screenSyncTimer.setInterval(qMax(m_corona->universalSettings()->screenTrackerInterval() - 500, 1000));
|
||||
connect(m_corona->universalSettings(), &UniversalSettings::screenTrackerIntervalChanged, this, [&]() {
|
||||
m_screenSyncTimer.setInterval(qMax(m_corona->universalSettings()->screenTrackerInterval() - 500, 1000));
|
||||
@ -88,7 +97,7 @@ Positioner::Positioner(Latte::View *parent)
|
||||
Positioner::~Positioner()
|
||||
{
|
||||
m_inDelete = true;
|
||||
m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? m_view->winId() : m_waylandWindowId);
|
||||
m_corona->wm()->unregisterIgnoredWindow(m_trackedWindowId);
|
||||
|
||||
m_screenSyncTimer.stop();
|
||||
m_validateGeometryTimer.stop();
|
||||
|
@ -125,7 +125,7 @@ private:
|
||||
Plasma::Types::Location m_goToLocation{Plasma::Types::Floating};
|
||||
QScreen *m_goToScreen{nullptr};
|
||||
|
||||
Latte::WindowSystem::WindowId m_waylandWindowId;
|
||||
Latte::WindowSystem::WindowId m_trackedWindowId;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -81,7 +81,6 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(Latte::View *view) :
|
||||
updateGeometry();
|
||||
});
|
||||
|
||||
|
||||
if (!KWindowSystem::isPlatformWayland()) {
|
||||
//! IMPORTANT!!! ::: This fixes a bug when closing an Activity all views from all Activities are
|
||||
//! disappearing! With this code parts they reappear!!!
|
||||
@ -106,6 +105,7 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(Latte::View *view) :
|
||||
connectionsHack << connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
|
||||
if (!m_inDelete && m_latteView && m_latteView->layout() && !isVisible()) {
|
||||
show();
|
||||
emit forcedShown();
|
||||
//qDebug() << "Ghost Edge:: Enforce reshow from timer 1...";
|
||||
} else {
|
||||
//qDebug() << "Ghost Edge:: No needed reshow from timer 1...";
|
||||
@ -115,22 +115,30 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(Latte::View *view) :
|
||||
connectionsHack << connect(&m_visibleHackTimer2, &QTimer::timeout, this, [&]() {
|
||||
if (!m_inDelete && m_latteView && m_latteView->layout() && !isVisible()) {
|
||||
show();
|
||||
emit forcedShown();
|
||||
//qDebug() << "Ghost Edge:: Enforce reshow from timer 2...";
|
||||
} else {
|
||||
//qDebug() << "Ghost Edge:: No needed reshow from timer 2...";
|
||||
}
|
||||
});
|
||||
|
||||
connectionsHack << connect(this, &ScreenEdgeGhostWindow::forcedShown, this, [&]() {
|
||||
m_corona->wm()->unregisterIgnoredWindow(m_trackedWindowId);
|
||||
m_trackedWindowId = winId();
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
});
|
||||
}
|
||||
|
||||
setupWaylandIntegration();
|
||||
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_corona->wm()->registerIgnoredWindow(winId());
|
||||
m_trackedWindowId = winId();
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
} else {
|
||||
connect(m_corona->wm(), &WindowSystem::AbstractWindowInterface::latteWindowAdded, this, [&]() {
|
||||
if (m_waylandWindowId.isNull()) {
|
||||
m_waylandWindowId = m_corona->wm()->winIdFor("latte-dock", geometry());
|
||||
m_corona->wm()->registerIgnoredWindow(m_waylandWindowId);
|
||||
if (m_trackedWindowId.isNull()) {
|
||||
m_trackedWindowId = m_corona->wm()->winIdFor("latte-dock", geometry());
|
||||
m_corona->wm()->registerIgnoredWindow(m_trackedWindowId);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -145,7 +153,7 @@ ScreenEdgeGhostWindow::~ScreenEdgeGhostWindow()
|
||||
{
|
||||
m_inDelete = true;
|
||||
|
||||
m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? winId() : m_waylandWindowId);
|
||||
m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? winId() : m_trackedWindowId);
|
||||
|
||||
m_latteView = nullptr;
|
||||
|
||||
@ -179,12 +187,11 @@ KWayland::Client::PlasmaShellSurface *ScreenEdgeGhostWindow::surface()
|
||||
void ScreenEdgeGhostWindow::updateGeometry()
|
||||
{
|
||||
QRect newGeometry;
|
||||
int thickness;
|
||||
int thickness{2};
|
||||
|
||||
if (KWindowSystem::compositingActive()) {
|
||||
thickness == 6;
|
||||
} else {
|
||||
thickness == 2;
|
||||
};
|
||||
thickness = 6;
|
||||
}
|
||||
|
||||
if (m_latteView->location() == Plasma::Types::BottomEdge) {
|
||||
newGeometry.setX(m_latteView->absoluteGeometry().left());
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
signals:
|
||||
void containsMouseChanged(bool contains);
|
||||
void dragEntered();
|
||||
void forcedShown(); //[workaround] forced shown to avoid a KWin issue that hides windows when activities are stopped
|
||||
|
||||
protected:
|
||||
bool event(QEvent *ev) override;
|
||||
@ -116,7 +117,7 @@ private:
|
||||
|
||||
QPointer<Latte::Corona> m_corona;
|
||||
|
||||
Latte::WindowSystem::WindowId m_waylandWindowId;
|
||||
Latte::WindowSystem::WindowId m_trackedWindowId;
|
||||
KWayland::Client::PlasmaShellSurface *m_shellSurface{nullptr};
|
||||
};
|
||||
|
||||
|
@ -77,6 +77,7 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
||||
setIcon(qGuiApp->windowIcon());
|
||||
setResizeMode(QuickViewSharedEngine::SizeRootObjectToView);
|
||||
setColor(QColor(Qt::transparent));
|
||||
setDefaultAlphaBuffer(true);
|
||||
setClearBeforeRendering(true);
|
||||
|
||||
const auto flags = Qt::FramelessWindowHint
|
||||
@ -914,6 +915,7 @@ void View::setLayout(Layout::GenericLayout *layout)
|
||||
applyActivitiesToWindows();
|
||||
//qDebug() << "View:: Enforce reshow from timer 1...";
|
||||
emit activitiesChanged();
|
||||
emit forcedShown();
|
||||
} else {
|
||||
//qDebug() << "View:: No needed reshow from timer 1...";
|
||||
}
|
||||
@ -925,6 +927,7 @@ void View::setLayout(Layout::GenericLayout *layout)
|
||||
applyActivitiesToWindows();
|
||||
//qDebug() << "View:: Enforce reshow from timer 2...";
|
||||
emit activitiesChanged();
|
||||
emit forcedShown();
|
||||
} else {
|
||||
//qDebug() << "View:: No needed reshow from timer 2...";
|
||||
}
|
||||
|
@ -248,6 +248,7 @@ signals:
|
||||
void editThicknessChanged();
|
||||
void effectsChanged();
|
||||
void fontPixelSizeChanged();
|
||||
void forcedShown(); //[workaround] forced shown to avoid a KWin issue that hides windows when closing activities
|
||||
void widthChanged();
|
||||
void heightChanged();
|
||||
void inEditModeChanged();
|
||||
|
@ -56,6 +56,9 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view)
|
||||
connect(this, &VisibilityManager::slideInFinished, this, &VisibilityManager::updateHiddenState);
|
||||
connect(this, &VisibilityManager::slideOutFinished, this, &VisibilityManager::updateHiddenState);
|
||||
|
||||
connect(this, &VisibilityManager::enableKWinEdgesChanged, this, &VisibilityManager::updateKWinEdgesSupport);
|
||||
connect(this, &VisibilityManager::modeChanged, this, &VisibilityManager::updateKWinEdgesSupport);
|
||||
|
||||
if (m_latteView) {
|
||||
connect(m_latteView, &Latte::View::eventTriggered, this, &VisibilityManager::viewEventManager);
|
||||
connect(m_latteView, &Latte::View::byPassWMChanged, this, &VisibilityManager::updateKWinEdgesSupport);
|
||||
@ -405,7 +408,7 @@ void VisibilityManager::updateGhostWindowState()
|
||||
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
||||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
|
||||
&& m_latteView->layout()->isCurrent()));
|
||||
|
||||
if (inCurrentLayout) {
|
||||
m_wm->setEdgeStateFor(m_edgeGhostWindow, m_isHidden);
|
||||
@ -686,8 +689,6 @@ void VisibilityManager::setEnableKWinEdges(bool enable)
|
||||
m_enableKWinEdgesFromUser = enable;
|
||||
|
||||
emit enableKWinEdgesChanged();
|
||||
|
||||
updateKWinEdgesSupport();
|
||||
}
|
||||
|
||||
void VisibilityManager::updateKWinEdgesSupport()
|
||||
@ -735,7 +736,7 @@ void VisibilityManager::createEdgeGhostWindow()
|
||||
bool inCurrentLayout = (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout ||
|
||||
(m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts
|
||||
&& m_latteView->layout() && !m_latteView->positioner()->inLocationChangeAnimation()
|
||||
&& m_latteView->layout()->name() == m_corona->layoutsManager()->currentLayoutName()));
|
||||
&& m_latteView->layout()->isCurrent()));
|
||||
|
||||
if (m_edgeGhostWindow) {
|
||||
if (inCurrentLayout) {
|
||||
|
@ -25,6 +25,9 @@
|
||||
#include "tracker/trackerwindows.h"
|
||||
#include "../lattecorona.h"
|
||||
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
|
||||
// KDE
|
||||
#include <KActivities/Controller>
|
||||
|
||||
|
@ -759,6 +759,7 @@ void Windows::updateHints(Latte::View *view)
|
||||
|
||||
if (isTouchingViewEdge(view, winfo) || isTouchingView(view, winfo)) {
|
||||
if (winfo.isActive()) {
|
||||
//qDebug() << " ACTIVE-TOUCH :: " << winfo.wid() << " _ " << winfo.appName() << " _ " << winfo.geometry() << " _ " << winfo.display();
|
||||
foundActiveTouchInCurScreen = true;
|
||||
activeTouchWinId = winfo.wid();
|
||||
|
||||
@ -768,6 +769,7 @@ void Windows::updateHints(Latte::View *view)
|
||||
maxWinId = winfo.wid();
|
||||
}
|
||||
} else {
|
||||
//qDebug() << " TOUCH :: " << winfo.wid() << " _ " << winfo.appName() << " _ " << winfo.geometry() << " _ " << winfo.display();
|
||||
foundTouchInCurScreen = true;
|
||||
touchWinId = winfo.wid();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Latte
|
||||
Name[ast]=Latte
|
||||
Name[ca]=Latte
|
||||
Name[ca@valencia]=Latte
|
||||
Name[cs]=Latte
|
||||
|
@ -1,6 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Latte
|
||||
Name[ast]=Latte
|
||||
Name[ca]=Latte
|
||||
Name[ca@valencia]=Latte
|
||||
Name[cs]=Latte
|
||||
|
@ -1,5 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Latte
|
||||
Name[ast]=Latte
|
||||
Name[ca]=Latte
|
||||
Name[ca@valencia]=Latte
|
||||
Name[cs]=Latte
|
||||
|
Loading…
Reference in New Issue
Block a user