From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jashank Jeremy Newsgroups: gmane.emacs.devel Subject: Re: master e465ea816d: Don't unnecessarily call monitor change functions Date: Sun, 22 May 2022 16:42:57 +1000 Message-ID: <87wneef4pa.wl-jashank@rulingia.com.au> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_May_22_16:42:56_2022-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12673"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) To: Po Lu , Emacs development list Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 22 08:56:12 2022 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 1nsfVa-00034d-H0 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 08:56:11 +0200 Original-Received: from localhost ([::1]:34366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsfVZ-0001lO-2m for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 02:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsfJD-0007Cf-PG for emacs-devel@gnu.org; Sun, 22 May 2022 02:43:24 -0400 Original-Received: from emeralfel.rulingia.com.au ([52.64.96.81]:44052 helo=fort.rulingia.com.au) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsfJ7-0005Kt-8L for emacs-devel@gnu.org; Sun, 22 May 2022 02:43:20 -0400 Original-Received: from alyzon.rulingia.com.au (60-242-28-107.static.tpgi.com.au [60.242.28.107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by fort.rulingia.com.au (Postfix) with ESMTPSA id AAC182110FF; Sun, 22 May 2022 16:43:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rulingia.com.au; s=mail; t=1653201781; bh=4hYJv9iQLmncs0L7L25gwvvyzqEGTxFi3lQ7oRfdbyk=; h=Date:From:To:Subject; b=pxRGdJFA3Pj6QrYj+1IHTSp1gwX9c/rrgxWA+saC7WZCQZkuw1PS/ar2eLgeoaQKF wZMiaqPRu0sWrh59KpEipBp6MJok2fO4ybi/q/6izeWCgFbBxC5N7P1215wSL2MzcS oavRewaDr+q5AYMAeLTWUEorDZpV0xCjeIt+Xwfs= Original-Received: from lisbon.rulingia.com.au (lisbon.rulingia.com.au [192.168.5.76]) by alyzon.rulingia.com.au (Postfix) with ESMTPA id 519133104FC; Sun, 22 May 2022 16:43:01 +1000 (AEST) Received-SPF: pass client-ip=52.64.96.81; envelope-from=jashank@rulingia.com.au; helo=fort.rulingia.com.au X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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-Mailman-Approved-At: Sun, 22 May 2022 02:53:43 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:290073 Archived-At: --pgp-sign-Multipart_Sun_May_22_16:42:56_2022-1 Content-Type: multipart/mixed; boundary="Multipart_Sun_May_22_16:42:56_2022-1" --Multipart_Sun_May_22_16:42:56_2022-1 Content-Type: text/plain; charset=US-ASCII > diff --git a/src/xterm.c b/src/xterm.c > index add0c848db9..05ede2e5803 100644 > --- a/src/xterm.c > +++ b/src/xterm.c > @@ -20144,6 +20145,18 @@ handle_one_xevent (struct x_display_info *dpyinfo, > inev.ie.kind = MONITORS_CHANGED_EVENT; > inev.ie.timestamp = timestamp; > XSETTERMINAL (inev.ie.arg, dpyinfo->terminal); > + > + /* Also don't do anything if the monitor configuration > + didn't really change. */ > + > + current_monitors > + = Fx_display_monitor_attributes_list (inev.ie.arg); > + > + if (Fequal (current_monitors, > + dpyinfo->last_monitor_attributes_list)) > + inev.ie.kind = NO_EVENT; > + > + dpyinfo->last_monitor_attributes_list = current_monitors; > } > #endif > OTHER: On my machine, this introduces a build failure: .../emacs/src/src/xterm.c:20162:4: error: statement requires expression of scalar type ('Lisp_Object' (aka 'struct Lisp_Object') invalid) if (Fequal (current_monitors, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ This seems fixable by making this an explicit nil check: if (!NILP (Fequal (current_monitors, dpyinfo->last_monitor_attributes_list))) A patch to that effect is attached. ~jashank --Multipart_Sun_May_22_16:42:56_2022-1 Content-Type: text/plain; type=patch; name="20220522-xterm-xrandr-fix.patch"; charset=US-ASCII Content-Disposition: attachment; filename="20220522-xterm-xrandr-fix.patch" Content-Transfer-Encoding: quoted-printable =46rom 77bf0e8434b7c6f8503b9fcb98b9f4e0d730ede2 Mon Sep 17 00:00:00 2001 From: Jashank Jeremy Date: Sun, 22 May 2022 16:37:11 +1000 Subject: [PATCH] ; * src/xterm.c (handle_one_xevent): Fix compile error. (Fixes e465ea816d6a64a21822549982928c48961fec99.) --- src/xterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 0487259bf0..c6c0a2f915 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -20159,8 +20159,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, current_monitors =3D Fx_display_monitor_attributes_list (inev.ie.arg); =20 - if (Fequal (current_monitors, - dpyinfo->last_monitor_attributes_list)) + if (!NILP (Fequal (current_monitors, + dpyinfo->last_monitor_attributes_list))) inev.ie.kind =3D NO_EVENT; =20 dpyinfo->last_monitor_attributes_list =3D current_monitors; --=20 2.36.1 --Multipart_Sun_May_22_16:42:56_2022-1-- --pgp-sign-Multipart_Sun_May_22_16:42:56_2022-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit Content-Description: OpenPGP Digital Signature -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERaoh5i4JiQ9obEzcWzDW4sQdSv0FAmKJ23AACgkQWzDW4sQd Sv1k9RAApBl8pNHLUxDfPZJsak4r0hX3enSMyEY4yQpZVRFwZuX8ZcGvAWF85Hof OxQt2itqpyHdhZbn9RnxjoirL7MMTFd3/GGvowG4TEC6KXAem1NsojviUwd1VIR1 LElAP5SF/4x+CYqclCX7mYuj0YUpF7X66YTg+LGKvtttBVIQbMiMjQ3EHo1353El +TZSZI/cPuVVGFWfdCEoxtreXo05JwA+4xnzDLsDCsOvzK+ruVL4fOjZL4EXA7ak 0Hf8mFQrGRLxmognfLsonWoj65wvGQsmMJ+2MPhUnSG5Zw4hmd7NLBxrA4e4JbUa WgVF4po5GUmFlgbSgLxi64s5nOfaxG1OeUJYJl+fB3Ncr/GxjR+gjWpz3PfS2wJD AsoAe+Ud98iIFCHo1+CG6mxR0VxLomHQEF8bMXYtjGN66YTiai39AnbFm3i72qMx 8k1QEU/hdvNScovH6MEB8rSGg7Zf5YJVnSZq1C854hhf639adXTAWQDDoMh7WAsL nJklfdHwoYwQY6MAg5geKGQObWKVWNq+NwjOgzLhRUiZO1n2cVKyUSpDyOPniaeY 6WuwrZxOQs85YASkSLa8zWeL82sJrfZmUCeddInOxtUgiZ4oR8KWxrMeTBTea23V IUUk//TRueT+TDYvcCyPAx13pF3XeoDRGehAqwZA3+mGUwN65k0= =u5g5 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_May_22_16:42:56_2022-1--