Subject: bug#58424: [PATCH] Ensure emacs-pgtk does not get stuck after iconify-frame

From: समीर सिंह Sameer Singh <[email-masked]>
Date: Tue, 11 Oct 2022 06:14:13 +0530

On Tue, Oct 11, 2022 at 6:11 AM समीर सिंह Sameer Singh <
[email-masked]> wrote:

> steps to reproduce
> 1. configure emacs to use pgtk
> 2. emacs -Q
> 3. C-z or M-x iconify-frame
> 4. Restore emacs by clicking on its icon
> Emacs does not display characters any more.
>
> I believe this bug is similar to bug#42655 except this time it is for pgtk
> and not lucid.
>
> I believe I have fixed this problem and will attach a patch in the next
> mail, but the thing is I have no idea how I fixed it so please check for
> any unintended consequences.
>
> Thanks
>
From 95c5157430e807c43e731b6e696fe05fb31f2979 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0=20=E0=A4=B8=E0=A4=BF?=
 =?UTF-8?q?=E0=A4=82=E0=A4=B9=20Sameer=20Singh?= <[email-masked]>
Date: Tue, 11 Oct 2022 05:48:25 +0530
Subject: [PATCH] Ensure emacs-pgtk does not get stuck after iconify-frame
 (bug#58424)

* src/pgtkterm.c (pgtk_iconify_frame):
change visibilty of frame to 1.
---
 src/pgtkterm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 491ba33882..c9d74e089f 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -733,7 +733,7 @@ pgtk_iconify_frame (struct frame *f)
 	gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f));
 
       gtk_window_iconify (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
-      SET_FRAME_VISIBLE (f, 0);
+      SET_FRAME_VISIBLE (f, 1);
       SET_FRAME_ICONIFIED (f, true);
       unblock_input ();
       return;
-- 
2.37.3