[Ttssh2-commit] [7042] マウストラッキングで、マウス位置の最大値を端末サイズに制限する

Back to archive index

scmno****@osdn***** scmno****@osdn*****
2018年 2月 21日 (水) 12:01:42 JST


Revision: 7042
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7042
Author:   doda
Date:     2018-02-21 12:01:42 +0900 (Wed, 21 Feb 2018)
Log Message:
-----------
マウストラッキングで、マウス位置の最大値を端末サイズに制限する

今まではウィンドウの外に出た時はイベントを報告していなかったため
結果として端末サイズを超えていなかったが、マウスのキャプチャを
行うようにしてウィンドウ外でのイベント報告を行うようにした影響で
端末サイズを超えるようになったので、最大値の制限を行う。

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2018-02-21 03:01:39 UTC (rev 7041)
+++ trunk/teraterm/teraterm/vtterm.c	2018-02-21 03:01:42 UTC (rev 7042)
@@ -5846,8 +5846,14 @@
 	DispConvWinToScreen(Xpos, Ypos, &x, &y, NULL);
 	x++; y++;
 
-	if (x < 1) x = 1;
-	if (y < 1) y = 1;
+	if (x < 1)
+		x = 1;
+	else if (x > NumOfColumns)
+		x = NumOfColumns;
+	if (y < 1)
+		y = 1;
+	else if (y > NumOfLines)
+		y = NumOfLines;
 
 	if (ShiftKey())
 		modifier = 4;



Ttssh2-commit メーリングリストの案内
Back to archive index