gnome-shell/fix-some-js-warnings.patch
2024-07-23 10:29:02 -06:00

63 lines
2.2 KiB
Diff

From 04bf0729ed6ae75736e297a10603bcb0a564cb28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 9 Jun 2020 19:42:21 +0200
Subject: [PATCH 1/2] popupMenu: Guard against non-menu-item children
This avoid a harmless but annoying warning.
---
js/ui/popupMenu.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index b6ad545087..cbbcfea1ff 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -951,7 +951,8 @@ export class PopupMenuBase extends Signals.EventEmitter {
}
_getMenuItems() {
- return this.box.get_children().map(a => a._delegate).filter(item => {
+ const children = this.box.get_children().filter(a => a._delegate !== undefined);
+ return children.map(a => a._delegate).filter(item => {
return item instanceof PopupBaseMenuItem || item instanceof PopupMenuSection;
});
}
--
2.45.2
From cffe984d9b85494fcf34500e78875b66c1cec534 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 9 Jun 2020 19:48:06 +0200
Subject: [PATCH 2/2] st/shadow: Check pipeline when painting
We shouldn't simply assume that st_shadow_helper_update() has been
called before paint() or that the pipeline was created successfully.
---
src/st/st-shadow.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c
index a406b61532..574445aeac 100644
--- a/src/st/st-shadow.c
+++ b/src/st/st-shadow.c
@@ -294,9 +294,10 @@ st_shadow_helper_paint (StShadowHelper *helper,
ClutterActorBox *actor_box,
uint8_t paint_opacity)
{
- _st_paint_shadow_with_opacity (helper->shadow,
- node,
- helper->pipeline,
- actor_box,
- paint_opacity);
+ if (helper->pipeline != NULL)
+ _st_paint_shadow_with_opacity (helper->shadow,
+ node,
+ helper->pipeline,
+ actor_box,
+ paint_opacity);
}
--
2.45.2