From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Slade Subject: Re: Guix Emacs: use XRandr rather than Gdk? Date: Sun, 17 Feb 2019 21:54:21 -0700 Message-ID: <878sydwvb6.fsf@jnanam.net> References: <87va1rxalq.fsf@jnanam.net> <87ftstjbni.fsf@elephly.net> <87h8d79ict.fsf@jnanam.net> <87a7iye8up.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvawr-0001pc-Eh for guix-devel@gnu.org; Sun, 17 Feb 2019 23:54:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvawq-00055A-G4 for guix-devel@gnu.org; Sun, 17 Feb 2019 23:54:33 -0500 Received: from mail-it1-x136.google.com ([2607:f8b0:4864:20::136]:51687) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvawq-000547-BE for guix-devel@gnu.org; Sun, 17 Feb 2019 23:54:32 -0500 Received: by mail-it1-x136.google.com with SMTP id y184so38329535itc.1 for ; Sun, 17 Feb 2019 20:54:31 -0800 (PST) In-reply-to: <87a7iye8up.fsf@ambrevar.xyz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt , Ricardo Wurmus , Guix-devel So it turns out that, indeed, adding `("libxrandr" ,libxrandr)` to `inputs` is necessary but not sufficient to get Guix's Emacs to use XRandr rather than Gdk. Currently in Guix, there is the `emacs-no-x-toolkit` which actually is a GUI version of Emacs, but not using any toolkit (so the menus etc are a bit funky looking) - as it stands now this builds without either Gdk or XRandr and so uses some sort of fallback for screen information. If I add `("libxrandr" ,libxrandr)` to `inputs` (as per above) of the base `emacs` build, then I can get this to use XRandr. And I successfully created builds of Emacs using the Athena/Lucid toolkit and the Lesstif* toolkit which also will use XRandr properly. But Ricardo is right that something about the way that Guix is currently building the GTK3 toolkit version of Emacs that results in it using Gdk rather than XRandr. Ricardo mentioned: > This is done by x-display-monitor-attributes-list, which is defined in > src/xfns.c. It uses Gdk when Emacs is configured to USE_GTK (the code > that sets the source to =E2=80=9CGdk=E2=80=9D is in an #ifdef). I'm not sure where the relevant #ifdef is or how to manipulate it. I will work on creating a patch for the other toolkits, and to put the libxrandr package in as an input, but it would be nice to get the default GTK3 build to use XRandr as well. Again, I'm not quite sure about how the Guix build is different:-- on Arch and Void, the default GTK3 build uses XRandr, so I'm not sure what needs changing in the current basic package build to get Guix to use XRandr rather than Gdk. And it would be nice to include that in a patch too (even if the Athena/Lucid build might be better in some ways). -Ben * For the sake of completeness, it would be nice to get it to build with the Openmotif toolkit too, but that will need packaging itself for Guix first. -- Benjamin Slade - https://babbagefiles.xyz `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19)) '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org ) `(Choose Linux ,(Choose Freedom) . https://linux.com )