[gnome-flashback] input-sources: initialize prop variable
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] input-sources: initialize prop variable
- Date: Wed, 22 Jan 2020 18:08:19 +0000 (UTC)
commit 33f22ec0ca3c87d38ee170c0f9f1c4bccc08c4b8
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Jan 22 16:36:27 2020 +0200
input-sources: initialize prop variable
.../libinput-sources/gf-input-source-manager.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source-manager.c
b/gnome-flashback/libinput-sources/gf-input-source-manager.c
index 17315ff..ee5d95e 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-manager.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-manager.c
@@ -154,6 +154,7 @@ get_active_window (void)
gdk_x11_display_error_trap_push (display);
+ prop = NULL;
status = XGetWindowProperty (xdisplay,
DefaultRootWindow (xdisplay),
_net_active_window,
@@ -167,21 +168,12 @@ get_active_window (void)
&bytes_after,
&prop);
+ gdk_x11_display_error_trap_pop_ignored (display);
+
if (status != Success ||
actual_type != XA_WINDOW)
{
- if (prop)
- XFree (prop);
-
- gdk_x11_display_error_trap_pop_ignored (display);
-
- return None;
- }
-
- if (gdk_x11_display_error_trap_pop (display) != Success)
- {
- if (prop)
- XFree (prop);
+ XFree (prop);
return None;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]