> I think that dragging the mode line up or down > should not change the selected window. If it does select a window, > that's a bug. > > I tried to fix this bug, using mouse-drag-move-window-top > to avoid the need to temporarily select a window inside > mouse-drag-mode-line-1. Why does it select a window? It selects the window above because in `mouse-drag-mode-line-1' the last event before leaving the `track-mouse' form is a drag-mouse-1 event and it's unread by the code. Its subsequent execution causes, according to the binding (global-set-key [mode-line drag-mouse-1] 'mouse-select-window) the selection of the window above. Removing that binding still doesn't work because this would cause the alternate binding (global-set-key [mode-line mouse-1] 'mouse-select-window) to become effective. The attached patch should take care of this and the other problem. OK to install?