Mikołaj Zalewski : wineconsole: Allow making selections with a mouse also when not in the QuickEdit mode.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 20 08:00:35 CDT 2006


Module: wine
Branch: master
Commit: 4a94d09a3ecca8ebf1aa1e781e0760552a531bfe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4a94d09a3ecca8ebf1aa1e781e0760552a531bfe

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Thu Oct 19 19:35:02 2006 +0200

wineconsole: Allow making selections with a mouse also when not in the QuickEdit mode.

---

 programs/wineconsole/user.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 557ccfc..0726ea6 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -1116,12 +1116,14 @@ static LRESULT CALLBACK WCUSER_Proc(HWND
 	WCUSER_GenerateKeyInputRecord(data, uMsg == WM_SYSKEYDOWN, wParam, lParam, TRUE);
 	break;
     case WM_LBUTTONDOWN:
-        if (data->curcfg.quick_edit)
+        if (data->curcfg.quick_edit || PRIVATE(data)->has_selection)
         {
             if (PRIVATE(data)->has_selection)
+                WCUSER_SetSelection(data, 0);
+            
+            if (data->curcfg.quick_edit && PRIVATE(data)->has_selection)
             {
                 PRIVATE(data)->has_selection = FALSE;
-                WCUSER_SetSelection(data, 0);
             }
             else
             {
@@ -1137,7 +1139,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND
         }
 	break;
     case WM_MOUSEMOVE:
-        if (data->curcfg.quick_edit)
+        if (data->curcfg.quick_edit || PRIVATE(data)->has_selection)
         {
             if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection &&
                 (wParam & MK_LBUTTON))
@@ -1151,14 +1153,12 @@ static LRESULT CALLBACK WCUSER_Proc(HWND
         }
 	break;
     case WM_LBUTTONUP:
-        if (data->curcfg.quick_edit)
+        if (data->curcfg.quick_edit || PRIVATE(data)->has_selection)
         {
-            if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection &&
-                (wParam& MK_LBUTTON))
+            if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection)
             {
                 WCUSER_MoveSelection(data, PRIVATE(data)->selectPt1, WCUSER_GetCell(data, lParam));
                 ReleaseCapture();
-                PRIVATE(data)->has_selection = FALSE;
             }
         }
         else




More information about the wine-cvs mailing list