Fix layershell unmap segfault when no outputs left (boo#1254386, upstream gh#labwc/labwc#2576) #1
31
2577.patch
Normal file
31
2577.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 3b033dced78fe6e04a739f905e654c0f278a7481 Mon Sep 17 00:00:00 2001
|
||||
From: Consolatis <35009135+Consolatis@users.noreply.github.com>
|
||||
Date: Wed, 12 Feb 2025 15:14:16 +0100
|
||||
Subject: [PATCH] src/layers: handle unmap without any outputs left
|
||||
|
||||
---
|
||||
src/layers.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/layers.c b/src/layers.c
|
||||
index fc0b2b6ff2..6ce9527dba 100644
|
||||
--- a/src/layers.c
|
||||
+++ b/src/layers.c
|
||||
@@ -136,6 +136,9 @@ try_to_focus_next_layer_or_toplevel(struct server *server)
|
||||
{
|
||||
struct seat *seat = &server->seat;
|
||||
struct output *output = output_nearest_to_cursor(server);
|
||||
+ if (!output) {
|
||||
+ goto no_output;
|
||||
+ }
|
||||
|
||||
enum zwlr_layer_shell_v1_layer overlay = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
|
||||
enum zwlr_layer_shell_v1_layer top = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
|
||||
@@ -169,6 +172,7 @@ try_to_focus_next_layer_or_toplevel(struct server *server)
|
||||
* Unfocus the current layer-surface and focus the topmost toplevel if
|
||||
* one exists on the current workspace.
|
||||
*/
|
||||
+no_output:
|
||||
if (seat->focused_layer) {
|
||||
seat_set_focus_layer(seat, NULL);
|
||||
}
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 13 18:19:55 UTC 2025 - Lucas Sanchez Sagrado <lucsansag@gmail.com>
|
||||
|
||||
- Fix layershell unmap segfault when no outputs left (boo#1254386, upstream gh#labwc/labwc#2576)
|
||||
* Backported 2577.patch from upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 20:07:15 UTC 2024 - Muhammad Akbar Yanuar Mantari <mantarimay@pm.me>
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ License: GPL-2.0-only
|
||||
URL: https://github.com/labwc/labwc
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: https://gitlab.freedesktop.org/vyivel/libsfdo/-/archive/v%{slver}/%{slname}-v%{slver}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM handle_layershell_unmap_without_outputs_left.patch boo#1254386 -- based on PR 2577, fixes gh#labwc/labwc#2576
|
||||
Patch0: https://github.com/labwc/labwc/pull/2577.patch
|
||||
%if %{with warp}
|
||||
Source2: https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/%{swver}/%{swname}-%{swver}.tar.bz2
|
||||
Provides: bundled(wlroots)
|
||||
@@ -89,7 +91,7 @@ by openbox.
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
%if %{with warp}
|
||||
mkdir subprojects/%{swname}
|
||||
tar -xf %{SOURCE2} --strip-components 1 -C subprojects/%{swname}
|
||||
|
||||
Reference in New Issue
Block a user