From ce688f6737dd972d919da80f2f5870372cd08aab Mon Sep 17 00:00:00 2001 From: MarcoPolo-PasTonMolo Date: Sun, 2 Apr 2023 17:48:51 +0300 Subject: [PATCH] Fix empty window after reconnect Sometimes after a reconnect the current window would get cleared. This was a deliberate change to fix the profanity window looking all garbled up after providing the passphrase for a gpg key using pinentry-curses. Fixes https://github.com/profanity-im/profanity/issues/1556 --- src/event/server_events.c | 2 +- tests/unittests/ui/stub_ui.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index eb3e96e7..c1f11332 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -160,7 +160,7 @@ sv_ev_roster_received(void) // Redraw the screen after entry of the PGP secret key, but not init ProfWin* win = wins_get_current(); char* theme = prefs_get_string(PREF_THEME); - win_clear(win); + win_redraw(win); theme_init(theme); g_free(theme); ui_resize(); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index edd8c336..608f5003 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -1367,6 +1367,10 @@ void win_clear(ProfWin* window) { } +void +win_redraw(ProfWin* window) +{ +} char* win_to_string(ProfWin* window) {