I run emacs using a server and multiple clients on both, the graphical display and the terminal.
To use the same configuration files for terminal and graphical display, I used this solution.
The issue is, on starting a new emacs client, the
fullscreen function gets called on all the already running clients too, and causes a very unwanted behaviour which sometimes throws up errors too.
display-graphic-p function doc says,
(display-graphic-p &optional DISPLAY)
Return non-nil if DISPLAY is a graphic display. Graphical displays are those which are capable of displaying several frames and several different fonts at once. This is true for displays that use a window system such as X, and false for text-only terminals. DISPLAY can be a display name, a frame, or nil (meaning the selected frame's display).
I think my issue can be resolved by specifically calling the fullscreen function on the selected frame's display. So, my question is, how to obtain the name of the current display?
fullscreenpackage that you use.
(set-frame-parameter (selected-frame) 'fullscreen 'fullboth)instead, when the current frame is graphical.