psifidotos / applet-window-buttons

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

PLASMA 5.23: Compilation error and build error / applet is crashing #131

Closed dr460nf1r3 closed 2 years ago

dr460nf1r3 commented 3 years ago

Operating System: Gentoo KDE Plasma Version: 5.22.80 (built from master branch) KDE Frameworks Version: 5.83.0 (built from master branch) Qt Version: 5.15.2

Was using the script to compile the application from source & tried an ebuild, both leading to the same error message.

Logs here

YamiYukiSenpai commented 3 years ago

Same here for me:

$ sudo bash install.sh 
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  CMakeLists.txt:18 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5: success (found suitable version "5.84.0", minimum required is "5.38.0") found components: CoreAddons Declarative Plasma PlasmaQuick 
fatal: not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- KDECORATION2 VERSION MINOR : 22
-- Could not set up the appstream test. appstreamcli is missing.
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  libappletdecoration/CMakeLists.txt:37 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5: success (found suitable version "5.84.0", minimum required is "5.26.0") found components: Plasma WindowSystem I18n Service ConfigWidgets 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/build
[  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
[ 19%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/decorationpalette.cpp.o
[ 19%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin.cpp.o
[ 23%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/environment.cpp.o
In file included from /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/appletdecorationplugin.cpp:26:
/home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/previewbridge.h:53:10: error: ‘void Decoration::Applet::PreviewBridge::update(KDecoration2::Decoration*, const QRect&)’ marked ‘override’, but does not override
   53 |     void update(KDecoration2::Decoration *decoration, const QRect &geometry) override;
      |          ^~~~~~
[ 28%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/padding.cpp.o
In file included from /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/moc_previewbridge.cpp:10,
                 from /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/build/libappletdecoration/appletdecorationplugin_autogen/mocs_compilation.cpp:9:
/home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/previewbridge.h:53:10: error: ‘void Decoration::Applet::PreviewBridge::update(KDecoration2::Decoration*, const QRect&)’ marked ‘override’, but does not override
   53 |     void update(KDecoration2::Decoration *decoration, const QRect &geometry) override;
      |          ^~~~~~
[ 33%] Building CXX object libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbutton.cpp.o
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:63: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin_autogen/mocs_compilation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/previewbutton.cpp:27:
/home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/previewbridge.h:53:10: error: ‘void Decoration::Applet::PreviewBridge::update(KDecoration2::Decoration*, const QRect&)’ marked ‘override’, but does not override
   53 |     void update(KDecoration2::Decoration *decoration, const QRect &geometry) override;
      |          ^~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:76: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin.cpp.o] Error 1
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:180: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/previewbutton.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:487: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
[  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/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/build/libappletdecoration/appletdecorationplugin_autogen/EWIEGA46WW/moc_previewbridge.cpp:10,
                 from /home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/build/libappletdecoration/appletdecorationplugin_autogen/mocs_compilation.cpp:9:
/home/DATA/taliara69/Downloads/PlasmaExts/applet-window-buttons-0.9.0/libappletdecoration/previewbridge.h:53:10: error: ‘void Decoration::Applet::PreviewBridge::update(KDecoration2::Decoration*, const QRect&)’ marked ‘override’, but does not override
   53 |     void update(KDecoration2::Decoration *decoration, const QRect &geometry) override;
      |          ^~~~~~
make[2]: *** [libappletdecoration/CMakeFiles/appletdecorationplugin.dir/build.make:63: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/appletdecorationplugin_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:487: libappletdecoration/CMakeFiles/appletdecorationplugin.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Here's my system info: Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.22.80 KDE Frameworks Version: 5.84.0 Qt Version: 5.15.3 Kernel Version: 5.4.0-74-generic (64-bit) Graphics Platform: Wayland Processors: 4 × Intel® Core™ i7-4510U CPU @ 2.00GHz Memory: 15.5 GiB of RAM Graphics Processor: Mesa DRI Intel® HD Graphics 4400

IslandC0der commented 3 years ago

I think it was caused by this commit. And here's how they ported it to kwin; I had a few unsuccessful naive attempts of trying to do something similar here, maybe someone more knowledgeable of the codebase can get it to work :)

psifidotos commented 3 years ago

I think that the best approach is to have a new major version to support plasma 5.23 and beyond.

There is a chance that the new damaged signal approach will solve also some issues of the applet and it will make possible to drop some workarounds.

IslandC0der commented 3 years ago

There is a chance that the new damaged signal approach will solve also some issues of the applet and it will make possible to drop some workarounds.

Well, in that case, #130 seems to work as a temporary solution, in the meantime

psifidotos commented 3 years ago

There is a chance that the new damaged signal approach will solve also some issues of the applet and it will make possible to drop some workarounds.

Well, in that case, #130 seems to work as a temporary solution, in the meantime

It is not enough to just remove update method because other things must be tested and updated to damaged signal solution.

IslandC0der commented 3 years ago

There is a chance that the new damaged signal approach will solve also some issues of the applet and it will make possible to drop some workarounds.

Well, in that case, #130 seems to work as a temporary solution, in the meantime

It is not enough to just remove update method because other things must be tested and updated to damaged signal solution.

Fair enough; it does compile with that PR, but I haven't tested anything beyond that I wouldn't be surprised if it wasn't such an easy fix like with kwin

YamiYukiSenpai commented 2 years ago

5.23 is coming very soon, and now, on Neon testing, it has stopped working. Are there any progress?

psifidotos commented 2 years ago

no progress because I had no time to look at it

maverick74 commented 2 years ago

just to say that same thing happens using openSUSE Argon.

If installed from OBS it simply crashes plasmashell entirely.

(@psifidotos take your time - it's not a life or death issue)

YamiYukiSenpai commented 2 years ago

no progress because I had no time to look at it

no worries

mateushonorato commented 2 years ago

after upgrading my kde neon distribution to 5.23, the applet stopped working.

file:///usr/share/plasma/plasmoids/org.kde.windowbuttons/contents/ui/main.qml:26:1: plugin cannot be loaded for module "org.kde.appletdecoration": Cannot load library /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/appletdecoration/libappletdecorationplugin.so: (libkdecorations2private.so.8: cannot open shared object file: No such file or directory)

DiabeticCrab commented 2 years ago

Gentoo has officially rolled out Plasma 5.23 today. Now I am affected aswell. I'll happily try any experimental patches if you need a test subject.

mateushonorato commented 2 years ago

Gentoo has officially rolled out Plasma 5.23 today. Now I am affected aswell. I'll happily try any experimental patches if you need a test subject.

me too

psifidotos commented 2 years ago

IMPORTANT NOTICE to all... I half installed a custom Plasma 5.23 environment. The change in KDecoration2 library is not minimal, there is a big chance that window buttons applets is not going to support Plasma 5.23 and beyond because of the changes at: https://github.com/KDE/kdecoration/commit/319d174e252bff1404cd3c2043bc6c74101780d3

@zzag can you confirm that after plasma 5.23 window buttons applet wont be able to paint anything through kdecoration2?

I will wait for Plasma 5.23 to reach my Tumbleweed system in order to confirm this and that the current solution is not able to continue its development.

psifidotos commented 2 years ago

False alarm! :) I found a way to paint the buttons, and now I just need to find a way to trigger mouse events properly for them.

zzag commented 2 years ago

@zzag can you confirm that after plasma 5.23 window buttons applet wont be able to paint anything through kdecoration2?

No, there's Decoration::damaged() signal. Connect it if you want to know whether the decoration is dirty and needs a repaint.

psifidotos commented 2 years ago

@zzag thank you!

feel free everyone to test master branch with plasma 5.23. If everything works ok then I will release afterwards version 0.10 for this applet that will be compatible only with Plasma >= 5.23

maverick74 commented 2 years ago

will try at home ASAP :) Will report if anything goes wrong :) Thanks for your time :)

dr460nf1r3 commented 2 years ago

Thanks a lot @psifidotos! Testing asap 🤩

mateushonorato commented 2 years ago

Just tested it, and kinda worked. If I choose the breeze decoration or any of the other decorations based on it, like "Sierra Breeze", the buttons don't appear and can't be clicked, just an empty space appears. But if I change to a "custom" decoration, like Arc, it works just fine.

psifidotos commented 2 years ago

Just tested it, and kinda worked. If I choose the breeze decoration or any of the other decorations based on it, like "Sierra Breeze", the buttons don't appear and can't be clicked, just an empty space appears. But if I change to a "custom" decoration, like Arc, it works just fine.

Are you sure you tested latest master?

rodrigopedra commented 2 years ago

Hey @psifidotos , I have the same issue as @mateushonorato . I've been using this widget from the master branch for more than a year now.

Below are some screenshots to show off the issue and my installation details.

If there are any help or additional info I can provide, please let me know.

image

image

image

image

rodrigopedra commented 2 years ago

I also made a short video, in case it helps

https://user-images.githubusercontent.com/5470108/137520203-a454a4fa-728d-4f45-9ba3-bf9641b3d0e8.mp4

psifidotos commented 2 years ago

No idea, I tested it in my local kde master branches. It will have to wait until plasma 5.23 is published in Tumbleweed and check it out at my main system.

rodrigopedra commented 2 years ago

Don't worry, take your time.

Thanks for all the hard work, and reach out if there is any help I can provide.

pizzadude commented 2 years ago

In the meantime, "Active Window Control" works, even though it's no longer maintained.

https://store.kde.org/p/998910/

psifidotos commented 2 years ago

In the meantime, "Active Window Control" works, even though it's no longer maintained.

https://store.kde.org/p/998910/

AWC does not draw buttons through KDecoration2, it is just an svg approach for Breeze Decoration without really using the Breeze decoration implementation.

YamiYukiSenpai commented 2 years ago

Funny thing, this worked perfectly fine on Neon Unstable

psifidotos commented 2 years ago

Funny thing, this worked perfectly fine on Neon Unstable

no idea what is missing from Neon then... the requirements are:

antonio-rojas commented 2 years ago

Whatever it is, it is not specific to Neon. I'm seeing the same thing on Arch with 5.23.0 packages.

psifidotos commented 2 years ago

Whatever it is, it is not specific to Neon. I'm seeing the same thing on Arch with 5.23.0 packages.

the situation is pointing for Plasma 5.23 specific version and a different alternative version for Plasma 5.24. We could call it a mess if that is true in the end, we will see... I am waiting Tumbleweed of course to confirm anything.

antonio-rojas commented 2 years ago

Turns out this is a breeze problem. This is the commit that "fixes" it on master, which is not on 5.23:

https://invent.kde.org/plasma/breeze/-/commit/79e32241c13d9ad3065c478f1e5870551b4a5284

psifidotos commented 2 years ago

Oh so now makes sense something that I show earlier, let me upload one more commit in order to test again

psifidotos commented 2 years ago

feel free to test again with Plasma 5.23 and not-updated Breeze decoration...

rodrigopedra commented 2 years ago

Thanks @psifidotos , just installed from master and it is working as expected. Have a nice week

pizzadude commented 2 years ago

Confirmed fixed. Thanks. :)

DiabeticCrab commented 2 years ago

Yep, working for me aswell. For anyone maintaining a local copy of SierraBreezeEnhanced (https://github.com/kupiqu/SierraBreezeEnhanced), the patch linked by @antonio-rojas can be adapted and applied to it aswell, since it is a window decoration forked from the breeze codebase.

Patch for SBE: 0001-Merge-5.23-main-upstream-patch-and-fix-window-button.patch.txt

dr460nf1r3 commented 2 years ago

I can confirm it working as well. Thanks for the fix @psifidotos ! 😁 Will there be a nice major version featuring this one soon?

psifidotos commented 2 years ago

I can confirm it working as well. Thanks for the fix @psifidotos ! 😁 Will there be a nice major version featuring this one soon?

yes, probably in the next days

davigamer987 commented 1 year ago

I'm having this issue in the latest plasma 5.26.4 (Arch linux)