Karsten Hopp 12cf74
To: vim-dev@vim.org
Karsten Hopp 12cf74
Subject: Patch 7.1.204 (extra)
Karsten Hopp 12cf74
Fcc: outbox
Karsten Hopp 12cf74
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 12cf74
Mime-Version: 1.0
Karsten Hopp 12cf74
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 12cf74
Content-Transfer-Encoding: 8bit
Karsten Hopp 12cf74
------------
Karsten Hopp 12cf74
Karsten Hopp 12cf74
Patch 7.1.204 (extra)
Karsten Hopp 12cf74
Problem:    Win32: Using the example at 'balloonexpr' the balloon disappears
Karsten Hopp 12cf74
	    after four seconds and then comes back again.  Also moves the
Karsten Hopp 12cf74
	    mouse pointer a little bit.  (Yongwei Wu)
Karsten Hopp 12cf74
Solution:   Set the autopop time to 30 seconds (the max value).  (Sergey
Karsten Hopp 12cf74
	    Khorev)  Move the mouse two pixels forward and one back to end up
Karsten Hopp 12cf74
	    in the same position (really!).
Karsten Hopp 12cf74
Files:	    src/gui_w32.c
Karsten Hopp 12cf74
Karsten Hopp 12cf74
Karsten Hopp 12cf74
Karsten Hopp 12cf74
*** ../vim-7.1.203/src/gui_w32.c	Thu Jan  3 20:44:35 2008
Karsten Hopp 12cf74
--- src/gui_w32.c	Sat Jan  5 13:09:56 2008
Karsten Hopp 12cf74
***************
Karsten Hopp 12cf74
*** 4575,4585 ****
Karsten Hopp 12cf74
      SendMessage(beval->balloon, TTM_ADDTOOL, 0, (LPARAM)pti);
Karsten Hopp 12cf74
      /* Make tooltip appear sooner */
Karsten Hopp 12cf74
      SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_INITIAL, 10);
Karsten Hopp 12cf74
      /*
Karsten Hopp 12cf74
       * HACK: force tooltip to appear, because it'll not appear until
Karsten Hopp 12cf74
       * first mouse move. D*mn M$
Karsten Hopp 12cf74
       */
Karsten Hopp 12cf74
!     mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0);
Karsten Hopp 12cf74
      mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
Karsten Hopp 12cf74
      vim_free(pti);
Karsten Hopp 12cf74
  }
Karsten Hopp 12cf74
--- 4575,4589 ----
Karsten Hopp 12cf74
      SendMessage(beval->balloon, TTM_ADDTOOL, 0, (LPARAM)pti);
Karsten Hopp 12cf74
      /* Make tooltip appear sooner */
Karsten Hopp 12cf74
      SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_INITIAL, 10);
Karsten Hopp 12cf74
+     /* I've performed some tests and it seems the longest possible life time
Karsten Hopp 12cf74
+      * of tooltip is 30 seconds */
Karsten Hopp 12cf74
+     SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_AUTOPOP, 30000);
Karsten Hopp 12cf74
      /*
Karsten Hopp 12cf74
       * HACK: force tooltip to appear, because it'll not appear until
Karsten Hopp 12cf74
       * first mouse move. D*mn M$
Karsten Hopp 12cf74
+      * Amazingly moving (2, 2) and then (-1, -1) the mouse doesn't move.
Karsten Hopp 12cf74
       */
Karsten Hopp 12cf74
!     mouse_event(MOUSEEVENTF_MOVE, 2, 2, 0, 0);
Karsten Hopp 12cf74
      mouse_event(MOUSEEVENTF_MOVE, (DWORD)-1, (DWORD)-1, 0, 0);
Karsten Hopp 12cf74
      vim_free(pti);
Karsten Hopp 12cf74
  }
Karsten Hopp 12cf74
*** ../vim-7.1.203/src/version.c	Fri Jan  4 21:25:01 2008
Karsten Hopp 12cf74
--- src/version.c	Sat Jan  5 13:12:22 2008
Karsten Hopp 12cf74
***************
Karsten Hopp 12cf74
*** 668,669 ****
Karsten Hopp 12cf74
--- 668,671 ----
Karsten Hopp 12cf74
  {   /* Add new patch number below this line */
Karsten Hopp 12cf74
+ /**/
Karsten Hopp 12cf74
+     204,
Karsten Hopp 12cf74
  /**/
Karsten Hopp 12cf74
Karsten Hopp 12cf74
-- 
Karsten Hopp 12cf74
WOMAN:   I didn't know we had a king. I thought we were an autonomous
Karsten Hopp 12cf74
         collective.
Karsten Hopp 12cf74
DENNIS:  You're fooling yourself.  We're living in a dictatorship.  A
Karsten Hopp 12cf74
         self-perpetuating autocracy in which the working classes--
Karsten Hopp 12cf74
WOMAN:   Oh there you go, bringing class into it again.
Karsten Hopp 12cf74
DENNIS:  That's what it's all about if only people would--
Karsten Hopp 12cf74
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 12cf74
Karsten Hopp 12cf74
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 12cf74
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 12cf74
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 12cf74
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///