Jacek Caban : kernelbase: Use IOCTL_CONDRV_SET_OUTPUT_INFO in SetConsoleWindowInfo.

Alexandre Julliard julliard at winehq.org
Fri Jul 10 16:30:31 CDT 2020


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jul 10 17:07:50 2020 +0200

kernelbase: Use IOCTL_CONDRV_SET_OUTPUT_INFO in SetConsoleWindowInfo.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/console.c | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index 85854851ce..cc30a11d68 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1406,8 +1406,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleTitleW( LPCWSTR title )
  */
 BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleWindowInfo( HANDLE handle, BOOL absolute, SMALL_RECT *window )
 {
+    struct condrv_output_info_params params = { SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW };
     SMALL_RECT rect = *window;
-    BOOL ret;
 
     TRACE( "(%p,%d,(%d,%d-%d,%d))\n", handle, absolute, rect.Left, rect.Top, rect.Right, rect.Bottom );
 
@@ -1421,19 +1421,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleWindowInfo( HANDLE handle, BOOL absolute
 	rect.Right  += info.srWindow.Right;
 	rect.Bottom += info.srWindow.Bottom;
     }
-    SERVER_START_REQ( set_console_output_info )
-    {
-        req->handle     = console_handle_unmap( handle );
-	req->win_left   = rect.Left;
-	req->win_top    = rect.Top;
-	req->win_right  = rect.Right;
-	req->win_bottom = rect.Bottom;
-        req->mask       = SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW;
-        ret = !wine_server_call_err( req );
-    }
-    SERVER_END_REQ;
 
-    return ret;
+    params.info.win_left   = rect.Left;
+    params.info.win_top    = rect.Top;
+    params.info.win_right  = rect.Right;
+    params.info.win_bottom = rect.Bottom;
+    return console_ioctl( handle, IOCTL_CONDRV_SET_OUTPUT_INFO, &params, sizeof(params), NULL, 0, NULL );
 }
 
 




More information about the wine-cvs mailing list