From 4d314789c9c041d424faba2a76217abd3adaba8c Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Mon, 31 Oct 2016 19:53:13 +0000 Subject: [PATCH 5/5] xdg-screensaver: fix suspending using window without a WM_NAME property --- scripts/xdg-screensaver.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/xdg-screensaver.in b/scripts/xdg-screensaver.in index 50ef916..1651bf0 100644 --- a/scripts/xdg-screensaver.in +++ b/scripts/xdg-screensaver.in @@ -466,8 +466,9 @@ my $x = X11::Protocol->new(); my $named_window_id = hex($window_id); my $window_name; while (1) { - ($window_name) = $x->GetProperty($named_window_id, $x->atom("WM_NAME"), - $x->atom("STRING"), 0, 1000, 0); + eval { ($window_name) = $x->GetProperty($named_window_id, $x->atom("WM_NAME"), + $x->atom("STRING"), 0, 1000, 0); }; + $window_name = "?" if $@; last if defined($window_name) && $window_name ne ""; (undef, $named_window_id) = $x->QueryTree($named_window_id); if (!defined($named_window_id)) { -- 2.7.4