From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/2] avoid: ignore mouse when it is hidden Date: Mon, 18 Oct 2010 10:42:28 -0400 Message-ID: References: <1287067949-23750-1-git-send-email-julien@danjou.info> <1287067949-23750-3-git-send-email-julien@danjou.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287413767 5423 80.91.229.12 (18 Oct 2010 14:56:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 14:56:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Julien Danjou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 18 16:56:05 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7r89-0000tH-6O for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 16:56:05 +0200 Original-Received: from localhost ([127.0.0.1]:46056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7r2h-00048p-QF for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 10:50:28 -0400 Original-Received: from [140.186.70.92] (port=58746 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7qv4-0007hD-Tc for emacs-devel@gnu.org; Mon, 18 Oct 2010 10:42:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7qv0-0002Cl-Eh for emacs-devel@gnu.org; Mon, 18 Oct 2010 10:42:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29891 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7qv0-0002CM-Cg for emacs-devel@gnu.org; Mon, 18 Oct 2010 10:42:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4JAJf5u0xMCpO7/2dsb2JhbACgMnlyvkOFSQSSGQ X-IronPort-AV: E=Sophos;i="4.57,345,1283745600"; d="scan'208";a="80008791" Original-Received: from 76-10-147-187.dsl.teksavvy.com (HELO pastel.home) ([76.10.147.187]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 18 Oct 2010 10:42:29 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D1F8DA8219; Mon, 18 Oct 2010 10:42:28 -0400 (EDT) In-Reply-To: <1287067949-23750-3-git-send-email-julien@danjou.info> (Julien Danjou's message of "Thu, 14 Oct 2010 16:52:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:131809 Archived-At: > (defun mouse-avoidance-ignore-p () > (let ((mp (mouse-position))) > - (or executing-kbd-macro ; don't check inside macro > + (or (not (frame-pointer-visible-p)) ; The pointer is hidden > + executing-kbd-macro ; don't check inside macro > (null (cadr mp)) ; don't move unless in an Emacs frame > (not (eq (car mp) (selected-frame))) > ;; Don't do anything if last event was a mouse event. Just wondering here: seeing how you've gone through the trouble to write a patch for the C code, there must be a good reason, but why check (not (frame-pointer-visible-p)) rather than make-pointer-invisible? Stefan