GNU bug report logs - #63511
[Patch] Fix for hidden window bug

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Christian Schmidt <cs@HIDDEN>; Keywords: patch; dated Mon, 15 May 2023 05:33:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 63511 <at> debbugs.gnu.org:


Received: (at 63511) by debbugs.gnu.org; 13 Feb 2025 08:09:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 13 03:09:24 2025
Received: from localhost ([127.0.0.1]:40173 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiUHk-0001Hr-38
	for submit <at> debbugs.gnu.org; Thu, 13 Feb 2025 03:09:24 -0500
Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:49568)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tiUHh-0001HW-4B
 for 63511 <at> debbugs.gnu.org; Thu, 13 Feb 2025 03:09:21 -0500
Received: by mail-ed1-x52b.google.com with SMTP id
 4fb4d7f45d1cf-5de5a853090so1327705a12.3
 for <63511 <at> debbugs.gnu.org>; Thu, 13 Feb 2025 00:09:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739434155; x=1740038955; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=UqcFjTn9+kgsv2xwNYb2IJIHGml/H6KA7eO1G9X1fFQ=;
 b=EuKKSGWoS/suf0SRikP5ctcgp1vFJLa+oOz2T9PmWqZxZFKfEDepVEKA8r7opeVWNh
 UGLKDibPVyp+JECVQZYwACvG01q+xA+1TjYAE+6doFV1NwA75IRb2JgZrMz09YC2kTK+
 Gpj98fRfRQEFxZcAMFCq0vJ0TGF/3nkT0QBg5zLb+U2ceSkCtlADyNe+Ou6oqUtWDtq+
 rCU+tm7A1Wy9svbzU+bubjj7QKjE/7QqSOTn8YB76qF5zrjk/Uzm7Ox9tZT8mSO2S44F
 xHTBJ31QwiLPAvlQOv2wiDpda+kzE/XyyLWQXkIqJYCQzbPlQ0i5LuSUgak7VffPMClZ
 3y2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739434155; x=1740038955;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=UqcFjTn9+kgsv2xwNYb2IJIHGml/H6KA7eO1G9X1fFQ=;
 b=hk4QolmI36i/fNNlkRC1ic6YSg9tXb1M86l+Qk5GgLhWfjOzyQbJxCCSIGkjOuzczI
 ryQ8J5QYNtXac7p+b1GuRP1I8Zt/kQmNC4poNgJJZXiQnAO+2bogKQuMCfE7h7m6VLXi
 MKoJXmDnIsrfs0yZrHkqR1Cnvk6Q40yTtJn+MAGNRPSo8oM0Gt0/kXml/HKXEqyXHP7Y
 hC9af/TQfWbjVkbtyJv04UJRHUMm3xhvOLkjQVx6iibk0N4YwIyh+Hk1VvL3oJtl8PGc
 YzgZyVilbAkhjc4o6AH8lf4hd31zjabN5WzFYEbkjJoKNY1yu9FZbLDjV2wSN+gqwB+D
 034A==
X-Forwarded-Encrypted: i=1;
 AJvYcCXcFmCdKnBvDvSYPS1Guk1mckQid6XZ0jsREFrFTzBon5JxPHHm+vz6J+38r33JxuMpreuvVw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yx5+l809zSupySZKvxzB5U6RZwZHQXYtflu6o5mWe25sETpkxHP
 UNw09P4IzC1H7HPNl7wxjZAkbsoHZQvEAerBPviCceg/wahJ4TXdGGpfxUKgug/QO4WwIuWlZsO
 dgO625WLTozWnIHEzdIsCIc/EHhvk3Ys25IzJfw==
X-Gm-Gg: ASbGncscEqgjSZTB1/9piEjZ2hrCKbgIEo2TomI0jlEYz5qIwcXX2fOEXI20h2+uVrl
 SdEPOmC8UcwuOs+GFGsz+ZqgLKKP079ftaemtjzhzMRGNxLvN6zj7WQVh/L5OgA9vZg3C1LTolQ
 g=
X-Google-Smtp-Source: AGHT+IHUydJNRHjS/qzwV29E0ycZ5gKT5X94Ky7XqPb+0AL2zAJCvMTpGha18yw7unUkFMwVIZ/z1lAzlyz407FKY58=
X-Received: by 2002:a05:6402:460a:b0:5de:525c:53cb with SMTP id
 4fb4d7f45d1cf-5deadd7d2c2mr6169156a12.6.1739434154955; Thu, 13 Feb 2025
 00:09:14 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Thu, 13 Feb 2025 00:09:14 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <874jkiwskb.fsf@HIDDEN>
References: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
 <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
 <87il9570z1.fsf@HIDDEN> <d5ee2ac6-d7bf-604f-c7d0-487f34ec3038@HIDDEN>
 <874jkiwskb.fsf@HIDDEN>
MIME-Version: 1.0
Date: Thu, 13 Feb 2025 00:09:14 -0800
X-Gm-Features: AWEUYZkWj5w7-Qgzwv-oTZILv-Za3W6-SpXTZcvPeksH1EZDq-sMSw-g48qEYKc
Message-ID: <CADwFkmkivigE3YHKyJUj5jkPP80SanenGT2-JFhSCB1v94ihPg@HIDDEN>
Subject: Re: bug#63511: [Patch] Fix for hidden window bug
To: Po Lu <luangruo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63511
Cc: Christian Schmidt <cs@HIDDEN>, 63511 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Po Lu <luangruo@HIDDEN> writes:

> Christian Schmidt <cs@HIDDEN> writes:
>
>> prop->type == (Atom) 0 IMHO refers to an empty list, which is valid.
>
> I'm sorry, but that contradicts the EWMH, which prescribes _NET_WM_STATE
> as an array of Atom.  prop->type is only None (which is _not_ a type)
> when the property is deleted.
>
>> I would be surprised if this was a bug in E, given emacs is the only
>> program I know of that exhibits this issue. I have discussed this
>> issue extensively with raster, the main author of E, and we have come
>> to the same conclusion: when _NET_WM_STATE_HIDDEN  the is the only
>> active/set property, and then is removed/unset (sorry if my
>
> _NET_WM_STATE_HIDDEN is not a property that may be ``set'' or ``unset''
> (mind that this parlance is not X terminology), it's an element in a
> property named _NET_WM_STATE.  Each window property is in fact an array
> of items whose width in bits is the format of the property.
>
> That property becomes empty when _NET_WM_STATE_HIDDEN is the only
> element of that array and is subsequently removed; when that transpires,
> GetWindowProperty still returns an empty array of the correct type, as
> the property is still set.
>
> The only two situations in which GetWindowProperty will return a type of
> None is when Enlightenment sets the property type to None or deletes the
> property in its entirety, both of which violate the EWMH.
>
>> terminology is wrong, my days of X programming have been 20+ years
>> ago, and these are corners I have never touched before), there is no
>> code path in emacs that can handle this case. Also, the request does
>> not hit the window manager, but it is X that replies. As such, the bug
>> would lie within X11.
>
> When a window property is changed to an empty value, its type remains
> intact.  Enlightenment is not merely changing the property in this case,
> but also deleting it, which contravenes the EWMH.
>
>> What happens is that the array of atoms is empty, and thus the list is
>> (Atom) 0. Currently this is interpreted as "keep the current state",
>> and not to re-evaluate the (now empty) list of atoms to realize that
>> _NET_WM_STATE_HIDDEN is not set.
>
> An empty window property is empty -- its type remains intact, regardless
> of the number of items within.  There's a distinct contrast between an
> empty window property and a window property that has abruptly vanished.
>
>> If that would be an issue, given there is no "unhidden" property that
>> could be set, how should the WM handle this? E sets
>> _NET_WM_STATE_HIDDEN when the window is hidden, and removes it when no
>> longer hidden.
>
> The window manager should empty the property instead of deleting it,
> which is more or less proscribed by convention.  The removal of a WM
> property from a client toplevel window should always coincide with a
> corresponding change to _NET_SUPPORTED on the root window.

Does this mean to suggest that this is a wontfix, or something else?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.

Message received at 63511 <at> debbugs.gnu.org:


Received: (at 63511) by debbugs.gnu.org; 29 Aug 2023 01:23:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 21:23:13 2023
Received: from localhost ([127.0.0.1]:49199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qanRp-0004JJ-2A
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 21:23:13 -0400
Received: from sonic302-20.consmr.mail.ne1.yahoo.com ([66.163.186.146]:34845)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <luangruo@HIDDEN>) id 1qanRl-0004Io-Bx
 for 63511 <at> debbugs.gnu.org; Mon, 28 Aug 2023 21:23:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1693272176; bh=gAEwVhpeZu8hBS/i1U0vHFu7TWFOKqRSsjw9id9fyJk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To;
 b=o8ziLGP7ad/ky+F4A9tcI7N76mOmXp7K3qP58Is0u0qymVmCbiN2mRUdSqJQmYnEw9F8yI+446kEaKROix6YPNmy2GBekDXwtG1giOMvsUPDvMB4Z7ZtKpXnCXobdAbw5iBQdM/dE+QnimrWPLciuNPTtsQ6T/UryJqulDZeqdgGlY0jqlYHcqaR6xPGt3cX7HAgHlylNpJVnN+g9nmzQwHjNki94Sz5umqM0nrPnG1rq/1VnpsUhVlwFNZZy0hsBkuy13pDsHj66qFWXjtPCyaBhhKslQfRfGGaND4gsnoqfkMrfgU+KaYcq/xFybJ3KvnGKV+eAaxEy4SXYMEUAw==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1693272176; bh=Y0P1jjT6bNVJkofeSSXybAmrETRBidmf6//IDBjHpK9=;
 h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
 b=qJCk/UNCekgoC0HQUzZXV5YnF3rqyG4s6yWdeKAUlfOJhCoaP5mPYjWwru3s0ro45K5d4EDLA12z3o+gKVIMxn3x+nGxpJPHwAfKrMSQmteXwmK6P/wzH4Os2qLvMsaD7QrLQ/D0jRtRIvjzWvHhzlDg4oigxieEkIU1Uo6rItXPzy4YDJrzY4eNvzgb1ZwRsb8uotBt/sKj3uivgsPhyrWv2Xv2aICkLCsbMyaA2Ot7edDSKYV/PPiL6bJQ1JY+ECpm9kspFtZXIkQFnLPtCdcGQeTl+gcAhG0wNTubt/swZPHlCnJY6sa81rgsX9aRT9lFkri+Vold+EuyfH5oiQ==
X-YMail-OSG: iwLhcKoVM1m_Eg7EdUxYVcJO9_LOKLr5zXehc15ZmNTggaDro8ORKiQKgmleEkZ
 _mShst17jJ8fSKPF76W9Y5SEyTd4Jcx1RruCiFj7xJ5tP5FHcbPkJ5HHzi9EHfb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Tg6sTn337V32Su8vPHE3yhR2eTOAzqJ2eHdoW5wl3sx.O6WlR4VKQFvqqgsJ
 NHV06GG5POzI9VoyPUslxswEKmtzO0aSQtM4sEEFKTDEmS5hXO.Ru2Ix0ZAmSzl4W3iTh
X-Sonic-MF: <luangruo@HIDDEN>
X-Sonic-ID: 20c4c072-0a73-4ea5-90f6-3bcf9f043be7
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic302.consmr.mail.ne1.yahoo.com with HTTP; Tue, 29 Aug 2023 01:22:56 +0000
Received: by hermes--production-sg3-69654d8bd-752gm (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 362ddb5f8071d0e65fc3d958e670f019; 
 Tue, 29 Aug 2023 01:22:50 +0000 (UTC)
From: Po Lu <luangruo@HIDDEN>
To: Christian Schmidt <cs@HIDDEN>
Subject: Re: bug#63511: [Patch] Fix for hidden window bug
In-Reply-To: <d5ee2ac6-d7bf-604f-c7d0-487f34ec3038@HIDDEN> (Christian
 Schmidt's message of "Mon, 28 Aug 2023 09:56:06 +0200")
References: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
 <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
 <87il9570z1.fsf@HIDDEN>
 <d5ee2ac6-d7bf-604f-c7d0-487f34ec3038@HIDDEN>
Date: Tue, 29 Aug 2023 09:22:44 +0800
Message-ID: <874jkiwskb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Mailer: WebService/1.1.21763
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo
Content-Length: 2802
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63511
Cc: Stefan Kangas <stefankangas@HIDDEN>, 63511 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Christian Schmidt <cs@HIDDEN> writes:

> prop->type == (Atom) 0 IMHO refers to an empty list, which is valid.

I'm sorry, but that contradicts the EWMH, which prescribes _NET_WM_STATE
as an array of Atom.  prop->type is only None (which is _not_ a type)
when the property is deleted.

> I would be surprised if this was a bug in E, given emacs is the only
> program I know of that exhibits this issue. I have discussed this
> issue extensively with raster, the main author of E, and we have come
> to the same conclusion: when _NET_WM_STATE_HIDDEN  the is the only
> active/set property, and then is removed/unset (sorry if my

_NET_WM_STATE_HIDDEN is not a property that may be ``set'' or ``unset''
(mind that this parlance is not X terminology), it's an element in a
property named _NET_WM_STATE.  Each window property is in fact an array
of items whose width in bits is the format of the property.

That property becomes empty when _NET_WM_STATE_HIDDEN is the only
element of that array and is subsequently removed; when that transpires,
GetWindowProperty still returns an empty array of the correct type, as
the property is still set.

The only two situations in which GetWindowProperty will return a type of
None is when Enlightenment sets the property type to None or deletes the
property in its entirety, both of which violate the EWMH.

> terminology is wrong, my days of X programming have been 20+ years
> ago, and these are corners I have never touched before), there is no
> code path in emacs that can handle this case. Also, the request does
> not hit the window manager, but it is X that replies. As such, the bug
> would lie within X11.

When a window property is changed to an empty value, its type remains
intact.  Enlightenment is not merely changing the property in this case,
but also deleting it, which contravenes the EWMH.

> What happens is that the array of atoms is empty, and thus the list is
> (Atom) 0. Currently this is interpreted as "keep the current state",
> and not to re-evaluate the (now empty) list of atoms to realize that
> _NET_WM_STATE_HIDDEN is not set.

An empty window property is empty -- its type remains intact, regardless
of the number of items within.  There's a distinct contrast between an
empty window property and a window property that has abruptly vanished.

> If that would be an issue, given there is no "unhidden" property that
> could be set, how should the WM handle this? E sets
> _NET_WM_STATE_HIDDEN when the window is hidden, and removes it when no
> longer hidden.

The window manager should empty the property instead of deleting it,
which is more or less proscribed by convention.  The removal of a WM
property from a client toplevel window should always coincide with a
corresponding change to _NET_SUPPORTED on the root window.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.

Message received at 63511 <at> debbugs.gnu.org:


Received: (at 63511) by debbugs.gnu.org; 28 Aug 2023 08:10:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 04:10:25 2023
Received: from localhost ([127.0.0.1]:46858 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaXKL-0002OM-6X
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 04:10:25 -0400
Received: from amalthea.dnx.de ([2001:67c:274c:42::25]:38143
 helo=mail.dn-systems.net) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cs@HIDDEN>) id 1qaXKH-0002O6-NW
 for 63511 <at> debbugs.gnu.org; Mon, 28 Aug 2023 04:10:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aibiot.de; 
 s=20170621;
 h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=g5B9GPmQBGGGAvdQwPcvxed8rWqW+4WkjoEo/QOweqg=; b=Xt3e9zfKAbFYxLJ7wD2cji9c/v
 pnMWXD51zD5TY6COFHDpqMb4WA7QwqSvmd9TnO801k7oKL0gaK0QLsQoFYmoM9NHMnt3V7eGbgSnV
 ZRvQ47T93Z0O+FvKbJBBJKo/Y1eTiWmlZ/dSGoKdBu9Iv8WcQRJ8/s64MI+HvRIZdIC4=;
Received: from relay.dn-systems.net ([2001:67c:274c:42::150]:46970)
 by mail.dn-systems.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
 (Exim 4.96) (envelope-from <cs@HIDDEN>) id 1qaXHC-0003vp-2V
 for 63511 <at> debbugs.gnu.org; Mon, 28 Aug 2023 10:07:10 +0200
Received: from [2a02:8108:8900:741:49e7:a8af:dc4c:d991] (port=42046)
 by relay.dn-systems.net with esmtpsa  (TLS1.3) tls TLS_AES_128_GCM_SHA256
 (Exim 4.96) (envelope-from <cs@HIDDEN>) id 1qaX0B-0004kO-1T;
 Mon, 28 Aug 2023 09:55:09 +0200
Message-ID: <d5ee2ac6-d7bf-604f-c7d0-487f34ec3038@HIDDEN>
Date: Mon, 28 Aug 2023 09:56:06 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.14.0
Subject: Re: bug#63511: [Patch] Fix for hidden window bug
Content-Language: de-DE, en-US
To: Po Lu <luangruo@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
References: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
 <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
 <87il9570z1.fsf@HIDDEN>
From: Christian Schmidt <cs@HIDDEN>
In-Reply-To: <87il9570z1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Scan-Signature: 93388f730778b686031f6afe6c727b5d
X-Spam-Score: -1.0 (-)
X-Debbugs-Envelope-To: 63511
Cc: 63511 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.0 (--)

On 8/24/23 02:12, Po Lu wrote:
> Stefan Kangas <stefankangas@HIDDEN> writes:
> 
>> Christian Schmidt <cs@HIDDEN> writes:
>>
>>> At least on enlightenment, when switching virtual desktop away from the
>>> on containing emacs and back, emacs does not render screen updates.
>>> This patch fixes the cause.
>>> Analysis for the bug tracker, copied from commit message:
>>>
>>> If no state flags are set in the _NET_WM_STATE property,
>>> the returned X property type will be "0". This situation
>>> occurs when "_NET_WM_STATE_HIDDEN" was the only property
>>> set for the emacs window, e.g. in enlightenment due to
>>> change of a virtual desktop.
> 
> Does Enlightenment _remove_ the property, or merely set its type to
> something other than ATOM?

prop->type == (Atom) 0 IMHO refers to an empty list, which is valid.

>> Po, could you take a look at this patch please.
> 
> That's a bug in Enlightenment, as the type of _NET_WM_STATE should
> always be set to an array of atoms irrespective of its contents.

I would be surprised if this was a bug in E, given emacs is the only 
program I know of that exhibits this issue. I have discussed this issue 
extensively with raster, the main author of E, and we have come to the 
same conclusion: when _NET_WM_STATE_HIDDEN  the is the only active/set 
property, and then is removed/unset (sorry if my terminology is wrong, 
my days of X programming have been 20+ years ago, and these are corners 
I have never touched before), there is no code path in emacs that can 
handle this case. Also, the request does not hit the window manager, but 
it is X that replies. As such, the bug would lie within X11.

What happens is that the array of atoms is empty, and thus the list is 
(Atom) 0. Currently this is interpreted as "keep the current state", and 
not to re-evaluate the (now empty) list of atoms to realize that 
_NET_WM_STATE_HIDDEN is not set.

The scenario in which this occurs is a switch of a virtual desktop in E. 
E will only hide affected windows, not iconify them, which seems 
correct. E uses compositing and updates even windows on other virtual 
desktops in the pager when (and if) they redraw while hidden.

> If the window manager outright removes the property, clients have no
> means to ascertain if the window manager has relinquished control over
> the window, or it is still iconified by some other means (such as the
> traditional WM_STATE).

If that would be an issue, given there is no "unhidden" property that 
could be set, how should the WM handle this? E sets _NET_WM_STATE_HIDDEN 
when the window is hidden, and removes it when no longer hidden.

> I would prefer a check against that other property when that is the
> case, rather than overriding the results of the loop below.

In summary: Two scenarios currently can cause SET_FRAME_ICONIFIED (f, 
true): _NET_WM_STATE_HIDDEN and wm_state in Iconic_State. A removal of a 
final property _NET_WM_STATE_HIDDEN does not trigger SET_FRAME_ICONIFIED 
(f, false), because of what appears to me like a misinterpretation of an 
empty Atom list.

However, as long as any other property, e.g. sticky, would be set, 
removing _NET_WM_STATE_HIDDEN would behave like the patched version.

I would agree that the check could be reasonable, though I can't really 
imagine a situation in which iconified+hidden is set, yet only hidden 
would be removed. In fact, the implementation notes give iconified as 
the typical use case of hidden, so these would go hand in hand.

This patch only adds correct handling of an empty _NET_WM_STATE Atom 
list, and does not otherwise alter behavior as described above. The 
unconditional initialization of actual_size seems ok to me as the 
alternative would be to have it set twice, once in the else tree, and 
secondly in another new else tree. I'd say both from code size and 
runtime performance this should be the better option.

Best regards,
Christian




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.

Message received at 63511 <at> debbugs.gnu.org:


Received: (at 63511) by debbugs.gnu.org; 24 Aug 2023 00:12:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 20:12:27 2023
Received: from localhost ([127.0.0.1]:35640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYxxa-0003ll-NH
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 20:12:27 -0400
Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:46316)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <luangruo@HIDDEN>) id 1qYxxY-0003lV-Dd
 for 63511 <at> debbugs.gnu.org; Wed, 23 Aug 2023 20:12:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1692835934; bh=cAWIQ8lMQPZ+aiXHJOCMusbqWxDRNVy4SyTCFx0yVAg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To;
 b=bYooj8mYEsTDyZ4geJTsICeHUfcNIBGptfY8VJ4PBBSPO0OKtROHvUOGreAAVO03k/Fvux48RYuIABoM0P3V8PRrCE0AdD8gzHaQf4hvkhuiAAmIXZvvTtECIfqZe8OJoZ0cl6lq8tC+JgD5Pu6hR+6PFueK3aWqjdsBd8kyUswU6uzzgyw/LrNs0zB/kYrEmxKPDt47qwgFJgbuKTQfdkSNNYUlFwFjwX9iKh+dFJ9176YjbGtditag7giqu4/u5/q2UhMj3sXMPLauaSlkVbhIjN2IyoQ9ZYKzRFWWHkAUcqrbQILPIvSeBaCvBc1bONABZczST8lws6TjkYAZww==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1692835934; bh=SCU2HRutmpx0yvShx4i/xLTtMNb2s40BESLPtnn7bAu=;
 h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
 b=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zL1ts7mMr23tSeIQn_n65DaOGkwtMnaG5GIennZJLLADf_EQA6VE
 38VRw5AIPdWTBE70O0V7Pv0KleRF4UWxg6rHNNtffLmyo8E.vDnvrmj54t63DxIE0fXXKu37MwOE
 Ofc5hsN5MMLZcCtATr3GYacLx9Wuig_g1RtRf5ZmqgJLLzjYfPXxQ4WgFeDPjr.vz0.V6m3vZQ7u
 kJkCS_8OfR5DbUxELg0sdig_F1CX62xCDkScMgeZb2s2_bmKTxZ1ajK6HSH.5BE7ucn7aDzTvHE8
 Kcb0pXyfF4_s61PCzt2xVwTzsdmX5NnOsw1x44kcu23kmCGAyVj6I8LyGpP44OmWVyJnrc9.jU0Y
 h.1AfATRInl7oKVAccD_E0mMV.g_gc_Fqkp9xAyQh6kxezEawlZOS1b0sMSP66I5gWhonk7nJvmc
 X5TK0nycs1AdO5wTjri_x6V5SK5D8ixWQN0e_48I20YjxSnzfVTZ5oLooX1CBRQgavyF.ZM1PdGl
 TjdgZCfZMDHQvPEvCQdWWZAmUrkmIq5w7cmD3fLgJe.2HqLMPVY7Y1jlEWtNJh_I-
X-Sonic-MF: <luangruo@HIDDEN>
X-Sonic-ID: 0080d73e-e345-4351-8d08-70e085d78e80
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 24 Aug 2023 00:12:14 +0000
Received: by hermes--production-sg3-69654d8bd-752gm (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 6f1268fa69232363d99b2b84863ec12b; 
 Thu, 24 Aug 2023 00:12:07 +0000 (UTC)
From: Po Lu <luangruo@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#63511: [Patch] Fix for hidden window bug
In-Reply-To: <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
 (Stefan Kangas's message of "Thu, 24 Aug 2023 01:24:11 +0200")
References: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
 <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
Date: Thu, 24 Aug 2023 08:12:02 +0800
Message-ID: <87il9570z1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Mailer: WebService/1.1.21732
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo
Content-Length: 1247
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63511
Cc: Christian Schmidt <cs@HIDDEN>, 63511 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefankangas@HIDDEN> writes:

> Christian Schmidt <cs@HIDDEN> writes:
>
>> At least on enlightenment, when switching virtual desktop away from the
>> on containing emacs and back, emacs does not render screen updates.
>> This patch fixes the cause.
>> Analysis for the bug tracker, copied from commit message:
>>
>> If no state flags are set in the _NET_WM_STATE property,
>> the returned X property type will be "0". This situation
>> occurs when "_NET_WM_STATE_HIDDEN" was the only property
>> set for the emacs window, e.g. in enlightenment due to
>> change of a virtual desktop.

Does Enlightenment _remove_ the property, or merely set its type to
something other than ATOM?

> Po, could you take a look at this patch please.

That's a bug in Enlightenment, as the type of _NET_WM_STATE should
always be set to an array of atoms irrespective of its contents.

If the window manager outright removes the property, clients have no
means to ascertain if the window manager has relinquished control over
the window, or it is still iconified by some other means (such as the
traditional WM_STATE).

I would prefer a check against that other property when that is the
case, rather than overriding the results of the loop below.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.

Message received at 63511 <at> debbugs.gnu.org:


Received: (at 63511) by debbugs.gnu.org; 23 Aug 2023 23:24:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 19:24:34 2023
Received: from localhost ([127.0.0.1]:35555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYxDG-0008E1-1Q
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 19:24:34 -0400
Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:57454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qYxDD-0008Dm-I4
 for 63511 <at> debbugs.gnu.org; Wed, 23 Aug 2023 19:24:32 -0400
Received: by mail-ed1-x531.google.com with SMTP id
 4fb4d7f45d1cf-52a1ce52ef4so2874805a12.2
 for <63511 <at> debbugs.gnu.org>; Wed, 23 Aug 2023 16:24:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692833062; x=1693437862;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=3Wq4re1cn6auQ0vRExVwB8cl8MYOFsStWdhRHxp1SYs=;
 b=NKMsgJZeRrCgXI+H+reb+t+q0Q4t3RTboJDxoFTtUh3VSHnyIsB7dUaH39oSHQsmED
 rCNbuF+Azx/1xNgZj0bhfzCDpbH6EhvI8ij74KibQOZUcI1vr3zcU1s/s0Fpa5iZsvIU
 bjt1WDSu4rRcKAZq2qzGYbvZEYg0CbQA1WRx4hUg3mzyH8glgJ/vyDgJGTjnFSpUEs5i
 7vTWemzM8mvFHEf38DIc7HcnmZDc0GYKJhE28CZ7NWV3annwtk110JjqoOMm1R0HC8F+
 TWf4Yfn36N7AAmyLl6v8vEC3z0+o1Ulk12teYLw3t+AmPG3X1nr1mlrtVEwZnRgiDU0H
 1jOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692833062; x=1693437862;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=3Wq4re1cn6auQ0vRExVwB8cl8MYOFsStWdhRHxp1SYs=;
 b=YmIRW0O8tJcDWaDZ5tZRgVyQmdT5VLr1Kc4FlCWhOW2+joLcedKLafII8/9kjvAe2E
 QAwHbfbyewsYBiC95nLKGmNyYU4CgYrXW1ZUM23gV8k9PRiFg5BAYnhuJPKSj1cQkv34
 mFr4ercgIz6Ra2jzWanz4DSh8/XKAMy81jaFtJADZR3WGiyHZJ/sH9FaZyvGLL6iZwSx
 qyhNM1FneHh2voOq+rppy53OHZQEhnifoPn5XpX/oqjni5G8viBJXbMdl0AHwaUk5CM2
 J3/byFKUFHzpLF/EZQmMQ+00CTKvdMJ2Xau2I0W0hV2f7/0ZAmcZY3TUhL7NkYhElyVb
 BNSA==
X-Gm-Message-State: AOJu0YwohjG982MNWUKBc47JlsIHWNvKePrUtHzieLyW7UfSPo/FMvJp
 TLKwz276amSAQ5EiQG7j96ZWcp3vIyI88CJeP1IGdoYy1WA=
X-Google-Smtp-Source: AGHT+IEPGKmrIUbbnBlgVTey84wuWUGhu5bDTryvga8jr1VQRcRvIRQBoF3QWy+mSfNMbqjIL0TddgHBxOxNY+HwRKE=
X-Received: by 2002:a05:6402:b1b:b0:525:6d6e:ed4a with SMTP id
 bm27-20020a0564020b1b00b005256d6eed4amr11080365edb.23.1692833062019; Wed, 23
 Aug 2023 16:24:22 -0700 (PDT)
MIME-Version: 1.0
References: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
In-Reply-To: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
From: Stefan Kangas <stefankangas@HIDDEN>
Date: Thu, 24 Aug 2023 01:24:11 +0200
Message-ID: <CADwFkmk70H-Mf1mx28CE0tRzAKxEDrOVqfGS-i+JHSs8xbxTgw@HIDDEN>
Subject: Re: bug#63511: [Patch] Fix for hidden window bug
To: Christian Schmidt <cs@HIDDEN>, Po Lu <luangruo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63511
Cc: 63511 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Christian Schmidt <cs@HIDDEN> writes:

> At least on enlightenment, when switching virtual desktop away from the
> on containing emacs and back, emacs does not render screen updates.
> This patch fixes the cause.
> Analysis for the bug tracker, copied from commit message:
>
> If no state flags are set in the _NET_WM_STATE property,
> the returned X property type will be "0". This situation
> occurs when "_NET_WM_STATE_HIDDEN" was the only property
> set for the emacs window, e.g. in enlightenment due to
> change of a virtual desktop.
> In the current code this causes copying of the iconified
> state in x_get_current_wm_state(), which causes emacs to
> stay hidden. For DMs such as Enlightenent or Gnome Shell
> that use only the hidden but not the iconified state
> this clashes with the intention of handling the
> _NET_WM_STATE property notification in
> handle_one_xevent(), which requires not_hidden &&
> FRAME_ICONIFIED_P (f) to actually activate the frame.

Po, could you take a look at this patch please.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 May 2023 05:32:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 15 01:32:45 2023
Received: from localhost ([127.0.0.1]:42466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pyQpB-000815-2Q
	for submit <at> debbugs.gnu.org; Mon, 15 May 2023 01:32:45 -0400
Received: from lists.gnu.org ([209.51.188.17]:38652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cs@HIDDEN>) id 1pyH9t-0004RF-Ug
 for submit <at> debbugs.gnu.org; Sun, 14 May 2023 15:13:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cs@HIDDEN>) id 1pyH9t-0005JE-Mp
 for bug-gnu-emacs@HIDDEN; Sun, 14 May 2023 15:13:29 -0400
Received: from amalthea.dnx.de ([2001:67c:274c:42::25]
 helo=mail.dn-systems.net)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cs@HIDDEN>) id 1pyH9r-0004v7-I9
 for bug-gnu-emacs@HIDDEN; Sun, 14 May 2023 15:13:29 -0400
Received: from relay.dn-systems.net ([2001:67c:274c:42::150]:45106)
 by mail.dn-systems.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
 (Exim 4.94.2) (envelope-from <cs@HIDDEN>) id 1pyH7v-00012p-Js
 for bug-gnu-emacs@HIDDEN; Sun, 14 May 2023 21:11:27 +0200
Received: from [2a02:8108:8e80:71c1:6ace:c21a:75ab:1fdd] (port=39456)
 by relay.dn-systems.net with esmtpsa  (TLS1.3) tls TLS_AES_128_GCM_SHA256
 (Exim 4.94.2) (envelope-from <cs@HIDDEN>) id 1pyH03-0001Ov-VL
 for bug-gnu-emacs@HIDDEN; Sun, 14 May 2023 21:03:20 +0200
Content-Type: multipart/mixed; boundary="------------R9iW07QYEIRXz0qxLvB8MOJn"
Message-ID: <a3ab45c9-fd57-3602-52c3-68fbaf5ea2f7@HIDDEN>
Date: Sun, 14 May 2023 21:13:33 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.10.1
From: Christian Schmidt <cs@HIDDEN>
Subject: [Patch] Fix for hidden window bug
To: bug-gnu-emacs@HIDDEN
Content-Language: de-DE
X-Scan-Signature: 90ed0c026e5394b79fcfac10e5c1c33a
Received-SPF: pass client-ip=2001:67c:274c:42::25; envelope-from=cs@HIDDEN;
 helo=mail.dn-systems.net
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 15 May 2023 01:32:43 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

This is a multi-part message in MIME format.
--------------R9iW07QYEIRXz0qxLvB8MOJn
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Severity: normal
Tags: Patch

At least on enlightenment, when switching virtual desktop away from the 
on containing emacs and back, emacs does not render screen updates.
This patch fixes the cause.
Analysis for the bug tracker, copied from commit message:

If no state flags are set in the _NET_WM_STATE property,
the returned X property type will be "0". This situation
occurs when "_NET_WM_STATE_HIDDEN" was the only property
set for the emacs window, e.g. in enlightenment due to
change of a virtual desktop.
In the current code this causes copying of the iconified
state in x_get_current_wm_state(), which causes emacs to
stay hidden. For DMs such as Enlightenent or Gnome Shell
that use only the hidden but not the iconified state
this clashes with the intention of handling the
_NET_WM_STATE property notification in
handle_one_xevent(), which requires not_hidden &&
FRAME_ICONIFIED_P (f) to actually activate the frame.

-- 
AIBIoT GmbH        | CEO: Lukas Grunwald
Hornemannstraße 12 | HRB 206588
31137 Hildesheim   | Amtsgericht Hildesheim
Germany
--------------R9iW07QYEIRXz0qxLvB8MOJn
Content-Type: text/x-patch; charset=UTF-8; name="fix_hidden_window_bug.patch"
Content-Disposition: attachment; filename="fix_hidden_window_bug.patch"
Content-Transfer-Encoding: base64

Y29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gICAgfQotICBlbHNlCisg
IGVsc2UgaWYgKCFwcm9wIHx8IHByb3AtPnR5cGUgIT0gKEF0b20pIDApCiAgICAgewotICAg
ICAgYWN0dWFsX3NpemUgPSAwOwogICAgICAgaXNfaGlkZGVuID0gRlJBTUVfSUNPTklGSUVE
X1AgKGYpOwogICAgIH0KICNlbHNlCg==

--------------R9iW07QYEIRXz0qxLvB8MOJn--




Acknowledgement sent to Christian Schmidt <cs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#63511; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 13 Feb 2025 08:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.