Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6cff6590
Commit
6cff6590
authored
Aug 17, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use IOCTL_CONDRV_SET_TITLE in SetConsoleTitleW.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32eb41de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
console.c
dlls/kernel32/tests/console.c
+4
-0
console.c
dlls/kernelbase/console.c
+3
-11
No files found.
dlls/kernel32/tests/console.c
View file @
6cff6590
...
...
@@ -3656,6 +3656,10 @@ static void test_FreeConsole(void)
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
SetConsoleTitleW
(
L"test"
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"SetConsoleTitleW returned %x(%u)
\n
"
,
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
hwnd
=
GetConsoleWindow
();
ok
(
!
hwnd
,
"hwnd = %p
\n
"
,
hwnd
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
...
...
dlls/kernelbase/console.c
View file @
6cff6590
...
...
@@ -1305,18 +1305,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleTextAttribute( HANDLE handle, WORD attr
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SetConsoleTitleW
(
LPCWSTR
title
)
{
BOOL
ret
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
title
));
SERVER_START_REQ
(
set_console_input_info
)
{
req
->
handle
=
0
;
req
->
mask
=
SET_CONSOLE_INPUT_INFO_TITLE
;
wine_server_add_data
(
req
,
title
,
lstrlenW
(
title
)
*
sizeof
(
WCHAR
)
);
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
return
console_ioctl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_SET_TITLE
,
(
void
*
)
title
,
lstrlenW
(
title
)
*
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment