Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port(ed?) to plasma 6 #214

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Conversation

moodyhunter
Copy link

@moodyhunter moodyhunter commented Feb 27, 2024

KDE 6 will be released tomorrow, so it's probably the time to open this PR

similar like psifidotos/applet-window-title#153, the ported version has been running on my machine for more than 2 months without noticeable issue.

This is a breaking change to support Qt6, which means the drop of Qt5/plasma5 support.

  • raised cmake_minimum_required as per required by Qt
  • Use <KSvg/Svg> instead of <Plasma/Svg>
  • ported to new KPluginFatory/ButtonGroup/... API
  • ported some Q*Pointer<> to std::*_ptr<>
  • removed root.plasma515 property as 6 always $&gt;$ 5

A ColorOverlay is removed from AuroraeButton (short lives qtgraphicaleffects!), and QPalette::Base is now used as m_activeFrameColor, no idea of what implication will be, but this does look ok.

@dr460nf1r3
Copy link

dr460nf1r3 commented Feb 27, 2024

I think the chances of getting this merged are quite low as @psifidotos has been absent for a while. Nevertheless, its very cool to see your efforts :)

Question: is this confirmed to work on KDE release builds? I'm asking because it compiles successfully when using Arch's kde-unstable builds from 18.02. (link), but not when using actual KDE master branch builds of the involved packages.

This is the error I'm getting during compilation:

==> Starting build()...
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.6.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found KF6CoreAddons: /usr/lib/cmake/KF6CoreAddons/KF6CoreAddonsConfig.cmake (found version "6.0.0")
-- Found KF6Declarative: /usr/lib/cmake/KF6Declarative/KF6DeclarativeConfig.cmake (found version "6.0.0")
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Found KF6Package: /usr/lib/cmake/KF6Package/KF6PackageConfig.cmake (found version "6.0.0")
-- Found KF6Svg: /usr/lib/cmake/KF6Svg/KF6SvgConfig.cmake (found version "6.0.0")
-- Found KF6: success (found suitable version "6.0.0", minimum required is "5.246.0") found components: CoreAddons Declarative Package Svg
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- KDECORATION2 VERSION MINOR : 0
CMake Deprecation Warning at libappletdecoration/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


