doomemacs / doomemacs/core

org-capture script creates frames under X11 despite PGTK Emacs running on Wayland

Open
#8,601 4 comments 0 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### Describe your issue

I have bound the org-capture shell script to a hotkey. When triggered, I receive this warning:
> You are trying to run Emacs configured with the "pure-GTK" interface under the X Window System. That configuration is unsupported and will lead to sporadic crashes during transfer of large selection data. It will also lead to various problems with keyboard input.

**Expected behavior:** The org-capture frame should open on Wayland, consistent with normal Emacs frames which work correctly under Wayland.
**Actual behavior:** The org-capture frame attempts to open under XWayland, triggering the PGTK/X11 incompatibility warning.

### Steps to reproduce

- Install Emacs compiled with PGTK support for Wayland and setup Doom Emacs. Usually distributed as `emacs-wayland`(AUR) or `emacs-pgtk`(DNF)
- Run a Wayland compositor (e.g., Sway, Hyprland, GNOME Wayland)
- Ensure XWayland is running (this provides the DISPLAY variable that triggers the issue)
- Run the command: `exec ~/.config/emacs/bin/org-capture`
- The X11/PGTK compatibility issue displays on the newly created frame.

### System information

https://pastebin.com/hSgT070D

### Disclosures

- [ ] This issue was written by AI.

- [ ] I used AI extensively to investigate this issue.

- [x] My issue was observed on a stable and supported release of GNU Emacs (must not end in `.50`, `.60`, or `.90`–`.99`, e.g. `30.0.50`).

- [x] A [backtrace](https://discourse.doomemacs.org/t/85) is provided for each error I've reported (if any).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.