Skip to content

Flashing frames with emacsclient still occur #19

Description

@hisnawi

Hi Joe,
I have close to your setup, and this is the behavior I see.
Starting the first emacsclient loads fine, the second one flashes both frames and the rest have no issues.
It is just the second instantiation of a frame that has the flashing issue, no big deal but still annoying.
Do you see the same on your end?

Here is my setup:


     (setq myGraphicModeHash (make-hash-table :test 'equal :size 2))
    (puthash "gui" t myGraphicModeHash)
    (puthash "term" t myGraphicModeHash)
    (defun emacsclient-setup-theme-function (frame)
      (let ((gui (gethash "gui" myGraphicModeHash))
            (ter (gethash "term" myGraphicModeHash)))
        (progn
          (select-frame frame)
          (when (or gui ter) 
            (progn
              (load-theme 'material t)
              (if (display-graphic-p)
                  (puthash "gui" nil myGraphicModeHash)
                (puthash "term" nil myGraphicModeHash))))
          (when (not (and gui ter))
            (remove-hook 'after-make-frame-functions 'emacsclient-setup-theme-function)))))
    (if (daemonp)
        (add-hook 'after-make-frame-functions 'emacsclient-setup-theme-function)
      (progn 
        (load-theme 'material t)
        ))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions