From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Sv: Sv: Support for background transparency Date: Thu, 20 Jan 2022 08:52:51 +0800 Message-ID: <87wniv2pp8.fsf@yahoo.com> References: <87wnlnptf2.fsf@gnus.org> <83h7bwybeg.fsf@gnu.org> <87y24t1ed1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20802"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Lars Ingebrigtsen , "emacs-devel@gnu.org" To: =?utf-8?Q?H=C3=A5kon?= Flatval Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 20 01:57:19 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 1nALlP-0005FO-An for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jan 2022 01:57:19 +0100 Original-Received: from localhost ([::1]:56496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nALlN-0007Lq-N7 for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jan 2022 19:57:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nALhJ-00061g-C6 for emacs-devel@gnu.org; Wed, 19 Jan 2022 19:53:05 -0500 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:39234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nALhG-0007Bi-MS for emacs-devel@gnu.org; Wed, 19 Jan 2022 19:53:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642639980; bh=A8zH5MEsoyhlhx5Y+BhcJqUB//Z6DKLbZBZVJ3D6Imw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=hhQo49qC5LZ/evKmdsO1qqKxIA67KSSq6eUjAoiCCS8ZDJ7a7yJQIJ9B5TJ8r8j3tyh0JVu3vfg56uRAz1BZGpqegCUCAD9Sitx7uNwGp/kNk7QiiGb/kwqCEC79oOpz4wghbcPyhGqzbA1goi02CfeoxS0q9WhL2rghoo2yha0frik7SOHs3VcuRypjUdTUr8lXuMj6ZHR2W0kJADn8/KvKGOjxUd7RkvlyZXU42Yj+hv38H4E5VP53J65EFlp4SDXfe8QUBX+sUm4kBWyvfLtQnDpxx9KFaSoaK8/MSdz6HuIxJBZYoGtGi5TUhKcqYxS3iWB6CEsxuzuS6WmJQg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1642639980; bh=mCUwP/RoP9+qVmYDu4iQ7La4s8LqjwsP/HurC+LYoUh=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=uWsr+iJspNkTAfzwqqk4voTDZxm21TSM91PhThW58icSyi0R4Pr9npnMY5TzMNbBMJGfw1WmM6vztJLtFBIGX47wV1lDZzhKxvnm/D5wsvxB/pq2jOwV2OJfiWafENQRp7AMZ53jEzbhtT38OsJMu/GXEcZkwy2BsHV26udAh/A/mVbgNUUXHcxzRNF0a1l92lCY+t+zeU3eK4Mgvtm9Zz2SctNyKpWD1sEFx/Y5BFNKv1iYau79+Qfud93+DS2ErG81iEkUYEdnQ2nhLdjcpOno+2loQJpQaOlRgZIVGyLpRiAqoN0DAyknrQw2o0ihQaCnd5xCN/kO23jtrzybPw== X-YMail-OSG: UJ5Vnr8VM1kRx8.WJja2IKMozadQWC3oN5SP5YfZSjxwBGvDQxeTH3XtXm8Kx3g LfMVTT89.YoDSVHeKHYbE.jDPi_0F4_g8Wyq2xgw00S2jgcw28j3v_tYrJSHxfWUNUssU8dUyUqM yGG9mMyq57_1h8U81R3Gdg_6i2LjkpLNJ5_PIxBu4jZueQPF.xgdMljGPZqsY.FPbxXnyESv4aqy B4xBgbgCgKsj73NkuMAEMZ0bDrgO29M6MBHu.fS47o3vY9ihozYQNmDwLx4k2_wIKs8gbyffzexH 4eRwxpazZKtjF5Dd.9QLpaRoPhEaL7o7daJrnPeLDKEXuY2P85OJqsgxZjiOCkr02T..NYU9w_7v 8LKnnlY87l5Zb_tEBvq8b6lmpF.EpIA9ZRxn2Z0IFmDQVLcbr7Ht8yRQqS70tYKWfUcec039Gg__ 6t6C3j5qleAyZq6h4WiY63aQi3EXbAIll0ziQkeERKA89jm.vw_ZF2fOP.TRerkmU4_Fq_yP83Uo rLHdewdVJNKVil9P6fQ1NW7PKjU2aUXLvcWtnkslUhp4Z2ByCCS72Ol3gyJsPReBzw6c3T.3B5uL KtT_nmQfjFUJmAz8IkzeKxzs78MR7r3utmWqeo2EalKaPcVCAlrMUm2yaOvqI1CBY3sgHjqJcBUw VldKFDPewPJaSoQ4aPAoOTYQaSjciFF.GZX4w2.y35uf_2EfGzgDR6CWzXhwnwQpXuGcikF9IlXH 5dsoEYrhtxKK.5FI8OUvDKxFwRkfS6vRCtsqp_aNTTpCPYucljSUA4xyAdWiN9T.24Fhen0B4CxW QwFjl6rT2HxC8BP1KeI1zbHGnDa4O527IJhxB20Cun X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Thu, 20 Jan 2022 00:53:00 +0000 Original-Received: by kubenode517.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID af4c07b0d5cf9bbd2b077e0ea228f27f; Thu, 20 Jan 2022 00:52:57 +0000 (UTC) In-Reply-To: (=?utf-8?Q?=22H=C3=A5kon?= Flatval"'s message of "Wed, 19 Jan 2022 17:26:26 +0000") X-Mailer: WebService/1.1.19615 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.33; envelope-from=luangruo@yahoo.com; helo=sonic308-10.consmr.mail.ne1.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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:285008 Archived-At: H=C3=A5kon Flatval writes: > I have attached a final patch. The only changes from the last one is a > small conflict resolution I did while rebasing today. > > Is everything ready to have it merged? And also, how does that happen? > Is the ball in your court, or does it require action on my end? I see some problems: > + /* This prevents GTK from painting the window's background, which > + would interfere with transparent background in some environments */ > + gtk_widget_set_app_paintable (wtop, TRUE); This must be under the conditional `!HAVE_PGTK'. > +#if defined (USE_GTK) && defined (USE_CAIRO) Why only Cairo? I see no reason this can't work on non-Cairo configurations, or Cairo configurations built without GTK. > + gui_set_alpha_background, In this case, please add the frame parameter handler to the rest of the terminal backends, even if it doesn't do anything: - pgtkfns.c - nsfns.c - w32fns.c - haikufns.c > + color.green / 65535.0, color.blue / 65535.0, f-= >alpha_background); > + > + cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_SOURCE); Cairo on XCB becomes _very_ slow if this is done and the visual has no alpha channel, so please make this conditional on both alpha being less than 1.0 and the display's visual actually having an alpha channel. Also, I see a hunk that only touches indentation and whitespace. Please remove the following whitespace-only change: > + > vinfo =3D XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask, > &vinfo_template, &n_visuals); > + > if (n_visuals <=3D 0) > - fatal ("Can't get proper X visual info"); > + fatal ("Can't get proper X visual info"); Aside from that, LGTM. Thanks.