From a0e0f062bd0379d1c9d403a6d111beaaf523b4dd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 2 Jan 2018 03:19:15 +0000 Subject: x11-misc/compton-conf : build from git tree --- .../compton-conf/files/compton-conf-r99999.patch | 346 +++++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 x11-misc/compton-conf/files/compton-conf-r99999.patch (limited to 'x11-misc/compton-conf/files') diff --git a/x11-misc/compton-conf/files/compton-conf-r99999.patch b/x11-misc/compton-conf/files/compton-conf-r99999.patch new file mode 100644 index 00000000..c3ca4744 --- /dev/null +++ b/x11-misc/compton-conf/files/compton-conf-r99999.patch @@ -0,0 +1,346 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 159d16e..5c83cff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + project(compton-conf) + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) + set(LXQTBT_MINIMUM_VERSION "0.4.0") + + option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) +@@ -33,7 +33,7 @@ if(USE_QT4) + include(${QT_USE_FILE}) + message(STATUS "Building with Qt${QTVERSION}") + else() +- cmake_minimum_required(VERSION 2.8.11) ++ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) + find_package(Qt5Widgets REQUIRED) + find_package(Qt5DBus REQUIRED) + find_package(Qt5LinguistTools REQUIRED QUIET) +@@ -47,8 +47,9 @@ pkg_check_modules(LIBCONFIG REQUIRED + ) + + include(GNUInstallDirs REQUIRED) ++include(LXQtCompilerSettings NO_POLICY_SCOPE) # must be after cmake_minimum_required() + +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_KEYWORDS -fno-exceptions") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_KEYWORDS") + + if(USE_QT4) + set(QTX_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTDBUS_DIR}) +@@ -110,6 +111,8 @@ else() + qt5_wrap_ui(compton-conf_UI_H ${compton-conf_UIS}) + endif() + ++set_property(SOURCE ${compton-conf_UI_H} PROPERTY SKIP_AUTOMOC ON) ++ + add_definitions( + -DCOMPTON_CONF_DATA_DIR="${CMAKE_INSTALL_FULL_DATADIR}/compton-conf" + ) +diff --git a/autostart/CMakeLists.txt b/autostart/CMakeLists.txt +index 5f596a5..3f6e199 100644 +--- a/autostart/CMakeLists.txt ++++ b/autostart/CMakeLists.txt +@@ -1,5 +1,3 @@ +-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) +- + file(GLOB DESKTOP_FILES_IN *.desktop.in) + + # Translations ********************************** +diff --git a/compton-conf.desktop.in b/compton-conf.desktop.in +index d7fb52e..4b6b56a 100644 +--- a/compton-conf.desktop.in ++++ b/compton-conf.desktop.in +@@ -5,7 +5,7 @@ GenericName=Compton Configuration + Comment=Configure Compton window effects + TryExec=compton-conf + Exec=compton-conf +-Icon=preferences-system-windows +-Categories=Settings;DesktopSettings;Qt;LXQt; ++Icon=compton ++Categories=Settings;DesktopSettings;Qt;LXQt;X-XFCE-SettingsDialog;X-XFCE-PersonalSettings; + + #TRANSLATIONS_DIR=translations +diff --git a/compton.conf.example b/compton.conf.example +index 9919602..d2d4589 100644 +--- a/compton.conf.example ++++ b/compton.conf.example +@@ -14,7 +14,7 @@ shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?= 'No + # shadow-exclude = "n:e:Notification"; + shadow-ignore-shaped = false; + # shadow-exclude-reg = "x10+0+0"; +-# xinerama-shadow-crop = true; ++xinerama-shadow-crop = false; + + # Opacity + menu-opacity = 0.8; +diff --git a/maindialog.cpp b/maindialog.cpp +index f6e33d5..7f523d5 100644 +--- a/maindialog.cpp ++++ b/maindialog.cpp +@@ -95,6 +95,22 @@ MainDialog::MainDialog(QString userConfigFile) { + static_cast(child)->setValue(val); + connect(child, SIGNAL(valueChanged(int)), SLOT(onSpinValueChanged(int))); + } ++ else if(child->inherits("QRadioButton")) { ++ if(child->parent()->inherits("QGroupBox")) { ++ QByteArray groupKeyName = child->parent()->objectName().replace('_', '-').toLatin1(); ++ if(keyName.startsWith(groupKeyName)) { ++ const char *val; ++ if(config_lookup_string(&config_, groupKeyName.constData(), &val) == CONFIG_TRUE) ++ static_cast(child)->setChecked(keyName == groupKeyName.append('-').append(val)); ++ connect(child, SIGNAL(toggled(bool)), SLOT(onRadioGroupToggled(bool))); ++ continue; ++ } ++ } ++ int val = -1; ++ if(config_lookup_bool(&config_, keyName.constData(), &val) == CONFIG_TRUE) ++ static_cast(child)->setChecked((bool)val); ++ connect(child, SIGNAL(toggled(bool)), SLOT(onButtonToggled(bool))); ++ } + } + } + +@@ -127,6 +143,17 @@ void MainDialog::onSpinValueChanged(int i) { + // saveConfig(); + } + ++void MainDialog::onRadioGroupToggled(bool checked) { ++ if (checked) { ++ qDebug() << "toggled: " << sender()->objectName(); ++ // generate config key from objectName. ++ QByteArray keyName = sender()->parent()->objectName().replace('_', '-').toLatin1(); ++ QByteArray val = sender()->objectName().right(sender()->objectName().size() - (keyName.size() + 1)).replace('_', '-').toLatin1(); ++ configSetString(keyName.constData(), val); ++ // saveConfig(); ++ } ++} ++ + void MainDialog::saveConfig() { + // ensure the existance of user config dir + QString configDir = QFileInfo(userConfigFile_).dir().path(); +@@ -216,3 +243,14 @@ void MainDialog::configSetBool(const char* key, bool val) { + } + config_setting_set_bool(setting, val); + } ++ ++void MainDialog::configSetString(const char *key, const char *val) ++{ ++ config_setting_t* setting = config_lookup(&config_, key); ++ if(!setting) { // setting not found ++ // add a new setting for it ++ config_setting_t* root = config_root_setting(&config_); ++ setting = config_setting_add(root, key, CONFIG_TYPE_STRING); ++ } ++ config_setting_set_string(setting, val); ++} +diff --git a/maindialog.h b/maindialog.h +index b0bdbc6..b88abc3 100644 +--- a/maindialog.h ++++ b/maindialog.h +@@ -47,7 +47,8 @@ class MainDialog : public QDialog + void configSetInt(const char* key, int val); + void configSetFloat(const char* key, double val); + void configSetBool(const char* key, bool val); +- ++ void configSetString(const char* key, const char* val); ++ + private Q_SLOTS: + void onButtonToggled(bool checked); + void onSpinValueChanged(double d); +@@ -55,6 +56,7 @@ private Q_SLOTS: + void onDialogButtonClicked(QAbstractButton* button); + void onColorButtonClicked(); + void onAboutButtonClicked(); ++ void onRadioGroupToggled(bool checked); + + private: + Ui::MainDialog* ui; +diff --git a/maindialog.ui b/maindialog.ui +index 70994cb..39a2abd 100644 +--- a/maindialog.ui ++++ b/maindialog.ui +@@ -6,8 +6,8 @@ + + 0 + 0 +- 493 +- 371 ++ 569 ++ 424 + + + +@@ -24,6 +24,43 @@ + Shadow + + ++ ++ 5 ++ ++ ++ 3 ++ ++ ++ ++ ++ Enable client-side shadows on windows ++ ++ ++ ++ ++ ++ ++ Avoid drawing shadows on dock/panel windows ++ ++ ++ ++ ++ ++ ++ Don't draw shadows on DND windows ++ ++ ++ ++ ++ ++ ++ Fix some weirdness with ARGB windows ++ ++ ++ Zero the part of the shadow's mask behind the window ++ ++ ++ + + + +@@ -69,6 +106,16 @@ + + + ++ ++ ++ ++ 1.000000000000000 ++ ++ ++ 0.050000000000000 ++ ++ ++ + + + +@@ -83,37 +130,6 @@ + + + +- +- +- +- Fix some weirdness with ARGB windows +- +- +- Zero the part of the shadow's mask behind the window +- +- +- +- +- +- +- Don't draw shadows on DND windows +- +- +- +- +- +- +- Avoid drawing shadows on dock/panel windows +- +- +- +- +- +- +- Enable client-side shadows on windows +- +- +- + + + +@@ -121,13 +137,10 @@ + + + +- +- +- +- 1.000000000000000 +- +- +- 0.050000000000000 ++ ++ ++ ++ Crop shadows of maximized windows from extended displays + + + +@@ -356,11 +369,39 @@ + Other + + +- +- +- +- Not implemented yet +- ++ ++ ++ ++ ++ 0 ++ 0 ++ ++ ++ ++ Rendering backend ++ ++ ++ false ++ ++ ++ false ++ ++ ++ ++ ++ ++ X Render ++ ++ ++ ++ ++ ++ ++ GLX (OpenGL) ++ ++ ++ ++ + + + +diff --git a/translations/compton-conf_ca.desktop b/translations/compton-conf_ca.desktop +new file mode 100644 +index 0000000..d60762f +--- /dev/null ++++ b/translations/compton-conf_ca.desktop +@@ -0,0 +1,3 @@ ++Name[ca]=Efectes de les finestres ++GenericName[ca]=ConfiguraciĆ³ de Compton ++Comment[ca]=Configureu els efectes de les finestres de Compton -- cgit v1.2.3