server: Remove no longer needed console_input_events_append.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-10-14 19:57:02 +02:00 committed by Alexandre Julliard
parent 9df7a2efc3
commit a40474fa18
1 changed files with 1 additions and 54 deletions

View File

@ -470,52 +470,6 @@ static int get_renderer_events( struct console_input_events* evts, struct async
return 1;
}
/* add an event to the console's renderer events list */
static void console_input_events_append( struct console_input* console,
struct condrv_renderer_event* evt)
{
struct console_input_events* evts;
int collapsed = FALSE;
struct async *async;
if (!(evts = console->evt)) return;
/* to be done even when evt has been generated by the renderer ? */
/* try to collapse evt into current queue's events */
if (evts->num_used)
{
struct condrv_renderer_event* last = &evts->events[evts->num_used - 1];
if (last->event == CONSOLE_RENDERER_UPDATE_EVENT &&
evt->event == CONSOLE_RENDERER_UPDATE_EVENT)
{
/* if two update events overlap, collapse them into a single one */
if (last->u.update.bottom + 1 >= evt->u.update.top &&
evt->u.update.bottom + 1 >= last->u.update.top)
{
last->u.update.top = min(last->u.update.top, evt->u.update.top);
last->u.update.bottom = max(last->u.update.bottom, evt->u.update.bottom);
collapsed = TRUE;
}
}
}
if (!collapsed)
{
if (evts->num_used == evts->num_alloc)
{
evts->num_alloc += 16;
evts->events = realloc( evts->events, evts->num_alloc * sizeof(*evt) );
assert(evts->events);
}
evts->events[evts->num_used++] = *evt;
}
while (evts->num_used && (async = find_pending_async( &evts->read_q )))
{
get_renderer_events( evts, async );
release_object( async );
}
}
static struct object *create_console_input_events(void)
{
struct console_input_events* evt;
@ -680,14 +634,7 @@ int free_console( struct process *process )
if (!console) return 0;
process->console = NULL;
if (--console->num_proc == 0 && console->renderer)
{
/* all processes have terminated... tell the renderer to terminate too */
struct condrv_renderer_event evt;
evt.event = CONSOLE_RENDERER_EXIT_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
console_input_events_append( console, &evt );
}
console->num_proc--;
release_object( console );
return 1;