[Ttssh2-commit] [3322] カーソル形状変更時のちらつきを抑えた

svnno****@sourc***** svnno****@sourc*****
2009年 4月 17日 (金) 19:14:24 JST


Revision: 3322
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3322
Author:   doda
Date:     2009-04-17 19:14:24 +0900 (Fri, 17 Apr 2009)

Log Message:
-----------
カーソル形状変更時のちらつきを抑えた

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/teraterm/vtdisp.h
    trunk/teraterm/teraterm/vtterm.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2009-04-16 05:18:56 UTC (rev 3321)
+++ trunk/teraterm/teraterm/vtdisp.c	2009-04-17 10:14:24 UTC (rev 3322)
@@ -1974,7 +1974,7 @@
     T = GetCaretBlinkTime() * 2 / 3;
     SetTimer(HVTWin,IdCaretTimer,T,NULL);
   }
-  InvalidateRect(HVTWin,NULL,TRUE);
+  UpdateCaretPosition(TRUE);
 }
 
 // WM_KILLFOCUS‚³‚ꂽ‚Æ‚«‚̃J[ƒ\ƒ‹‚ðŽ©•ª‚Å•`‚­
@@ -2035,7 +2035,10 @@
 //
 // CaretOff()‚Ì’¼Œã‚ɌĂԂ±‚ƁBCaretOff()“à‚©‚çŒÄ‚ԂƁA–³ŒÀÄ‹AŒÄ‚яo‚µ‚Æ‚È‚èA
 // stack overflow‚É‚È‚éB
-void UpdateCaretKillFocus(BOOL enforce)
+//
+// ƒJ[ƒ\ƒ‹Œ`ó•ÏXŽž(ChangeCaret)‚É‚àŒÄ‚Ô‚±‚Æ‚É‚µ‚½‚½‚߁AŠÖ”–¼•ÏX -- 2009/04/17 doda.
+//
+void UpdateCaretPosition(BOOL enforce)
 {
   int CaretX, CaretY;
   RECT rc;
@@ -2043,7 +2046,7 @@
   CaretX = (CursorX-WinOrgX)*FontWidth;
   CaretY = (CursorY-WinOrgY)*FontHeight;
 
-  if (ts.KillFocusCursor == 0)
+  if (!enforce && !ts.KillFocusCursor)
 	  return;
 
   // Eterm lookfeel‚̏ꍇ‚͉½‚à‚µ‚È‚¢
@@ -3290,7 +3293,7 @@
   {
 	  if (IsCaretOn()) {
 		CaretKillFocus(FALSE);
-		UpdateCaretKillFocus(TRUE);  // ƒAƒNƒeƒBƒuŽž‚Í–³ðŒ‚ɍĕ`‰æ‚·‚é
+		UpdateCaretPosition(TRUE);  // ƒAƒNƒeƒBƒuŽž‚Í–³ðŒ‚ɍĕ`‰æ‚·‚é
 	  }
 
     SetFocus(HVTWin);

Modified: trunk/teraterm/teraterm/vtdisp.h
===================================================================
--- trunk/teraterm/teraterm/vtdisp.h	2009-04-16 05:18:56 UTC (rev 3321)
+++ trunk/teraterm/teraterm/vtdisp.h	2009-04-17 10:14:24 UTC (rev 3322)
@@ -33,7 +33,7 @@
 void ResetIME();
 void ChangeCaret();
 void CaretKillFocus(BOOL show);
-void UpdateCaretKillFocus(BOOL enforce);
+void UpdateCaretPosition(BOOL enforce);
 void CaretOn();
 void CaretOff();
 void DispDestroyCaret();

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2009-04-16 05:18:56 UTC (rev 3321)
+++ trunk/teraterm/teraterm/vtterm.c	2009-04-17 10:14:24 UTC (rev 3322)
@@ -3242,7 +3242,7 @@
   if (c==0) return 0;
 
   CaretOff();
-  UpdateCaretKillFocus(FALSE);  // ”ñƒAƒNƒeƒBƒu‚̏ꍇ‚̂ݍĕ`‰æ‚·‚é
+  UpdateCaretPosition(FALSE);  // ”ñƒAƒNƒeƒBƒu‚̏ꍇ‚̂ݍĕ`‰æ‚·‚é
 
   ChangeEmu = 0;
 



Ttssh2-commit メーリングリストの案内