[gtk+] gtkwindow: Do not leak GtkPointerFocus



commit 4772fc2d4278d8369e944b9040e708945330d0cd
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jul 19 18:12:53 2017 +0200

    gtkwindow: Do not leak GtkPointerFocus
    
    gtk_window_add_pointer_focus() increments the refcount, which means
    the caller should be dropping its own.

 gtk/gtkwindow.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 8e71100..d680906 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11375,6 +11375,7 @@ gtk_window_update_pointer_focus (GtkWindow        *window,
     {
       focus = gtk_pointer_focus_new (window, target, device, sequence, x, y);
       gtk_window_add_pointer_focus (window, focus);
+      gtk_pointer_focus_unref (focus);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]