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
ead22121
Commit
ead22121
authored
Mar 23, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 23, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started implementing event reduction.
parent
7e00f874
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
wineconsole.c
programs/wineconsole/wineconsole.c
+39
-2
No files found.
programs/wineconsole/wineconsole.c
View file @
ead22121
...
...
@@ -196,8 +196,8 @@ BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len)
*/
int
WINECON_GrabChanges
(
struct
inner_data
*
data
)
{
struct
console_renderer_event
evts
[
1
6
];
int
i
,
num
;
struct
console_renderer_event
evts
[
25
6
];
int
i
,
num
,
curs
=
-
1
;
HANDLE
h
;
SERVER_START_REQ
(
get_console_renderer_events
)
...
...
@@ -211,6 +211,43 @@ int WINECON_GrabChanges(struct inner_data* data)
if
(
!
num
)
{
Trace
(
0
,
"hmm renderer signaled but no events available
\n
"
);
return
1
;}
/* FIXME: should do some event compression here (cursor pos, update) */
/* step 1: keep only last cursor pos event */
for
(
i
=
num
-
1
;
i
>=
0
;
i
--
)
{
if
(
evts
[
i
].
event
==
CONSOLE_RENDERER_CURSOR_POS_EVENT
)
{
if
(
curs
==
-
1
)
curs
=
i
;
else
{
memmove
(
&
evts
[
i
],
&
evts
[
i
+
1
],
(
num
-
i
-
1
)
*
sizeof
(
evts
[
0
]));
num
--
;
}
}
}
/* step 2: manage update events */
for
(
i
=
0
;
i
<
num
-
1
;
i
++
)
{
if
(
evts
[
i
].
event
==
CONSOLE_RENDERER_UPDATE_EVENT
&&
evts
[
i
+
1
].
event
==
CONSOLE_RENDERER_UPDATE_EVENT
)
{
/* contiguous */
if
(
evts
[
i
].
u
.
update
.
bottom
+
1
==
evts
[
i
+
1
].
u
.
update
.
top
)
{
evts
[
i
].
u
.
update
.
bottom
=
evts
[
i
+
1
].
u
.
update
.
bottom
;
memmove
(
&
evts
[
i
+
1
],
&
evts
[
i
+
2
],
(
num
-
i
-
2
)
*
sizeof
(
evts
[
0
]));
num
--
;
i
--
;
}
/* already handled cases */
else
if
(
evts
[
i
].
u
.
update
.
top
<=
evts
[
i
+
1
].
u
.
update
.
top
&&
evts
[
i
].
u
.
update
.
bottom
>=
evts
[
i
+
1
].
u
.
update
.
bottom
)
{
memmove
(
&
evts
[
i
+
1
],
&
evts
[
i
+
2
],
(
num
-
i
-
2
)
*
sizeof
(
evts
[
0
]));
num
--
;
i
--
;
}
}
}
Trace
(
1
,
"Change notification:"
);
for
(
i
=
0
;
i
<
num
;
i
++
)
{
...
...
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