Skip to content
Branch: master
Clone or download
Pull request Compare This branch is 285 commits ahead, 151 commits behind emacs-mirror:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin Merge from origin/emacs-26 Apr 29, 2019
build-aux Update from Gnulib Apr 30, 2019
doc Merge from origin/emacs-26 May 8, 2019
etc
leim Sync latest SKK-JISYO.L Apr 29, 2019
lib-src Port new fingerprinting scheme to clang + LTO May 4, 2019
lib
lisp Merge branch 'master' of https://github.com/emacs-mirror/emacs May 11, 2019
lwlib
m4 Update from Gnulib May 3, 2019
modules Update copyright year to 2019 Jan 1, 2019
msdos Merge from origin/emacs-26 Jan 1, 2019
nextstep
nt
oldXMenu Fix --with-x-toolkit=no build breakage Apr 27, 2019
src
test * test/lisp/net/tramp-tests.el (cl-lib): Require instead of cl-seq. May 9, 2019
.clang-format Add configuration for clang-format. Sep 24, 2017
.dir-locals.el Use lexical-binding in bug-reference.el Apr 9, 2019
.gitattributes
.gitignore Bring back dmpstruct.h Apr 11, 2019
.gitlab-ci.yml
BUGS
CONTRIBUTE
COPYING Merge from Gnulib Oct 2, 2017
ChangeLog.1
ChangeLog.2 Merge from origin/emacs-26 Jan 1, 2019
ChangeLog.3 Merge from origin/emacs-26 Apr 12, 2019
GNUmakefile * GNUmakefile: Update comment. Apr 16, 2019
INSTALL Modernize INSTALL a bit May 3, 2019
INSTALL.REPO
Makefile.in
PKGBUILD PKGBUILD 更新。 Jan 7, 2018
README
README.md README.md に cairo のバージョンについて追記。 May 28, 2018
autogen.sh Merge from origin/emacs-26 Jan 1, 2019
config.bat Fix copyright years by hand Jan 1, 2019
configure.ac
make-dist

README.md

Emacs supporting pure-gtk3

In this fork, I'm working to make Emacs support pure-gtk3, in order to support Wayland.

Maybe It's only for Wayland now.

The work is in progress.

Building

You need cairo.

git clone https://github.com/masm11/emacs.git
cd emacs
./autogen.sh
./configure --without-x --with-cairo --with-modules
make

Ignore warnings.

For archlinux users

This repository contains PKGBUILD, so you can do to install:

mkdir /tmp/emacs
cd /tmp/emacs
wget https://raw.githubusercontent.com/masm11/emacs/master/PKGBUILD
makepkg -s
sudo pacman -U emacs-pgtk*.tar.xz

Running

cd src
GDK_BACKEND=wayland ./emacs  (or try ./emacs -Q if you have problems.)

X11 and Wayland

Of course, PGTK supports X11 and Wayland connections.

You can use GDK_BACKEND environment variable and --display option, and you can do (make-frame-on-display display-name) with display-name of different backend from the first frame.

You can know which backend is used for a frame:

(pgtk-backend-display-class)

This returns "GdkWaylandDisplay" for Wayland, or "GdkX11Display" for X11.

Note: Segmentation fault may occur on multiple display environment.

TODO

Known problems:

  • Segmentation fault while multiple-display.
  • Can't send selection data sometimes.
  • Only small area is drawn when a X11 frame opens. (In the case, you can resize it to be correctly drawn.)
  • Tooltips are stressful.
  • Exits when a connection to display server is closed by peer. (However I may not be able to resolve.)

Not implemented:

  • Toolbar.
  • Menubar.
  • Many other features.

Those may not be developed because I don't use them.

ImageMagick

Emacs doesn't support ImageMagick 7.

I wrote this code in configure.ac:

    if test $HAVE_IMAGEMAGICK != yes; then
      IMAGEMAGICK_MODULE="MagickWand-6.Q16HDRI >= 6.3.5 MagickWand-6.Q16HDRI != 6.8.2 MagickWand-6.Q16HDRI < 7 MagickCore-6.Q16HDRI >= 6.9.9 MagickCore-6.Q16HDRI < 7"
      EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
    fi

However, MagickWand-6.Q16HDRI requires MagickCore, which may be ImageMagick 7. So, you may need to fix Requires: in /usr/lib/pkgconfig/MagickWand-6.Q16HDRI.pc:

Requires: MagickCore-6.Q16HDRI

Debugging

Edit src/pgtkterm.h to uncomment:

#define PGTK_DEBUG 1

It enables so many debugging outputs.

On gdb, you may want to do:

(gdb) handle SIGPIPE nostop noprint

Supporting Color Emoji Fonts

By default, color fonts are ignored for stability.

To use them, you can write this code in ~/.emacs:

(if (featurep 'pgtk)
    (setq xft-ignore-color-fonts nil))

Changing this variable on the fly may not work.

You may need build and install cairo from git repo. 1.15.12 is insufficient.

My Environment

  • archlinux
  • gtk+-3.22.30
  • glib-2.56.1
  • gnome-shell 3.28.1
  • gcc 7.3.1
  • wayland 1.14.0
  • wayland-protocols 1.13
  • cairo 1.15.12
  • freetype2 2.9

Notice

  • This code is NOT completely pure.

    It uses backend-specific functions to obtain the socket file descriptor to the display server. It supports X11 and Wayland.

  • Commit messages are in Japanese.

About me

masm11.

You can’t perform that action at this time.