psifidotos / applet-window-buttons

Plasma 5 applet in order to show window buttons in your panels
GNU General Public License v2.0
402 stars 55 forks source link

port(ed?) to plasma 6 #214

Open moodyhunter opened 5 months ago

moodyhunter commented 5 months ago

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

similar like https://github.com/psifidotos/applet-window-title/pull/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.

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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

moodyhunter commented 5 months ago

Thanks @luisbocanegra and @andrevmatos for https://github.com/moodyhunter/applet-window-buttons6/pull/2 https://github.com/moodyhunter/applet-window-buttons6/pull/1, the compilation failure is fixed.

hazel-bunny commented 5 months ago

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 commented 5 months ago

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