summaryrefslogtreecommitdiff
path: root/gui-wm/sommelier/files/sommelier-0.12-no-unused-wl-assert.patch
blob: 15bcf93bb3bbb18fb5818784f690b820098a3460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From df91ff20f05375d3695f13f48980cd0c81bdee72 Mon Sep 17 00:00:00 2001
From: Janne Grunau <janne-fdr@jannau.net>
Date: Wed, 2 Oct 2024 00:29:20 +0200
Subject: [PATCH 4/4] vm_tools: sommelier: Do not assert on unsued wayland
 interfaces

When sommelier is used with general purpose wayland compositors it must
not assert on the removal of unused wayland interfaces since compositors
as kwin_wayland implement interfaces not used by sommelier.
Fixes an abort() after DPMS when using kwin_wayland.
---
 sommelier.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sommelier.cc b/sommelier.cc
index afbca339..4b3ad73e 100644
--- a/sommelier.cc
+++ b/sommelier.cc
@@ -953,7 +953,10 @@ void sl_registry_remover(void* data,
   }
 
   // Not reached.
-  assert(0);
+  // Do not assert on the removal on unknown / unbound globals
+  // On general purpose Linux systems compositors may offer interfaces
+  // not used by sommelier.
+  // assert(0);
 }
 
 const struct wl_registry_listener sl_registry_listener = {sl_registry_handler,
-- 
2.46.2