Giter Site home page Giter Site logo

Comments (8)

manateelazycat avatar manateelazycat commented on August 9, 2024

目前 eaf 只适配过启动的 frame, 没有做多 frame 的处理.

from emacs-application-framework.

manateelazycat avatar manateelazycat commented on August 9, 2024

@zsxh 为什么要使用 multi-frame ? 不觉得 multi-frame 不方便吗?

from emacs-application-framework.

zsxh avatar zsxh commented on August 9, 2024

因为有多个显示器,用multi-frame的话比较方便管理

from emacs-application-framework.

manateelazycat avatar manateelazycat commented on August 9, 2024

@zsxh 我很少用 multi-frame , 短时间之内可能不会实现这个需求, 如果以后用的人多了, 我可能会考虑实现, 现在没有太多时间实现 multi-frame.

抱歉。

from emacs-application-framework.

zsxh avatar zsxh commented on August 9, 2024

我发现 winum 的 winum--window-list 完美解决了这个问题。

(require winum)

(defun eaf-monitor-configuration-change (&rest _)
  (ignore-errors
    (let (view-infos)
      ;; (dolist (window (window-list))
      (dolist (window (winum--window-list))
        (let ((buffer (window-buffer window)))
          (with-current-buffer buffer
            (if (eq major-mode 'eaf-mode)
                (let* ((window-allocation (eaf-get-window-allocation window))
                       (x (nth 0 window-allocation))
                       (y (nth 1 window-allocation))
                       (w (nth 2 window-allocation))
                       (h (nth 3 window-allocation))
                       )
                  (add-to-list 'view-infos (format "%s:%s:%s:%s:%s" buffer-id x y w h))
                  )))))
      ;; I don't know how to make emacs send dbus-message with two-dimensional list.
      ;; So i package two-dimensional list in string, then unpack on server side. ;)
      (eaf-call "update_views" (mapconcat 'identity view-infos ","))
      )))

from emacs-application-framework.

manateelazycat avatar manateelazycat commented on August 9, 2024

@zsxh 今天写了一个补丁 103a78c

已经支持 multi-frame 了

from emacs-application-framework.

zsxh avatar zsxh commented on August 9, 2024

@manateelazycat nice,我测试了一下,发现不同 size 的 frame 渲染同一个 eaf viewer,viewer size 只会match其中一个frame,其它的没啥问题了。

from emacs-application-framework.

manateelazycat avatar manateelazycat commented on August 9, 2024

@zsxh 有新的问题提新的 issue 吧, 这样好进行追踪

from emacs-application-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.