-
Notifications
You must be signed in to change notification settings - Fork 46
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
[REQUEST] ABI compatibility with Rofi? #96
Comments
Aw good point, thank you. I think this is mainly a problem after #82 @moetayuko FYI |
I didn't think about ABI compatibility at all. Which APIs need to align with the original rofi, is there sth like a list? |
Everything that affects The particular changes that are relevant here are in typedef cairo_surface_t *(*_mode_get_icon)(const Mode *sw,
unsigned int selected_line,
- unsigned int height);
+ unsigned int height,
+ guint scale); the corresponding function in cairo_surface_t *mode_get_icon(Mode *mode, unsigned int selected_line,
- unsigned int height);
+ unsigned int height, guint scale); and the API of the Rofi icon fetcher: -uint32_t rofi_icon_fetcher_query(const char *name, const int size);
+uint32_t rofi_icon_fetcher_query(const char *name, const int size,
+ const guint scale); and -uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize,
- const int hsize);
+ const int hsize, const guint scale); Technically, the addition of the I’m not really sure what the |
The main usecase is rofi/source/rofi-icon-fetcher.c Lines 326 to 328 in 5cd1e3c
|
This time, preserving ABI compatibility with upstream rofi Fixes #96
With respect to svenstaro/rofi-calc#112 when we can expect new release, so that all those rebuilds happen? |
@mcepl distros should update rofi-calc when a new version of upstream rofi is released. Right now the wayland branch is using the ABI from rofi:next but it is different than the one in the last rofi release, 1.7.5, so releasing a new rofi-wayland version would not help. Until rofi's next version is released (1.7.6?), I don't think there is an easy fix except for recompiling rofi-calc. |
On Wed Jan 10, 2024 at 4:20 PM CET, lbonn wrote:
Right now the wayland branch is using the ABI from rofi:next but it is different than the one in the last rofi release, 1.7.5, so releasing a new rofi-wayland version would not help.
Until rofi's next version is released (1.7.6?), I don't think there is an easy fix except for recompiling rofi-calc.
Yeah, but the problem is that for example we in openSUSE have BOTH versions of rofi, so the questions is against which version of it, we should rebuild rofi-calc.
|
Quick and dirty fix for Arch users: Install |
Likewise confirming for
Unsure how this varies system to system, but I saw the below. This to me was obvious of some breaking change between versions and lead me here. Perhaps including the below string will aid others to whom it's less obvious.
|
Before opening a feature request
What is the user problem or growth opportunity you want to see solved?
Plugins built for normal Rofi are currently ABI-incompatible with plugins built for this (Wayland) Rofi; however, this is not made obvious to the user (attempting to load a Rofi plugin using Wayland Rofi simply results in UB, manifesting as an unhelpful assertion failure), nor is it easy for plugin authors to support both normal and Wayland Rofi.
I would suggest one of two things:
_mode_get_icon
, butrofi_icon_fetcher_query[_advanced]
may also be changed), or if that is not possibleHow do you know that this problem exists today? Why is this important?
Some people use Wayland Rofi for practical use, as it is in the AUR.
My interest in this comes from wanting to support Wayland Rofi in my Rust library for writing Rofi plugins: SabrinaJewson/rofi-mode.rs#8.
Who will benefit from it?
People who write and use plugins for Wayland Rofi.
Rofi version (rofi -v)
Latest commit from repositories, as of 2023-10-31
Configuration
N/A
Additional information
No response
The text was updated successfully, but these errors were encountered: