[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Mac port

From: martin rudalics
Subject: Re: Emacs Mac port
Date: Mon, 19 Sep 2016 10:19:22 +0200

> For "window snapping" introduced in macOS Sierra, see
> https://www.youtube.com/watch?v=pzJGeTS49f4 .

IIUC this video shows only how snapping works when moving windows around
the screen.  There's no resizing involved.  Do windows also "snap" while
they get resized?

> The difficulty in updating the frame contents during resize by mouse
> dragging on OS X/macOS comes from the fact that it is processed in a
> modal loop.  To reflect the frame size change in Emacs, we have to go
> back to Lisp event loop so it triggers redisplay, but the modal loop
> does not allow us to do so.

I understand.  But simply moving windows does not resize them.  No need
to trigger redisplay.

> Screen updating during mouse dragging is handled by generating fake
> events press -> drag -> release -> press -> drag -> release -> ...
> internally during a single dragging session.  Between (fake) release
> and press, we go back to the Lisp event loop to trigger redisplay.
> Unfortunately, this fake event generation does not work with "window
> snapping" introduced in upcoming macOS 10.12 Sierra, probably because
> the contextual information is lost by fragmented drag events.  I don't
> want to make a frame all white as in the NS port, so I capture the
> frame contents as a bitmap, decompose it to window (Emacs terminology)
> contents,

... to avoid that scroll bars appear in the wrong place, I presume ...

> and distribute them proportionally during resize by mouse
> dragging.

Thanks for the information, martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]