Attempt to fix backwards-incompatible KWin API change in v6.5.90
Output is renamed to LogicalOutput
ee73b477df
This commit is contained in:
parent
9c02613cc6
commit
9aee282375
|
|
@ -290,7 +290,7 @@ bool BreezyDesktopEffect::developerMode() const
|
|||
return m_developerMode;
|
||||
}
|
||||
|
||||
QVariantMap BreezyDesktopEffect::initialProperties(Output *screen)
|
||||
QVariantMap BreezyDesktopEffect::initialProperties(ScreenOutput *screen)
|
||||
{
|
||||
return QVariantMap{
|
||||
{QStringLiteral("effect"), QVariant::fromValue(this)},
|
||||
|
|
@ -416,7 +416,7 @@ QVariantList BreezyDesktopEffect::listVirtualDisplays() const {
|
|||
bool BreezyDesktopEffect::removeVirtualDisplay(const QString &id) {
|
||||
auto it = m_virtualDisplays.find(id);
|
||||
if (it != m_virtualDisplays.end()) {
|
||||
Output *output = it->output;
|
||||
ScreenOutput *output = it->output;
|
||||
if (output) {
|
||||
KWin::kwinApp()->outputBackend()->removeVirtualOutput(output);
|
||||
}
|
||||
|
|
@ -838,7 +838,7 @@ void BreezyDesktopEffect::updateDriverSmoothFollowSettings() {
|
|||
|
||||
if (m_lookingAtScreenIndex != -1 && !m_displayResolution.isEmpty()) {
|
||||
// Adjust display distance by relative monitor size compared to the FOV monitor
|
||||
const Output *focusedOutput = effects->screens().at(m_lookingAtScreenIndex);
|
||||
const ScreenOutput *focusedOutput = effects->screens().at(m_lookingAtScreenIndex);
|
||||
const QSize focusedSize = focusedOutput ? focusedOutput->geometry().size() : QSize();
|
||||
|
||||
if (focusedSize.isValid()) {
|
||||
|
|
@ -960,7 +960,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache()
|
|||
m_effectTargetScreenIndex = -1;
|
||||
return false;
|
||||
}
|
||||
Output *effectOnScreen = screensList.at(m_effectTargetScreenIndex);
|
||||
ScreenOutput *effectOnScreen = screensList.at(m_effectTargetScreenIndex);
|
||||
if (!effectOnScreen) {
|
||||
m_effectTargetScreenIndex = -1;
|
||||
return false;
|
||||
|
|
@ -974,7 +974,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache()
|
|||
return true;
|
||||
}
|
||||
|
||||
void BreezyDesktopEffect::warpPointerToOutputCenter(Output *output)
|
||||
void BreezyDesktopEffect::warpPointerToOutputCenter(ScreenOutput *output)
|
||||
{
|
||||
if (!output) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,15 @@ class QTimer;
|
|||
|
||||
namespace KWin
|
||||
{
|
||||
class LogicalOutput;
|
||||
class Output;
|
||||
|
||||
#if defined(KWIN_VERSION_ENCODED) && KWIN_VERSION_ENCODED >= 60590
|
||||
using ScreenOutput = LogicalOutput;
|
||||
#else
|
||||
using ScreenOutput = Output;
|
||||
#endif
|
||||
|
||||
class BreezyDesktopEffect : public QuickSceneEffect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -156,7 +163,7 @@ namespace KWin
|
|||
void cursorPosChanged();
|
||||
|
||||
protected:
|
||||
QVariantMap initialProperties(Output *screen) override;
|
||||
QVariantMap initialProperties(ScreenOutput *screen) override;
|
||||
|
||||
private:
|
||||
void teardown();
|
||||
|
|
@ -167,7 +174,7 @@ namespace KWin
|
|||
void toggleSmoothFollow();
|
||||
void setSmoothFollowThreshold(float threshold);
|
||||
void updateDriverSmoothFollowSettings();
|
||||
void warpPointerToOutputCenter(Output *output);
|
||||
void warpPointerToOutputCenter(ScreenOutput *output);
|
||||
void evaluateCursorOnScreenState(const QPointF &prevPos, const QPointF &newPos);
|
||||
void invalidateEffectOnScreenGeometryCache();
|
||||
bool updateEffectOnScreenGeometryCache();
|
||||
|
|
@ -223,7 +230,7 @@ namespace KWin
|
|||
bool m_effectOnScreenGeometryValid = false;
|
||||
|
||||
struct VirtualOutputInfo {
|
||||
Output *output = nullptr;
|
||||
ScreenOutput *output = nullptr;
|
||||
QString id;
|
||||
QSize size;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue