From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix rendering issues on window managers without _NET_WM_STATE Date: Sat, 15 May 2021 09:57:44 +0200 Message-ID: <015406d8-35d0-b76a-bee9-f2cc0c3d286c@gmx.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2297"; mail-complaints-to="usenet@ciao.gmane.io" To: Tom Gillespie , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 15 09:59:11 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhpCY-0000TU-R0 for ged-emacs-devel@m.gmane-mx.org; Sat, 15 May 2021 09:59:10 +0200 Original-Received: from localhost ([::1]:39180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhpCX-0007YY-Qn for ged-emacs-devel@m.gmane-mx.org; Sat, 15 May 2021 03:59:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhpBG-0005zo-0Z for emacs-devel@gnu.org; Sat, 15 May 2021 03:57:50 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:49289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhpBD-0002n6-G2 for emacs-devel@gnu.org; Sat, 15 May 2021 03:57:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621065465; bh=uk8AWBfvnCH3xbTMEN0dsxiZ9zzb3ig4UK90uo26zvQ=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=do+hW8I2gJTA9Iey+NqxXTOiR4wrnMwYAFnootZuonscRa5y7Gf1G/tUPnf+8ShFn 92aLkJnHBAehgSZiGDzkjrBm9XXpHukNtweM0JWh65RHpqnx+JFKBE7/vypc11h+/2 6dwSMzvgpaDnhPDkHAGXYHXU7o5Abushdk8RZLR0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([46.125.249.41]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M7b2T-1lZoxQ154P-0080s2; Sat, 15 May 2021 09:57:45 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:YZPd1Wa+cVBpUKNIcl5vcTxzrXK3MF5QB/oUGNaxjqR3J9dUe/o cTu25Oe+M/RtO9wdGUH1kNveSomZRTY9i9413yvAGG8WT5qWiVJlApFQ150yp3r/eOAfFgs tNO0GZoxC37m+EkqvzvSi91NBjxRZT24ps0CeeI6Dm4ArySNlAqADZXWp0zsG1mmazxCGfm dpC90p5FtnON6d9XoALMg== X-UI-Out-Filterresults: notjunk:1;V03:K0:dpJ7072qkuk=:+R8VYDJ542H+8iB24Vmy8V QW7ClY8uYpEjE+HX0JZFrDVFuOKJ2BsJ7S50vPGANicF2csKbyKIJYuzu6yLb682RO7S7legP rSgPoMQKvWhDAScP63fyfC9HszKge4uI9YrTlxJGsFn6JFO9xmFpvNVHxCfA//EF1rk5gvkcm x+9vK0c28N9qjGHGDcHtzQVPajGX9FetVX2aNLC6JzlMYFV2elHwsqfB7f2TIp/TXWXLQgneo WkulSXqL8nZWoB4A3hMsi9ZE8KsUNvIex3vIt2gUKNJI2KkkcvC657grZd79CacOAJpAl8wVI oexnr/Xcn1JBBvnF4hTtaU6FZcTh7r68MKelIunOJ97Y+MaKtlzwh/Jdzft+7SAp8yL7RYjEI n7Lo91Ejq2ubuuYauRWXgqbnr/X2qXba2oxbIjnJRosKVTnowpEXoFjQxKKydijuD+2yj0UEL JHJXkDLc8z+CVdlh34+3jA2fFltVpbDA8DPDqnMj+VBPXZ6itfZWlknmBrXepAKVv2Nway7C2 u1YGHZ/QjbKULjN2l8zVbfFtlJob1QBGKgCCyNNKIPYhf8Jwxff/SZz+Utgi1jSkmr8qLLpn8 NbxqGXcukgM3GnDTHXwk1FBAkJFUnWErL3NPq7OURTaZklzMvYCp6KfmCkT/iafl69LEeXt7m GwJzZTPEUSwVc89kLFqX6+8QryKSH5FJmL/fCPv3FkJOyt6kq9sXqGutFiQPdO9lGQF8ZX0pf b79lCvu/NvdL1ZeEC9QU/U02zZPpbIGVpjuxUSI6TZ5c1gTF2sDxTYinS6XJmimCoELBZKHT Received-SPF: pass client-ip=212.227.17.20; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269301 Archived-At: > This patch fixes a bug that occurs when running Emacs in a window > manager that does not set _NET_WM_STATE. The patch is simplest fix > that restores expected behavior for window managers that do not set > _NET_WM_STATE, but I have no idea whether there are other issues that > may be occurring. > > I'm guessing that there are also likely issues with other logic in the > MapNotify case that uses not_hidden for window managers that does not > set _NET_WM_STATE. > > Thus, the more complex solution, which I am not knowledgeable enough > to implement correctly, is to fix x_get_current_wm_state so that it > works on window managers that do not set _NET_WM_STATE. > > I am unfamiliar with this section of the code, so my explanation may > be off and a sanity check would be appreciated. Best, Thanks. This explains why our MapNotify code was not able to handle visibility correctly with some WMs. Actually, this also means that we should get rid of x_get_current_wm_state because it apparently fails in too many cases. Unfortunately, reverting parts of 483c5e953c1 as in your patch will only reintroduce the bug 483c5e953c1 was trying to fix. I meanwhile checked in a different solution based on handling VisibilityNotify. Please try with latest master and tell us whether the problem still exists. Thank you, martin