diff --git a/srcpkgs/wayfire-plugins-extra/patches/forcefullscreen-crash.patch b/srcpkgs/wayfire-plugins-extra/patches/forcefullscreen-crash.patch new file mode 100644 index 0000000000..5b6bcc4c4c --- /dev/null +++ b/srcpkgs/wayfire-plugins-extra/patches/forcefullscreen-crash.patch @@ -0,0 +1,50 @@ +From c321dda631026485d767f7125e80e5f5d7ad5b35 Mon Sep 17 00:00:00 2001 +From: Scott Moreau +Date: Tue, 16 Feb 2021 04:49:52 -0700 +Subject: [PATCH] force-fullscreen: Fix crash when closing fullscreened + surfaces (#79) + +Introduced by a change in core, rework things to make it not crash +when closing a view. +--- + src/force-fullscreen.cpp | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/force-fullscreen.cpp b/src/force-fullscreen.cpp +index 364f239..894c403 100644 +--- a/src/force-fullscreen.cpp ++++ b/src/force-fullscreen.cpp +@@ -41,11 +41,23 @@ class fullscreen_subsurface : public wf::surface_interface_t, + + fullscreen_subsurface(wayfire_view view) : + wf::surface_interface_t(), wf::compositor_surface_t() +- {} ++ { ++ view->connect_signal("subsurface-removed", &on_subsurface_removed); ++ } + + ~fullscreen_subsurface() + {} + ++ wf::signal_connection_t on_subsurface_removed = [&] (auto data) ++ { ++ auto ev = static_cast(data); ++ if ((ev->subsurface.get() == this) && _mapped) ++ { ++ _mapped = false; ++ wf::emit_map_state_change(this); ++ } ++ }; ++ + void on_pointer_enter(int x, int y) override + { + wf::get_core().set_cursor("default"); +@@ -295,8 +307,6 @@ class wayfire_force_fullscreen : public wf::plugin_interface_t + + if (background->black_border) + { +- wf::emit_map_state_change(background->black_border); +- background->black_border->_mapped = false; + view->remove_subsurface(background->black_border); + background->black_border = nullptr; + } diff --git a/srcpkgs/wayfire-plugins-extra/template b/srcpkgs/wayfire-plugins-extra/template index 320429eb61..e53f0536c9 100644 --- a/srcpkgs/wayfire-plugins-extra/template +++ b/srcpkgs/wayfire-plugins-extra/template @@ -1,7 +1,7 @@ # Template file for 'wayfire-plugins-extra' pkgname=wayfire-plugins-extra version=0.7.0 -revision=2 +revision=3 build_style=meson hostmakedepends="pkg-config wayland-devel" makedepends="wayfire-devel glibmm-devel" @@ -12,6 +12,7 @@ license="MIT" homepage="https://wayfire.org/" distfiles="https://github.com/WayfireWM/wayfire-plugins-extra/archive/v${version}.tar.gz" checksum=e6377e7f2cd6b0a19fe0a256c819f801ee1d963524ed4e4930b702474bc04287 +patch_args="-Np1" post_install() { vlicense LICENSE