From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Temporarily select-window, without updating mode-line face and cursor fill? Date: Sat, 01 May 2021 22:31:34 +0300 Message-ID: <83pmya8d49.fsf@gnu.org> References: <56F746A2-B842-421E-8FBF-EA5E93EA26CE@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: JD Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 01 21:33:10 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lcvMT-0004Bw-Vi for ged-emacs-devel@m.gmane-mx.org; Sat, 01 May 2021 21:33:09 +0200 Original-Received: from localhost ([::1]:51060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcvMR-0002OO-PJ for ged-emacs-devel@m.gmane-mx.org; Sat, 01 May 2021 15:33:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcvLD-0001h6-QP for emacs-devel@gnu.org; Sat, 01 May 2021 15:31:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48931) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcvLD-0000L1-IO; Sat, 01 May 2021 15:31:51 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3098 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lcvLC-00057X-BQ; Sat, 01 May 2021 15:31:51 -0400 In-Reply-To: <56F746A2-B842-421E-8FBF-EA5E93EA26CE@gmail.com> (message from JD Smith on Sat, 1 May 2021 14:46:31 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268728 Archived-At: > From: JD Smith > Date: Sat, 1 May 2021 14:46:31 -0400 > > I’m working on a small “in mode-line” scroll bar, and have implemented mouse events for it, which are working well. When I interact using the mouse with the mode line of a non-selected window, I need to have that window temporarily selected, so I can calculate its line offsets and move within it. But (just as for regular scrollbars), I’d like to retain the originally active window afterwards. Please explain in more detail why do you think you need to select the window. What are those "line offsets", and why "move within it" requires to select the window?