Jacek Caban : conhost: Fix copy-paste typos in selection coordinates.

Alexandre Julliard julliard at winehq.org
Mon Dec 21 15:49:53 CST 2020


Module: wine
Branch: master
Commit: 3d2b42332884fec35a7e79e919bd31fd4f6816a3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3d2b42332884fec35a7e79e919bd31fd4f6816a3

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Dec 21 18:38:22 2020 +0100

conhost: Fix copy-paste typos in selection coordinates.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50052
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/conhost/window.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index ed806c379d3..55690377a7e 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -878,7 +878,7 @@ static COORD get_cell( struct console *console, LPARAM lparam )
 {
     COORD c;
     c.X = console->active->win.left + (short)LOWORD(lparam) / console->active->font.width;
-    c.Y = console->active->win.left + (short)HIWORD(lparam) / console->active->font.height;
+    c.Y = console->active->win.top + (short)HIWORD(lparam) / console->active->font.height;
     return c;
 }
 
@@ -906,11 +906,11 @@ static void get_selection_rect( struct console *console, RECT *r )
     r->left   = (min(console->window->selection_start.X, console->window->selection_end.X) -
                  console->active->win.left) * console->active->font.width;
     r->top    = (min(console->window->selection_start.Y, console->window->selection_end.Y) -
-                 console->active->win.left) * console->active->font.height;
+                 console->active->win.top) * console->active->font.height;
     r->right  = (max(console->window->selection_start.X, console->window->selection_end.X) + 1 -
                  console->active->win.left) * console->active->font.width;
     r->bottom = (max(console->window->selection_start.Y, console->window->selection_end.Y) + 1 -
-                 console->active->win.left) * console->active->font.height;
+                 console->active->win.top) * console->active->font.height;
 }
 
 static void update_selection( struct console *console, HDC ref_dc )




More information about the wine-cvs mailing list