guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guix Emacs: use XRandr rather than Gdk?


From: Benjamin Slade
Subject: Re: Guix Emacs: use XRandr rather than Gdk?
Date: Sun, 17 Feb 2019 21:54:21 -0700
User-agent: mu4e 1.0; emacs 26.1

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 “Gdk” 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 )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]