-- Setting build type to 'Debug' as none was specified.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Found KF6WindowSystem: /usr/lib/cmake/KF6WindowSystem/KF6WindowSystemConfig.cmake (found version "6.0.0")
-- Found Gettext: /usr/bin/msgmerge (found version "0.22.4")
-- Found KF6I18n: /usr/lib/cmake/KF6I18n/KF6I18nConfig.cmake (found version "6.0.0")
-- Found KF6Service: /usr/lib/cmake/KF6Service/KF6ServiceConfig.cmake (found version "6.0.0")
-- Found KF6ConfigWidgets: /usr/lib/cmake/KF6ConfigWidgets/KF6ConfigWidgetsConfig.cmake (found version "6.0.0")
-- Found KF6KCMUtils: /usr/lib/cmake/KF6KCMUtils/KF6KCMUtilsConfig.cmake (found version "6.0.0")
-- Found KF6: success (found suitable version "6.0.0", minimum required is "5.26.0") found components: CoreAddons WindowSystem I18n Service ConfigWidgets KCMUtils
-- Configuring done (5.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build
[  0%] Built target appletdecorationplugin_autogen_timestamp_deps
[  4%] Automatic MOC for target appletdecorationplugin
[  4%] Built target appletdecorationplugin_autogen
[  9%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin_autogen/mocs_compilation.cpp.o
In file included from /home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/moc_previewclient.cpp:9,
from /home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/mocs_compilation.cpp:11:
/home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/../../../../applet-window-buttons6/libappletdecoration/previewclient.h:107:5: warning: "KDECORATION2_VERSION_MINOR" is not defined, evaluates to 0 [-Wundef]
107 | #if KDECORATION2_VERSION_MINOR >= 13
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/../../../../applet-window-buttons6/libappletdecoration/previewclient.h:112:5: warning: "KDECORATION2_VERSION_MINOR" is not defined, evaluates to 0 [-Wundef]
112 | #if KDECORATION2_VERSION_MINOR >= 18
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/../../../../applet-window-buttons6/libappletdecoration/previewclient.h:116:5: warning: "KDECORATION2_VERSION_MINOR" is not defined, evaluates to 0 [-Wundef]
116 | #if KDECORATION2_VERSION_MINOR <= 20
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nico/.cache/paru/clone/plasma6-applets-window-buttons/src/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/../../../../applet-window-buttons6/libappletdecoration/previewclient.h:117:10: error: ‘void Decoration::Applet::PreviewClient::requestShowWindowMenu()’ marked ‘override’, but does not override
117 |     void requestShowWindowMenu() override;
|          ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:82: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:351: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@moodyhunter
Copy link
Author

moodyhunter commented Feb 28, 2024

Hmm this is interesting, I've never tested it on KDE master branch (should be in extra-staging rn?).
Since 6.0 will be released today, I'll fix any errors once I have the updates installed.

@dr460nf1r3
Copy link

Yes, it's in staging already. Thanks for taking a look once you are able to.

luisbocanegra and others added 2 commits February 28, 2024 22:34
screenGeometry now belongs to PlasmoidItem
Several macros expected major=5 and minor>x (e.g. kdecorations 5.13 or
5.21), checking only minor, which broke with Plasma 6.0.0 stable release
(minor=0). This fixes it in some dirty way, assuming major is either 5
or 6.
@moodyhunter
Copy link
Author

moodyhunter commented Feb 28, 2024

Thanks @luisbocanegra and @andrevmatos for moodyhunter/applet-window-buttons6#2 moodyhunter/applet-window-buttons6#1, the compilation failure is fixed.

@hazel-bunny
Copy link

Hi, thanks for your port. I'm using it in Fedora 40. I have an issue though, and your issue tracker is off.

Screencast_20240301_154243.webm

Closing child window with buttons from applet closes parent window too. It should only close child window.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.0-0.rc6.49.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 2 × AMD E2-9000e RADEON R2, 4 COMPUTE CORES 2C+2G
Memory: 3.7 GiB of RAM
Graphics Processor: AMD Radeon R2 Graphics
Manufacturer: HP
Product Name: HP Laptop 14-bw0xx

@moodyhunter
Copy link
Author

moodyhunter commented Mar 1, 2024

Hi, @hazel-bunny GitHub defaults not to enable Issues for forked repos, anyway, it's been enabled now. I'll try to investigate your issue asap.

**disclaimer: I'm not familiar with applet-window-buttons right now, as my initial intention was the Qt6 porting

ChrTall and others added 10 commits June 16, 2024 21:59
Added new Setting KWin BorderlessMaximumWindows to the Behavior Page.
This setting uses a C++ QML Extension that manipulates ~/.config/kwinrc with KConfig and uses DBus to reload the KWin Config if necessary.
KWins BorderlessMaximumWindows is set by a lot of people that use this applet.
Plasma 6.3 comes with a new major version of the KDecoration libary with some breaking changes
Adapt to KDecoration3/Plasma 6.3
Update build dependencies for Ubuntu
Removed Latte-Dock specific code from the applet, because Latte Dock …

> I added a setting to configure the KWin option BorderlessMaximizedWindwos, which makes sense, because its only real use case is given, when using this plasmoid.
> I added a new Behavior tab to the settings page, which uses Kirigami like the KDE stock plasmoids.
> The existing General page can not be converted to Kirigami Formlayout, because the Drag and Drop of the functionality of the rearrange buttons feature does not work then.
> For now I´d suggest to keep it as it is. (unlike Kirigami it is not responsive, when resizing the window)
> The licenses were converted with kde licensedigger to the recommended reuse compliant spdx format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants