From ab3d5b8b32821ea40ec93aa7804d4c75ae87c3db Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 26 Dec 2021 09:20:51 +0800 Subject: [PATCH] Don't clear internal border if frame isn't realized * src/pgtkterm.c (pgtk_clear_under_internal_border): Don't clear border if frame isn't realized. (bug#52705) --- src/pgtkterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 74a71b984c5..c6b56b271e8 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -4832,7 +4832,8 @@ pgtk_fill_rectangle (struct frame *f, unsigned long color, int x, int y, void pgtk_clear_under_internal_border (struct frame *f) { - if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) + if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0 + && gtk_widget_get_realized (FRAME_GTK_OUTER_WIDGET (f))) { int border = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); -- 2.39.2