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

Gtk4. Migration. ALabel, AModule, factory, clock,cava. Events handling #2956

Open
wants to merge 39 commits into
base: gtk4
Choose a base branch
from

Conversation

LukashonakV
Copy link
Contributor

@LukashonakV LukashonakV commented Feb 22, 2024

Hi @Alexays , @alebastr

Finally I got first success execution with clock module. The only thing here is to add events controllers to the AModule class. Will check soon
ps_2024-02-24-20_33_49

LukashonakV and others added 5 commits February 22, 2024 21:06
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
None of these includes are required in the header.

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
@LukashonakV
Copy link
Contributor Author

LukashonakV commented Feb 26, 2024

Hi @Alexays , @alebastr
Finally AModule, ALabel handle events correct

2024-02-26.21-03-02.mp4

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
@LukashonakV LukashonakV changed the title Gtk4. Migration. ALabel, AModule, factory, clock Gtk4. Migration. ALabel, AModule, factory, clock. Events handling Feb 26, 2024
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
@LukashonakV LukashonakV changed the title Gtk4. Migration. ALabel, AModule, factory, clock. Events handling Gtk4. Migration. ALabel, AModule, factory, clock,cava. Events handling Feb 26, 2024
@LukashonakV
Copy link
Contributor Author

Partially covers #2815

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
@LukashonakV
Copy link
Contributor Author

LukashonakV commented Feb 27, 2024

+ backlight and harness

build: drop std::filesystem checks

The `<experimental/filesystem>` and `-lc++experimental` aren't needed
since LLVM 9.0. And since we now require C++20, checking for the
`<filesystem>` support shouldn't be necessary either.

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Add documentation for justify option

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
add tooltip-format to custom module man page

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
The WP component loader API has changed to be asynchronous, so implement a (GAsyncReadyCallback)-based loader to manage them. Logging integration change was required for 0.5.0 RCs but not for the 0.5.0 release.

Fix clang-tidy and clang-format warnings. Note these are significantly wider than the changes for 0.5.0 so optional beyond the existing patchset.

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
@LukashonakV
Copy link
Contributor Author

LukashonakV commented Apr 29, 2024

Hi @Alexays , @alebastr

Actually the main work is almost done

Leftovers are:

  1. ISSUES GTK4 #2815 - not covered modules
  2. Need to sync modules one by one with the master since c420b40
  3. Need to satisfy linter
  4. Need to rebuild docker containers
  5. There is a bug with the Gtk::Label. When module sets the value to the set_tooltip_text/set_tooltip_markup Gtk::Label looks like try to refresh all tooltips for all opened Labels. And this leads to stealing of the focus. This point I'm trying to investigate now
    Can you please take this PR for now.

Thanks

During migration I found out

  1. UPower module is rewritten and should be rewritten in gtk3 too
  2. Client in GTK4 can be simplified due to no need to manage wayland logic more as Waybar relies on Gtk framework

Waybar under GTK4 example

2024-04-29.11-33-12.mp4

UPD:
Regarding 5-th point - I've created an issue to gtk4 https://gitlab.gnome.org/GNOME/gtk/-/issues/6674

UPD2:
According https://discourse.gnome.org/t/gtk4-migration-label-and-tooltip-from-gtk3/20710/2, separate threads are not allowed to call GTK API themselves. For now, in GTK4, this leads to odd behaving for GTK Label

@LukashonakV
Copy link
Contributor Author

LukashonakV commented Apr 30, 2024

Hi @alebastr , @Alexays is it possible to have discussion somewhere regarding GTK4 and Waybar architecture ?
The reason is I'm asking for : according documentation and the approach of GTK this framework since 3.36 release is no more thread safe ... and the approach is GTK API should be called from the main loop. Actually looking on the current Waybar architecture I'm inclined to think this architecture should be redesigned. Actually Waybar modules in their separate threads just need to do some logic and then signals main thread to start calling of the GTK API.
So I need someones opinion on this point of view... or to have discussion with some agreed approach...

@LukashonakV
Copy link
Contributor Author

LukashonakV commented May 3, 2024

Hi @alebastr , @Alexays is it possible to have discussion somewhere regarding GTK4 and Waybar architecture ? The reason is I'm asking for : according documentation and the approach of GTK this framework since 3.36 release is no more thread safe ... and the approach is GTK API should be called from the main loop. Actually looking on the current Waybar architecture I'm inclined to think this architecture should be redesigned. Actually Waybar modules in their separate threads just need to do some logic and then signals main thread to start calling of the GTK API. So I need someones opinion on this point of view... or to have discussion with some agreed approach...

Need to wait for investigation of the core GTK team. To me it seems GTK issue which is under discussion here gtk4-migration-label-and-tooltip-from-gtk3

@LukashonakV
Copy link
Contributor Author

Hi @alebastr , @Alexays is it possible to have discussion somewhere regarding GTK4 and Waybar architecture ? The reason is I'm asking for : according documentation and the approach of GTK this framework since 3.36 release is no more thread safe ... and the approach is GTK API should be called from the main loop. Actually looking on the current Waybar architecture I'm inclined to think this architecture should be redesigned. Actually Waybar modules in their separate threads just need to do some logic and then signals main thread to start calling of the GTK API. So I need someones opinion on this point of view... or to have discussion with some agreed approach...

Need to wait for investigation of the core GTK team. To me it seems GTK issue which is under discussion here gtk4-migration-label-and-tooltip-from-gtk3

Finally no action from waybar side, https://gitlab.gnome.org/GNOME/gtk/-/commit/84fd420271928d171fd0d66a7f7d773fabb3ee2a
GTK fixed an issue with flickering tooltips in GTK4

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.

None yet

2 participants