File: gtksocket-Fix-wrong-sanity-check.patch

package info (click to toggle)
gtk%2B3.0 3.24.49-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 181,504 kB
  • sloc: ansic: 669,492; xml: 8,780; javascript: 6,630; python: 1,322; sh: 674; perl: 370; makefile: 212; cpp: 34
file content (27 lines) | stat: -rw-r--r-- 840 bytes parent folder | download
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
From: =?utf-8?q?Ga=C3=ABl_Bonithon?= <gael@xfce.org>
Date: Sat, 3 Feb 2024 22:33:57 +0100
Subject: gtksocket: Fix wrong sanity check

This avoids a critical warning from gtk_widget_get_parent() if
focus_widget == NULL.

(cherry picked from commit 1d29335cbfbd4a6d3c39664c68145a7966fdbd14)

Origin: upstream gtk-3-24 after 3.24.49
---
 gtk/gtksocket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index ffdaf8b..7b87b4d 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -1260,7 +1260,7 @@ gtk_socket_advance_toplevel_focus (GtkSocket        *socket,
     }
 
   focus_widget = gtk_window_get_focus (window);
-  if (window)
+  if (focus_widget)
     {
       /* Wrapped off the end, clear the focus setting for the toplevel */
       parent = gtk_widget_get_parent (focus_widget);