OSDN Git Service

コンテキストメニュー上およびフォーム外でのマウスジェスチャーの実行を抑止(再修正)
authorh677 <h677>
Sun, 20 Mar 2005 02:15:40 +0000 (02:15 +0000)
committerh677 <h677>
Sun, 20 Mar 2005 02:15:40 +0000 (02:15 +0000)
Giko.dfm
Giko.pas

index 589ad7e..3784b8f 100644 (file)
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,6 +1,6 @@
 object GikoForm: TGikoForm
-  Left = 137
-  Top = 76
+  Left = 355
+  Top = 37
   HorzScrollBar.Visible = False
   VertScrollBar.Visible = False
   AutoScroll = False
index dc3803c..2c8f02f 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -11627,14 +11627,23 @@ var
        s: string;
        Action: TAction;
        ActStr: string;
+       Comp : TComponent;
+       P : TPoint;
 begin
-       s := MouseGesture.GetGestureStr;
-       ActStr := '';
-       Action := GikoSys.Setting.Gestures.GetGestureAction(s);
-       if Action <> nil then
-               ActStr := '\81i' + Action.Caption + '\81j';
-       s := '\83W\83F\83X\83`\83\83\81[: ' + s + ActStr;
-       StatusBar.Panels[1].Text := s;
+    //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
+    GetCursorPos(P);
+    //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
+    //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82­\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
+    Comp := FindDragTarget(P, True);
+    if (Comp <> nil) then begin
+               s := MouseGesture.GetGestureStr;
+               ActStr := '';
+               Action := GikoSys.Setting.Gestures.GetGestureAction(s);
+               if Action <> nil then
+                       ActStr := '\81i' + Action.Caption + '\81j';
+               s := '\83W\83F\83X\83`\83\83\81[: ' + s + ActStr;
+               StatusBar.Panels[1].Text := s;
+    end;
 end;
 
 procedure TGikoForm.OnGestureEnd(Sender: TObject);
@@ -11644,18 +11653,18 @@ var
        Comp : TComponent;
        P : TPoint;
 begin
-       s := MouseGesture.GetGestureStr;
-       Action := GikoSys.Setting.Gestures.GetGestureAction(s);
-       if Action <> nil then begin
-               //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
-               GetCursorPos(P);
-        //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
-        //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82­\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
-               Comp := FindDragTarget(P, True);
-        if (Comp <> nil) then
-                       Action.Execute;
+    //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
+    GetCursorPos(P);
+    //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
+    //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82­\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
+    Comp := FindDragTarget(P, True);
+    if (Comp <> nil) then begin
+               s := MouseGesture.GetGestureStr;
+               Action := GikoSys.Setting.Gestures.GetGestureAction(s);
+               if Action <> nil then
+               Action.Execute;
+               StatusBar.Panels[1].Text := '';
     end;
-       StatusBar.Panels[1].Text := '';
 end;
 
 procedure TGikoForm.ListViewCustomDrawItem(Sender: TCustomListView;