From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Using a display_info union instead of a typedef Display_Info Date: Fri, 12 Apr 2019 20:55:54 +0300 Message-ID: <83v9zjkt05.fsf@gnu.org> References: <87mukvw4la.fsf@gmail.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175369"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alex Gramiak Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 12 19:56:46 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hF0Pu-000jT1-OM for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 19:56:46 +0200 Original-Received: from localhost ([127.0.0.1]:40772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF0Pt-0006Ra-OZ for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2019 13:56:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF0PN-0006QW-1Q for emacs-devel@gnu.org; Fri, 12 Apr 2019 13:56:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hF0PL-0000fq-Ha; Fri, 12 Apr 2019 13:56:12 -0400 Original-Received: from [176.228.60.248] (port=2330 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hF0PK-0007Oz-HW; Fri, 12 Apr 2019 13:56:11 -0400 In-reply-to: <87mukvw4la.fsf@gmail.com> (message from Alex Gramiak on Fri, 12 Apr 2019 10:50:09 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235359 Archived-At: > From: Alex Gramiak > Cc: Eli Zaretskii , Stefan Monnier > Date: Fri, 12 Apr 2019 10:50:09 -0600 > > The jist of the attached patch is that generalizes x_get_string_resource > into a terminal hook, and in the process changes several procedures to > use union display_info instead of the typedef Display_Info, which is > display system-dependent. One uses DISPLAY_INFO (dpyinfo) to access the > common structure of the union, and there are macros > U_DISPLAY_INFO_ to convert from a specific display_info to the > union. There is also a procedure gui_frame_display_info, that grabs a > window system display_info from a frame. > > I've also included a new procedure decode_display_info, which takes the > role of the display system-dependent check_x_display_info. I've left out > the removal of the check_x_display_info since I'm not sure if this patch > will be accepted. I've also left out NS support until a later stage. > > WDYT? Looks to me like replacing one set of window-system specific code with another: still the same #ifdef's and the same window-system specific code fragments. Maybe I'm missing something, but it doesn't look to me like a change for the better.