From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: widget-button-click chokes on frame selection event Date: Sun, 17 Sep 2006 17:04:10 -0400 Message-ID: References: <87fyercx00.fsf@gate450.dyndns.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1158527080 12543 80.91.229.2 (17 Sep 2006 21:04:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Sep 2006 21:04:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 17 23:04:38 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GP3oa-0002Cx-Mi for ged-emacs-devel@m.gmane.org; Sun, 17 Sep 2006 23:04:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GP3oa-0000Yd-85 for ged-emacs-devel@m.gmane.org; Sun, 17 Sep 2006 17:04:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GP3oD-0000MH-Ny for emacs-devel@gnu.org; Sun, 17 Sep 2006 17:04:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GP3oC-0000JU-Hb for emacs-devel@gnu.org; Sun, 17 Sep 2006 17:04:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GP3oC-0000IR-2R for emacs-devel@gnu.org; Sun, 17 Sep 2006 17:04:12 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GP3qt-0005sk-0W for emacs-devel@gnu.org; Sun, 17 Sep 2006 17:06:59 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GP3oA-0002kz-Tc; Sun, 17 Sep 2006 17:04:10 -0400 Original-To: Andreas Seltenreich In-reply-to: <87fyercx00.fsf@gate450.dyndns.org> (message from Andreas Seltenreich on Sat, 16 Sep 2006 23:38:55 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59944 Archived-At: I don't know how to reproduce the problem, but I think I see what is going wrong. I am guessing how to fix it. What results does this give? *** wid-edit.el 22 Feb 2006 13:56:50 -0500 1.166 --- wid-edit.el 17 Sep 2006 14:35:20 -0400 *************** *** 959,973 **** (push event unread-command-events) (setq event oevent) (throw 'button-press-cancelled t)) ! (setq pos (widget-event-point event)) ! (if (and pos ! (eq (get-char-property pos 'button) ! button)) ! (when face ! (overlay-put overlay 'face pressed-face) ! (overlay-put overlay 'mouse-face pressed-face)) ! (overlay-put overlay 'face face) ! (overlay-put overlay 'mouse-face mouse-face))))) ;; When mouse is released over the button, run ;; its action function. --- 959,976 ---- (push event unread-command-events) (setq event oevent) (throw 'button-press-cancelled t)) ! (unless (or (integerp event) ! (memq (car event) '(switch-frame select-window)) ! (eq (car event) 'scroll-bar-movement)) ! (setq pos (widget-event-point event)) ! (if (and pos ! (eq (get-char-property pos 'button) ! button)) ! (when face ! (overlay-put overlay 'face pressed-face) ! (overlay-put overlay 'mouse-face pressed-face)) ! (overlay-put overlay 'face face) ! (overlay-put overlay 'mouse-face mouse-face)))))) ;; When mouse is released over the button, run ;; its action function.