all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Benjamin Slade <beoram@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>,
	Ricardo Wurmus <rekado@elephly.net>,
	Guix-devel <guix-devel@gnu.org>
Subject: Re: Guix Emacs: use XRandr rather than Gdk?
Date: Sun, 17 Feb 2019 21:54:21 -0700	[thread overview]
Message-ID: <878sydwvb6.fsf@jnanam.net> (raw)
In-Reply-To: <87a7iye8up.fsf@ambrevar.xyz>

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	other threads:[~2019-02-18  4:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11  3:33 Guix Emacs: use XRandr rather than Gdk? Benjamin Slade
2019-02-12 14:20 ` Ludovic Courtès
2019-02-12 14:59 ` Ricardo Wurmus
2019-02-12 15:22   ` Pierre Neidhardt
2019-02-12 16:19     ` Benjamin Slade
2019-02-14  3:09   ` Benjamin Slade
2019-02-14 14:35     ` Pierre Neidhardt
2019-02-18  4:54       ` Benjamin Slade [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sydwvb6.fsf@jnanam.net \
    --to=beoram@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.