From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs Mac port Date: Mon, 30 Oct 2017 17:57:07 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <6EEBF320-A91F-4B19-B2E0-DED36B14E635@univie.ac.at> <59F6E20A.4030806@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1509353883 15656 195.159.176.226 (30 Oct 2017 08:58:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2017 08:58:03 +0000 (UTC) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Cc: Konrad Podczeck , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 30 09:57:57 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e95tL-0003Fp-I9 for ged-emacs-devel@m.gmane.org; Mon, 30 Oct 2017 09:57:55 +0100 Original-Received: from localhost ([::1]:39239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e95tS-0000W3-AX for ged-emacs-devel@m.gmane.org; Mon, 30 Oct 2017 04:58:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e95sg-0000Vm-6C for emacs-devel@gnu.org; Mon, 30 Oct 2017 04:57:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e95sd-0002ak-4k for emacs-devel@gnu.org; Mon, 30 Oct 2017 04:57:14 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e95sc-0002a0-KG for emacs-devel@gnu.org; Mon, 30 Oct 2017 04:57:11 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 08F3EF08E0; Mon, 30 Oct 2017 17:57:09 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <59F6E20A.4030806@gmx.at> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219827 Archived-At: >>>>> On Mon, 30 Oct 2017 09:25:46 +0100, martin rudalics said: >>>> (2) Putting the mouse over a tool-bar button, so that the >>>> corresponding tooltip appear, and then quickly dragging the frame >>>> with the mouse to another place on the screen, the tooltip is still >>>> shown for some time at the original screen position. > How can you reproduce that? Here the tooltip disappears immediately > when moving the mouse from the tool bar button to the frame border. The Mac port is a bit special in the sense that the tooltip for a toolkit tool bar button is not shown by the toolkit but as a Emacs tip frame. Also, unlike the case of GTK+ (with x-gtk-use-system-tooltips = nil) which has callbacks to show/hide tooltips, it is processed by the callback for mouse movement events as in non-toolkit tool bars on X11. >> I think I could find the cause of this problem finally. It took a >> long time because it was in the platform-independent part. I'm still >> not sure if the patch below is the right way, but could you check if >> this also works for your case? > You mean that the help_echo_string built by > if (cursor != FRAME_X_OUTPUT (f)->nontext_cursor) > { > /* Do we really want a help echo here? */ > help_echo_string = build_string ("drag-mouse-1: resize frame"); > goto set_cursor; > should be immediately erased when we "have a window" and be left as is > when we just "have a frame"? Or am I missing something else? As I said in the previous mail, I'm still not sure this is the right way (especially about the tooltip for internal border resizing). I just tried reverting a part of change between Emacs 25.3, which does not show the problem the OP described, and Emacs 26.0.90. I think the problem is that help_echo_string can be set to nil without hiding the tooltip, if returning early (i.e., when !WINDOWP (window)) from note_mouse_highlight. The code to show/hide tooltip for the tool bar in the Mac port is similar to the one on X11 below: 8568 case MotionNotify: 8569 { 8570 x_display_set_last_user_time (dpyinfo, event->xmotion.time); 8571 previous_help_echo_string = help_echo_string; 8572 help_echo_string = Qnil; : 8648 /* If the contents of the global variable help_echo_string 8649 has changed, generate a HELP_EVENT. */ 8650 if (!NILP (help_echo_string) 8651 || !NILP (previous_help_echo_string)) 8652 do_help = 1; 8653 goto OTHER; 8654 } If help_echo_string = nil at Line 8572 but the tooltip is actually shown, and the lines between 8573 and 8648 do not set help_echo_string (as no help string to show), then the do_help is not set and thus the tooltip is not hidden. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp