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

Separate cairo-xlib.h Lua bindings from cairo.h #1844

Merged
merged 5 commits into from
Apr 19, 2024
Merged

Conversation

Caellian
Copy link
Collaborator

This allows cairo.h to be used from Lua on Wayland without X11 as requirement.

A way of creating surfaces in Lua that uses Shm allocated buffers should be added in future. This PR only cleans up build options to avoid weird errors.

Closes #1804 - BUILD_LUA_CAIRO didn't depend on X11 and lua/CMakeLists.txt doesn't provide warnings like dependent_options do, so it wasn't clear why the build was failing with BUILD_LUA_CAIRO && !BUILD_X11.

This allows cairo.h to be used from Lua on Wayland without X11 as
requirement.

A way of creating surfaces in Lua that uses Shm allocated buffers should
be added in future. This commit only cleans up build options to avoid weird
errors.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian Caellian added build system Issues and PRs related to build system (CMake) and process display: wayland Issue related to Wayland backend lua Issue or PR related to Lua code cairo Issue or PR related to cairo labels Apr 19, 2024
Copy link

netlify bot commented Apr 19, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 9e57586
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/66227bec31ebe900081a74ec

@github-actions github-actions bot added dependencies Issue or PR that affects dependencies gh-actions Issue or PR that suggest changing GitHub actions labels Apr 19, 2024
@@ -88,7 +88,6 @@ jobs:
libaudclient-dev \
libcairo2-dev \
libcurl4-gnutls-dev \
libcurl4-gnutls-dev \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate line?

Add pango dependency for Wayland (adds pangocairo)

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
...to fix CI.

Also, it just makes sense.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Obliterated the IF guard because it made me angry.

Also, not needed because it doesn't **directly contain any module checks**
and flags can be checked individually because dependent_option already turns
them off if their dependencies aren't satisfied.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@brndnmtthws brndnmtthws added the feature New feature PR or issue label Apr 19, 2024
@Caellian Caellian merged commit 45500b1 into main Apr 19, 2024
62 checks passed
@Caellian Caellian deleted the fix/separate-cairo-xlib branch April 19, 2024 15:31
@jjgomera
Copy link

jjgomera commented May 9, 2024

if this PR has been included in v1.20.2 included in debian trixie, I still have the issue using that version

attempt to call a nil value (global 'cairo_xlib_surface_create')

using the conky rings lua script

@Caellian
Copy link
Collaborator Author

Caellian commented May 9, 2024

@jjgomera In later versions you need to require cairo_xlib from Lua, see here for more details. This was separated out to help with future wayland support. Lmk if it still doesn't work with that.

@jjgomera
Copy link

@jjgomera In later versions you need to require cairo_xlib from Lua, see here for more details. This was separated out to help with future wayland support. Lmk if it still doesn't work with that.

Thanks, thats was the problem, work now!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Issues and PRs related to build system (CMake) and process cairo Issue or PR related to cairo dependencies Issue or PR that affects dependencies display: wayland Issue related to Wayland backend feature New feature PR or issue gh-actions Issue or PR that suggest changing GitHub actions lua Issue or PR related to Lua code
Projects
None yet
3 participants