diff --git a/srcpkgs/wayfire/INSTALL.msg b/srcpkgs/wayfire/INSTALL.msg deleted file mode 100644 index 05274ffcc3..0000000000 --- a/srcpkgs/wayfire/INSTALL.msg +++ /dev/null @@ -1,6 +0,0 @@ -Setting the SUID bit after install has been retired for all Wayland -compositors. It is recommended that users use a session management daemon -such as elogind or seatd and do not rely on compositors dropping privileges. - -All users who require this functionality will need to set the SUID bit manually -after each update going forward. diff --git a/srcpkgs/wayfire/patches/wlroots13.patch b/srcpkgs/wayfire/patches/wlroots13.patch new file mode 100644 index 0000000000..d42dbc425a --- /dev/null +++ b/srcpkgs/wayfire/patches/wlroots13.patch @@ -0,0 +1,189 @@ +diff --git a/meson.build b/meson.build +index 4a8992cb..117f928c 100644 +--- a/meson.build ++++ b/meson.build +@@ -28,7 +28,7 @@ libinput = dependency('libinput', version: '>=1.7.0') + pixman = dependency('pixman-1') + threads = dependency('threads') + xkbcommon = dependency('xkbcommon') +-wlroots = dependency('wlroots', version: ['>=0.12.0', '<0.13.0'], required: get_option('use_system_wlroots')) ++wlroots = dependency('wlroots', version: ['>=0.13.0', '<0.14.0'], required: get_option('use_system_wlroots')) + wfconfig = dependency('wf-config', version: ['>=0.7.0', '<0.8.0'], required: get_option('use_system_wfconfig')) + + use_system_wlroots = not get_option('use_system_wlroots').disabled() and wlroots.found() +diff --git a/plugins/single_plugins/vswipe.cpp b/plugins/single_plugins/vswipe.cpp +index da37448c..26c8f399 100644 +--- a/plugins/single_plugins/vswipe.cpp ++++ b/plugins/single_plugins/vswipe.cpp +@@ -1,3 +1,4 @@ ++#include + #include + #include + #include +diff --git a/src/api/wayfire/nonstd/wlroots-full.hpp b/src/api/wayfire/nonstd/wlroots-full.hpp +index 77a12c70..4a24f1a1 100644 +--- a/src/api/wayfire/nonstd/wlroots-full.hpp ++++ b/src/api/wayfire/nonstd/wlroots-full.hpp +@@ -112,6 +112,8 @@ extern "C" + #include + #include + #include ++#include ++#include + #include + #include + #include +diff --git a/src/api/wayfire/nonstd/wlroots.hpp b/src/api/wayfire/nonstd/wlroots.hpp +index 4686d14f..402ab3cd 100644 +--- a/src/api/wayfire/nonstd/wlroots.hpp ++++ b/src/api/wayfire/nonstd/wlroots.hpp +@@ -43,7 +43,14 @@ extern "C" + struct wlr_viewporter; + + #include ++#include ++#include ++#include + #include + #include + #include ++#include ++ ++ static constexpr uint32_t WLR_KEY_PRESSED = WL_KEYBOARD_KEY_STATE_PRESSED; ++ static constexpr uint32_t WLR_KEY_RELEASED = WL_KEYBOARD_KEY_STATE_RELEASED; + } +diff --git a/src/core/opengl.cpp b/src/core/opengl.cpp +index 09022930..aacb0800 100644 +--- a/src/core/opengl.cpp ++++ b/src/core/opengl.cpp +@@ -227,25 +227,27 @@ void render_rectangle(wf::geometry_t geometry, wf::color_t color, + + void render_begin() + { +- /* No real reason for 10, 10, 0 but it doesn't matter */ +- render_begin(10, 10, 0); ++ if (!wlr_egl_is_current(wf::get_core_impl().egl)) ++ { ++ wlr_egl_make_current(wf::get_core_impl().egl); ++ } ++ ++ GL_CALL(glEnable(GL_BLEND)); ++ GL_CALL(glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); + } + + void render_begin(const wf::framebuffer_base_t& fb) + { +- render_begin(fb.viewport_width, fb.viewport_height, fb.fb); ++ render_begin(); ++ fb.bind(); + } + +-void render_begin(int32_t viewport_width, int32_t viewport_height, uint32_t fb) ++void render_begin(int32_t width, int32_t height, uint32_t fb) + { +- if (!wlr_egl_is_current(wf::get_core_impl().egl)) +- { +- wlr_egl_make_current(wf::get_core_impl().egl, EGL_NO_SURFACE, NULL); +- } ++ render_begin(); + +- wlr_renderer_begin(wf::get_core_impl().renderer, +- viewport_width, viewport_height); +- GL_CALL(glBindFramebuffer(GL_FRAMEBUFFER, fb)); ++ GL_CALL(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fb)); ++ GL_CALL(glViewport(0, 0, width, height)); + } + + void clear(wf::color_t col, uint32_t mask) +@@ -257,8 +259,7 @@ void clear(wf::color_t col, uint32_t mask) + void render_end() + { + GL_CALL(glBindFramebuffer(GL_FRAMEBUFFER, current_output_fb)); +- wlr_renderer_scissor(wf::get_core().renderer, NULL); +- wlr_renderer_end(wf::get_core().renderer); ++ GL_CALL(glDisable(GL_SCISSOR_TEST)); + } + } + +diff --git a/src/core/seat/cursor.cpp b/src/core/seat/cursor.cpp +index 7ba23b06..d6006f17 100644 +--- a/src/core/seat/cursor.cpp ++++ b/src/core/seat/cursor.cpp +@@ -160,7 +160,10 @@ void wf::cursor_t::set_cursor(std::string name) + name = "left_ptr"; + } + +- wlr_xcursor_manager_set_cursor_image(xcursor, name.c_str(), cursor); ++ idle_set_cursor.run_once([name, this] () ++ { ++ wlr_xcursor_manager_set_cursor_image(xcursor, name.c_str(), cursor); ++ }); + } + + void wf::cursor_t::unhide_cursor() +@@ -175,6 +178,7 @@ void wf::cursor_t::unhide_cursor() + + void wf::cursor_t::hide_cursor() + { ++ idle_set_cursor.disconnect(); + wlr_cursor_set_surface(cursor, NULL, 0, 0); + this->hide_ref_counter++; + } +diff --git a/src/core/seat/cursor.hpp b/src/core/seat/cursor.hpp +index 0c4ab8fe..aec8f1aa 100644 +--- a/src/core/seat/cursor.hpp ++++ b/src/core/seat/cursor.hpp +@@ -3,6 +3,7 @@ + + #include "seat.hpp" + #include "wayfire/plugin.hpp" ++#include "wayfire/util.hpp" + + namespace wf + { +@@ -28,6 +29,13 @@ struct cursor_t + void hide_cursor(); + int hide_ref_counter = 0; + ++ /** ++ * Delay setting the cursor, in order to avoid setting the cursor ++ * multiple times in a single frame and to avoid setting it in the middle ++ * of the repaint loop (not allowed by wlroots). ++ */ ++ wf::wl_idle_call idle_set_cursor; ++ + /** + * Start/stop touchscreen mode, which means the cursor will be hidden. + * It will be shown again once a pointer or tablet event happens. +diff --git a/src/main.cpp b/src/main.cpp +index bd07d618..0c5e97e7 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -260,7 +260,7 @@ int main(int argc, char *argv[]) + /** TODO: move this to core_impl constructor */ + core.display = display; + core.ev_loop = wl_display_get_event_loop(core.display); +- core.backend = wlr_backend_autocreate(core.display, NULL); ++ core.backend = wlr_backend_autocreate(core.display); + core.renderer = wlr_backend_get_renderer(core.backend); + core.egl = wlr_gles2_renderer_get_egl(core.renderer); + assert(core.egl); +diff --git a/src/output/render-manager.cpp b/src/output/render-manager.cpp +index 2039333c..cb2a38bf 100644 +--- a/src/output/render-manager.cpp ++++ b/src/output/render-manager.cpp +@@ -1019,8 +1019,12 @@ class wf::render_manager::impl + swap_damage |= output_damage->get_wlr_damage_box(); + } + +- OpenGL::render_begin(postprocessing->get_target_framebuffer()); +- wlr_output_render_software_cursors(output->handle, swap_damage.to_pixman()); ++ OpenGL::render_begin(); ++ wlr_renderer_begin(wf::get_core().renderer, ++ output->handle->width, output->handle->height); ++ wlr_output_render_software_cursors(output->handle, ++ swap_damage.to_pixman()); ++ wlr_renderer_end(wf::get_core().renderer); + OpenGL::render_end(); + + /* Part 4: postprocessing effects */ diff --git a/srcpkgs/wayfire/template b/srcpkgs/wayfire/template index ab6136b724..a7e80c4239 100644 --- a/srcpkgs/wayfire/template +++ b/srcpkgs/wayfire/template @@ -1,7 +1,7 @@ # Template file for 'wayfire' pkgname=wayfire version=0.7.0 -revision=2 +revision=3 _utils_commit=f45641beef46babdc8f1b8d18a924e72beaf8ee6 _touch_commit=b1075c54a280f913edc26b9757262f4f9d6b62b0 build_style=meson @@ -19,6 +19,7 @@ distfiles="https://github.com/WayfireWM/wayfire/archive/v${version}.tar.gz checksum="b1a94ad2843db19e78cbd361ceebaade4507647ad893d5b5117a9fc7724ce41c d172f8c21e0bac01e4116cd957fb0159c5cb39ddfdce897beb0d9c753796d5f1 2b22e03d3a522baeff5798f630ffe5aa95899fd3233b291527503af5fd3e30be" +patch_args=-Np1 # Optimization for nested STL calls CXXFLAGS="-O3"