Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6891faf4
Commit
6891faf4
authored
Mar 18, 2023
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Save original console title on initialization.
parent
b1dc5a53
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
conhost.c
programs/conhost/conhost.c
+23
-6
conhost.h
programs/conhost/conhost.h
+1
-0
No files found.
programs/conhost/conhost.c
View file @
6891faf4
...
...
@@ -2461,21 +2461,38 @@ static NTSTATUS scroll_output( struct screen_buffer *screen_buffer, const struct
return
STATUS_SUCCESS
;
}
static
WCHAR
*
set_title
(
const
WCHAR
*
in_title
,
size_t
size
)
{
WCHAR
*
title
=
NULL
;
title
=
malloc
(
size
+
sizeof
(
WCHAR
)
);
if
(
!
title
)
return
NULL
;
memcpy
(
title
,
in_title
,
size
);
title
[
size
/
sizeof
(
WCHAR
)
]
=
0
;
return
title
;
}
static
NTSTATUS
set_console_title
(
struct
console
*
console
,
const
WCHAR
*
in_title
,
size_t
size
)
{
WCHAR
*
title
=
NULL
;
TRACE
(
"%s
\n
"
,
debugstr_wn
(
in_title
,
size
/
sizeof
(
WCHAR
))
);
if
(
size
)
{
if
(
!
(
title
=
malloc
(
size
+
sizeof
(
WCHAR
)
)))
return
STATUS_NO_MEMORY
;
memcpy
(
title
,
in_title
,
size
);
title
[
size
/
sizeof
(
WCHAR
)]
=
0
;
}
if
(
!
(
title
=
set_title
(
in_title
,
size
)))
return
STATUS_NO_MEMORY
;
free
(
console
->
title
);
console
->
title
=
title
;
if
(
!
console
->
title_orig
&&
!
(
console
->
title_orig
=
set_title
(
in_title
,
size
)))
{
free
(
console
->
title
);
console
->
title
=
NULL
;
return
STATUS_NO_MEMORY
;
}
if
(
console
->
tty_output
)
{
size_t
len
;
...
...
programs/conhost/conhost.h
View file @
6891faf4
...
...
@@ -93,6 +93,7 @@ struct console
unsigned
int
key_state
;
struct
console_window
*
window
;
WCHAR
*
title
;
/* console title */
WCHAR
*
title_orig
;
/* original console title */
struct
history_line
**
history
;
/* lines history */
unsigned
int
history_size
;
/* number of entries in history array */
unsigned
int
history_index
;
/* number of used entries in history array */
...
...
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