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
78831ae9
Commit
78831ae9
authored
Jul 30, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Use renderer handle instead of hConIn where possible.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b45c04f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
curses.c
programs/wineconsole/curses.c
+2
-2
user.c
programs/wineconsole/user.c
+5
-5
wineconsole.c
programs/wineconsole/wineconsole.c
+8
-8
No files found.
programs/wineconsole/curses.c
View file @
78831ae9
...
...
@@ -339,7 +339,7 @@ static void WCCURSES_SetTitle(const struct inner_data* data)
{
WCHAR
wbuf
[
256
];
if
(
WINECON_GetConsoleTitle
(
data
->
hConIn
,
wbuf
,
ARRAY_SIZE
(
wbuf
)))
if
(
WINECON_GetConsoleTitle
(
data
->
console
,
wbuf
,
ARRAY_SIZE
(
wbuf
)))
{
char
buffer
[
256
];
...
...
@@ -965,7 +965,7 @@ static DWORD CALLBACK input_thread( void *arg )
else
numEvent
=
WCCURSES_FillSimpleChar
(
ir
,
inchar
);
if
(
numEvent
)
WriteConsoleInputW
(
data
->
hConIn
,
ir
,
numEvent
,
&
n
);
if
(
numEvent
)
WriteConsoleInputW
(
data
->
console
,
ir
,
numEvent
,
&
n
);
}
LeaveCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
}
...
...
programs/wineconsole/user.c
View file @
78831ae9
...
...
@@ -267,7 +267,7 @@ static void WCUSER_SetTitle(const struct inner_data* data)
{
WCHAR
buffer
[
256
];
if
(
WINECON_GetConsoleTitle
(
data
->
hConIn
,
buffer
,
sizeof
(
buffer
)))
if
(
WINECON_GetConsoleTitle
(
data
->
console
,
buffer
,
sizeof
(
buffer
)))
SetWindowTextW
(
data
->
hWnd
,
buffer
);
}
...
...
@@ -738,7 +738,7 @@ static void WCUSER_PasteFromClipboard(struct inner_data* data)
ir
[
1
]
=
ir
[
0
];
ir
[
1
].
Event
.
KeyEvent
.
bKeyDown
=
FALSE
;
WriteConsoleInputW
(
data
->
hConIn
,
ir
,
2
,
&
n
);
WriteConsoleInputW
(
data
->
console
,
ir
,
2
,
&
n
);
}
GlobalUnlock
(
h
);
}
...
...
@@ -1052,7 +1052,7 @@ static void WCUSER_GenerateKeyInputRecord(struct inner_data* data, BOOL down,
ir
.
Event
.
KeyEvent
.
uChar
.
UnicodeChar
=
last
;
/* FIXME: HACKY... and buggy because it should be a stack, not a single value */
if
(
!
down
)
last
=
0
;
WriteConsoleInputW
(
data
->
hConIn
,
&
ir
,
1
,
&
n
);
WriteConsoleInputW
(
data
->
console
,
&
ir
,
1
,
&
n
);
}
/******************************************************************
...
...
@@ -1068,7 +1068,7 @@ static void WCUSER_GenerateMouseInputRecord(struct inner_data* data, COORD c,
DWORD
mode
,
n
;
/* MOUSE_EVENTs shouldn't be sent unless ENABLE_MOUSE_INPUT is active */
if
(
!
GetConsoleMode
(
data
->
hConIn
,
&
mode
)
||
!
(
mode
&
ENABLE_MOUSE_INPUT
))
if
(
!
GetConsoleMode
(
data
->
console
,
&
mode
)
||
!
(
mode
&
ENABLE_MOUSE_INPUT
))
return
;
ir
.
EventType
=
MOUSE_EVENT
;
...
...
@@ -1083,7 +1083,7 @@ static void WCUSER_GenerateMouseInputRecord(struct inner_data* data, COORD c,
ir
.
Event
.
MouseEvent
.
dwControlKeyState
=
WCUSER_GetCtrlKeyState
(
keyState
);
ir
.
Event
.
MouseEvent
.
dwEventFlags
=
event
;
WriteConsoleInputW
(
data
->
hConIn
,
&
ir
,
1
,
&
n
);
WriteConsoleInputW
(
data
->
console
,
&
ir
,
1
,
&
n
);
}
/******************************************************************
...
...
programs/wineconsole/wineconsole.c
View file @
78831ae9
...
...
@@ -374,17 +374,17 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
if
(
data
->
curcfg
.
history_size
!=
cfg
->
history_size
)
{
data
->
curcfg
.
history_size
=
cfg
->
history_size
;
WINECON_SetHistorySize
(
data
->
hConIn
,
cfg
->
history_size
);
WINECON_SetHistorySize
(
data
->
console
,
cfg
->
history_size
);
}
if
(
data
->
curcfg
.
history_nodup
!=
cfg
->
history_nodup
)
{
data
->
curcfg
.
history_nodup
=
cfg
->
history_nodup
;
WINECON_SetHistoryMode
(
data
->
hConIn
,
cfg
->
history_nodup
);
WINECON_SetHistoryMode
(
data
->
console
,
cfg
->
history_nodup
);
}
if
(
data
->
curcfg
.
insert_mode
!=
cfg
->
insert_mode
)
{
data
->
curcfg
.
insert_mode
=
cfg
->
insert_mode
;
WINECON_SetInsertMode
(
data
->
hConIn
,
cfg
->
insert_mode
);
WINECON_SetInsertMode
(
data
->
console
,
cfg
->
insert_mode
);
}
data
->
curcfg
.
menu_mask
=
cfg
->
menu_mask
;
data
->
curcfg
.
quick_edit
=
cfg
->
quick_edit
;
...
...
@@ -511,7 +511,7 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
if
(
data
->
curcfg
.
edition_mode
!=
cfg
->
edition_mode
)
{
data
->
curcfg
.
edition_mode
=
cfg
->
edition_mode
;
WINECON_SetEditionMode
(
data
->
hConIn
,
cfg
->
edition_mode
);
WINECON_SetEditionMode
(
data
->
console
,
cfg
->
edition_mode
);
}
/* we now need to gather all events we got from the operations above,
* in order to get data correctly updated
...
...
@@ -553,14 +553,14 @@ static BOOL WINECON_GetServerConfig(struct inner_data* data)
struct
condrv_output_info
output_info
;
DWORD
mode
;
if
(
!
DeviceIoControl
(
data
->
hConIn
,
IOCTL_CONDRV_GET_INPUT_INFO
,
NULL
,
0
,
if
(
!
DeviceIoControl
(
data
->
console
,
IOCTL_CONDRV_GET_INPUT_INFO
,
NULL
,
0
,
&
input_info
,
sizeof
(
input_info
),
NULL
,
NULL
))
return
FALSE
;
data
->
curcfg
.
history_size
=
input_info
.
history_size
;
data
->
curcfg
.
history_nodup
=
input_info
.
history_mode
;
data
->
curcfg
.
edition_mode
=
input_info
.
edition_mode
;
GetConsoleMode
(
data
->
hConIn
,
&
mode
);
GetConsoleMode
(
data
->
console
,
&
mode
);
data
->
curcfg
.
insert_mode
=
(
mode
&
(
ENABLE_INSERT_MODE
|
ENABLE_EXTENDED_FLAGS
))
==
(
ENABLE_INSERT_MODE
|
ENABLE_EXTENDED_FLAGS
);
...
...
@@ -700,11 +700,11 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
memset
(
&
input_params
,
0
,
sizeof
(
input_params
));
input_params
.
mask
=
SET_CONSOLE_INPUT_INFO_WIN
;
input_params
.
info
.
win
=
condrv_handle
(
data
->
hWnd
);
ret
=
DeviceIoControl
(
data
->
hConIn
,
IOCTL_CONDRV_SET_INPUT_INFO
,
&
input_params
,
sizeof
(
input_params
),
ret
=
DeviceIoControl
(
data
->
console
,
IOCTL_CONDRV_SET_INPUT_INFO
,
&
input_params
,
sizeof
(
input_params
),
NULL
,
0
,
NULL
,
NULL
);
if
(
!
ret
)
goto
error
;
ret
=
DeviceIoControl
(
data
->
hConIn
,
IOCTL_CONDRV_SET_TITLE
,
(
void
*
)
appname
,
ret
=
DeviceIoControl
(
data
->
console
,
IOCTL_CONDRV_SET_TITLE
,
(
void
*
)
appname
,
lstrlenW
(
appname
)
*
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
);
if
(
!
ret
)
goto
error
;
...
...
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