Subject: Re: bug#19003: 24.4; Mouse-click in different frame displaying same buffer breaks region

From: Stefan Monnier <[email-masked]>
Date: Mon, 10 Nov 2014 20:39:50 -0500

Would the patch below solve it for you?

        Stefan

=== modified file 'src/frame.c'
--- src/frame.c	2014-11-10 20:05:40 +0000
+++ src/frame.c	2014-11-10 22:55:38 +0000
@@ -1198,7 +1198,7 @@
   return do_switch_frame (frame, 1, 0, norecord);
 }
 
-DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "e",
+DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "^e",
        doc: /* Handle a switch-frame event EVENT.
 Switch-frame events are usually bound to this function.
 A switch-frame event tells Emacs that the window manager has requested

=== modified file 'lisp/window.el'
--- lisp/window.el	2014-10-15 18:32:27 +0000
+++ lisp/window.el	2014-11-10 22:56:00 +0000
@@ -7904,7 +7904,7 @@
 
 (defun handle-select-window (event)
   "Handle select-window events."
-  (interactive "e")
+  (interactive "^e")
   (let ((window (posn-window (event-start event))))
     (unless (or (not (window-live-p window))
 		;; Don't switch if we're currently in the minibuffer.