From 2610884257c100ef22046257a98ca9ca43b117dc Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Mon, 13 Nov 2023 11:23:41 -0600 Subject: [PATCH] ah kscreen, thine version art insufficient for our purposes. Downgrade thyself. --- debian/changelog | 6 ++ debian/patches/0001-revert-kscreen-fix.patch | 73 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 80 insertions(+) create mode 100644 debian/patches/0001-revert-kscreen-fix.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 7fe7ff0..d9b1e2e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lxqt-config (1.4.0-0ubuntu1~ppa2) jammy; urgency=medium + + * Revert a kscreen change that caused build failures in Jammy. + + -- Aaron Rainbolt Mon, 13 Nov 2023 11:22:25 -0600 + lxqt-config (1.4.0-0ubuntu1~ppa1) jammy; urgency=medium * Backport to Jammy. diff --git a/debian/patches/0001-revert-kscreen-fix.patch b/debian/patches/0001-revert-kscreen-fix.patch new file mode 100644 index 0000000..e2ccfb6 --- /dev/null +++ b/debian/patches/0001-revert-kscreen-fix.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2f842c..77f98c2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,7 +26,7 @@ set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) + + set(KF5_MINIMUM_VERSION "5.36.0") +-set(KF5SCREEN_MINIMUM_VERSION "5.27.0") ++set(KF5SCREEN_MINIMUM_VERSION "5.2.0") + set(LXQT_MINIMUM_VERSION "1.4.0") + set(QT_MINIMUM_VERSION "5.15.0") + +diff --git a/lxqt-config-monitor/kscreenutils.cpp b/lxqt-config-monitor/kscreenutils.cpp +index 6deee2a..be2634d 100644 +--- a/lxqt-config-monitor/kscreenutils.cpp ++++ b/lxqt-config-monitor/kscreenutils.cpp +@@ -63,9 +63,9 @@ void KScreenUtils::extended(KScreen::ConfigPtr &config) + output->setPos(pos); + output->setEnabled(true); + //first left one as primary +- output->setPriority(width == 0 ? 1 : 0); ++ output->setPrimary(width == 0); + KScreen::ModePtr mode(output->currentMode()); +- //if (!mode) ++ //if (!mode) + { + // Set the biggest mode between preferred modes and the first mode. + mode = output->modes().first(); +@@ -83,7 +83,7 @@ void KScreenUtils::extended(KScreen::ConfigPtr &config) + if (mode) + output->setCurrentModeId(mode->id()); + } +- if (mode) ++ if (mode) + width += mode->size().width(); + } + } +diff --git a/lxqt-config-monitor/loadsettings.cpp b/lxqt-config-monitor/loadsettings.cpp +index 26d669a..284cad0 100644 +--- a/lxqt-config-monitor/loadsettings.cpp ++++ b/lxqt-config-monitor/loadsettings.cpp +@@ -133,7 +133,7 @@ bool applySettings(KScreen::ConfigPtr config, QList monitors) + if( !output->isConnected() ) + continue; + output->setEnabled( monitor.enabled ); +- output->setPriority( monitor.primary ? 1 : 0 ); ++ output->setPrimary( monitor.primary ); + output->setPos( QPoint(monitor.xPos, monitor.yPos) ); + output->setRotation( (KScreen::Output::Rotation)(monitor.rotation) ); + // output->setCurrentModeId could fail. KScreen sometimes changes mode Id. +diff --git a/lxqt-config-monitor/monitorwidget.cpp b/lxqt-config-monitor/monitorwidget.cpp +index b4b7fb9..41883c2 100644 +--- a/lxqt-config-monitor/monitorwidget.cpp ++++ b/lxqt-config-monitor/monitorwidget.cpp +@@ -138,7 +138,7 @@ MonitorWidget::MonitorWidget(KScreen::OutputPtr output, KScreen::ConfigPtr confi + if (config->connectedOutputs().count() == 1) { + setOnlyMonitor(true); + // There isn't always a primary output. Gross. +- output->setPriority(1); ++ output->setPrimary(true); + } + + ui.xPosSpinBox->setValue(output->pos().x()); +@@ -208,7 +208,7 @@ void MonitorWidget::onBehaviorChanged(int idx) + ui.xPosSpinBox->setVisible(idx == ExtendDisplay); + ui.yPosSpinBox->setVisible(idx == ExtendDisplay); + +- output->setPriority(idx == PrimaryDisplay ? 1 : 0); ++ output->setPrimary(idx == PrimaryDisplay); + if(idx == PrimaryDisplay) + emit primaryOutputChanged(this); + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..782e5f8 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-revert-kscreen-fix.patch