1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

emacsclient should use both of DISPLAY and WAYLAND_DISPLAY.

* lisp/server.el (server-create-window-system-frame): error out when
not on a supported window

* lib-src/emacsclient.c (decode_options): handle WALAND_DISPLAY on PGTK
This commit is contained in:
Yuuki Harano 2020-03-24 00:33:57 +09:00 committed by Jeff Walsh
parent 806b7640c0
commit d2a29e883e
2 changed files with 16 additions and 6 deletions

View file

@ -611,7 +611,12 @@ decode_options (int argc, char **argv)
alt_display = "w32"; alt_display = "w32";
#endif #endif
#ifdef HAVE_PGTK
display = egetenv ("WAYLAND_DISPLAY");
alt_display = egetenv ("DISPLAY");
#else
display = egetenv ("DISPLAY"); display = egetenv ("DISPLAY");
#endif
} }
if (!display) if (!display)

View file

@ -881,12 +881,17 @@ This handles splitting the command if it would be bigger than
) )
(cond (w (cond (w
(server--create-frame (condition-case nil
nowait proc (server--create-frame
`((display . ,display) nowait proc
,@(if parent-id `((display . ,display)
`((parent-id . ,(string-to-number parent-id)))) ,@(if parent-id
,@parameters))) `((parent-id . ,(string-to-number parent-id))))
,@parameters))
(error
(server-log "Window system unsupported" proc)
(server-send-string proc "-window-system-unsupported \n")
nil)))
(t (t
(server-log "Window system unsupported" proc) (server-log "Window system unsupported" proc)