Subject: Re: bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs

From: Gerd Möllmann <[email-masked]>
Date: Thu, 30 Jan 2025 21:51:17 +0100

martin rudalics <[email-masked]> writes:

> I attach my latest achievements both in the menu bar and mouse drag
> child frame departments.  

Please find a patch attached that makes it build without window-system,
which also shows that internal borders are new in the tty world.

>From 3300c540eb4d94701af9f7dedb1b3bf7f9100553 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= <[email-masked]>
Date: Thu, 30 Jan 2025 21:45:03 +0100
Subject: [PATCH] Make it compile without window system

---
 src/frame.c |  4 ++--
 src/frame.h | 29 +++++++++++++++--------------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/frame.c b/src/frame.c
index 23cf096ed30..022936c5699 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2859,7 +2859,7 @@ DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
   return delete_frame (frame, !NILP (force) ? Qt : Qnil);
 }
 
-#ifdef HAVE_WINDOW_SYSTEM
+
 /**
  * frame_internal_border_part:
  *
@@ -2951,7 +2951,7 @@ frame_internal_border_part (struct frame *f, int x, int y)
 
   return part;
 }
-#endif
+
 
 /* Return mouse position in character cell units.  */
 
diff --git a/src/frame.h b/src/frame.h
index 90524e5eb2b..e2f0a2dd754 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -31,6 +31,19 @@ #define EMACS_FRAME_H
   vertical_scroll_bar_right
 };
 
+enum internal_border_part
+  {
+   INTERNAL_BORDER_NONE,
+   INTERNAL_BORDER_LEFT_EDGE,
+   INTERNAL_BORDER_TOP_LEFT_CORNER,
+   INTERNAL_BORDER_TOP_EDGE,
+   INTERNAL_BORDER_TOP_RIGHT_CORNER,
+   INTERNAL_BORDER_RIGHT_EDGE,
+   INTERNAL_BORDER_BOTTOM_RIGHT_CORNER,
+   INTERNAL_BORDER_BOTTOM_EDGE,
+   INTERNAL_BORDER_BOTTOM_LEFT_CORNER,
+  };
+
 #ifdef HAVE_WINDOW_SYSTEM
 
 enum fullscreen_type
@@ -53,19 +66,6 @@ #define EMACS_FRAME_H
   z_group_above_suspended,
 };
 
-enum internal_border_part
-  {
-   INTERNAL_BORDER_NONE,
-   INTERNAL_BORDER_LEFT_EDGE,
-   INTERNAL_BORDER_TOP_LEFT_CORNER,
-   INTERNAL_BORDER_TOP_EDGE,
-   INTERNAL_BORDER_TOP_RIGHT_CORNER,
-   INTERNAL_BORDER_RIGHT_EDGE,
-   INTERNAL_BORDER_BOTTOM_RIGHT_CORNER,
-   INTERNAL_BORDER_BOTTOM_EDGE,
-   INTERNAL_BORDER_BOTTOM_LEFT_CORNER,
-  };
-
 #ifdef NS_IMPL_COCOA
 enum ns_appearance_type
   {
@@ -1848,6 +1848,8 @@ #define FRAME_SMALLEST_FONT_HEIGHT(f)		\
 				Frame Parameters
  ***********************************************************************/
 
+extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y);
+
 #ifdef HAVE_WINDOW_SYSTEM
 
 /* The class of this X application.  */
@@ -1893,7 +1895,6 @@ #define EMACS_CLASS "Emacs"
 extern void set_frame_menubar (struct frame *f, bool deep_p);
 extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 extern void free_frame_menubar (struct frame *);
-extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y);
 
 #if defined HAVE_X_WINDOWS
 extern void x_wm_set_icon_position (struct frame *, int, int);
-- 
2.48.1