From a40474fa18b1c3a8cd95719328420f7a8e6b7682 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 14 Oct 2020 19:57:02 +0200 Subject: [PATCH] server: Remove no longer needed console_input_events_append. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- server/console.c | 55 +----------------------------------------------- 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/server/console.c b/server/console.c index 9bcacff2c67..2df9ab17bf5 100644 --- a/server/console.c +++ b/server/console.c @@ -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;