When a mouse drags a maximized frame, that frame will become a normal size (i.e., not maximized).
It seems that Emacs will receive a message when its frame is being dragged by a mouse.

I want to run a set of functions when a mouse starts dragging (mouse starts moving after its left button is down) the frame
and another set of functions when the mouse-1 button is released after dragging.

Is there any relevant hook?
If not, how to implement that?

Here's a similar thing: 16.1 How Programs Do Loading:

Variable: load-in-progress
This variable is non-nil if Emacs is in the process of loading a file, and it is nil otherwise.

1 Answer 1


Is there any relevant hook?

Yes, it is move-frame-functions.

Functions run after a frame was moved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.