emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 47755303576: Prevent tab bar from vanishing on Android


From: Po Lu
Subject: master 47755303576: Prevent tab bar from vanishing on Android
Date: Thu, 23 Nov 2023 02:05:52 -0500 (EST)

branch: master
commit 47755303576d56bda581637c3d474b249c8dac49
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Prevent tab bar from vanishing on Android
    
    * src/androidfns.c (android_change_tab_bar_height): Amend with
    code absent when the function was first transcribed.
    
    * src/haikufns.c (haiku_change_tab_bar_height):
    
    * src/nsfns.m (ns_change_tab_bar_height):
    
    * src/pgtkfns.c (pgtk_change_tab_bar_height):
    
    * src/w32fns.c (w32_change_tab_bar_height):
    
    * src/xfns.c (x_change_tab_bar_height): Revise commentary.
---
 src/androidfns.c | 8 ++++++++
 src/haikufns.c   | 5 +++++
 src/nsfns.m      | 5 +++++
 src/pgtkfns.c    | 5 +++++
 src/w32fns.c     | 5 +++++
 src/xfns.c       | 5 +++++
 6 files changed, 33 insertions(+)

diff --git a/src/androidfns.c b/src/androidfns.c
index aeba9d897ad..31a4924e34d 100644
--- a/src/androidfns.c
+++ b/src/androidfns.c
@@ -367,8 +367,16 @@ android_change_tab_bar_height (struct frame *f, int height)
      the tab bar by even 1 pixel, FRAME_TAB_BAR_LINES will be changed,
      leading to the tab bar height being incorrectly set upon the next
      call to android_set_font.  (bug#59285) */
+
   lines = height / unit;
 
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
+  if (lines == 0 && height != 0)
+    lines = 1;
+
   /* Make sure we redisplay all windows in this frame.  */
   fset_redisplay (f);
 
diff --git a/src/haikufns.c b/src/haikufns.c
index 8028a73abd1..e6b1f618d5b 100644
--- a/src/haikufns.c
+++ b/src/haikufns.c
@@ -184,6 +184,11 @@ haiku_change_tab_bar_height (struct frame *f, int height)
      leading to the tab bar height being incorrectly set upon the next
      call to x_set_font.  (bug#59285) */
   int lines = height / unit;
+
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
   if (lines == 0 && height != 0)
     lines = 1;
 
diff --git a/src/nsfns.m b/src/nsfns.m
index 038a3fa23ad..33c6020ad51 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -641,6 +641,11 @@ ns_change_tab_bar_height (struct frame *f, int height)
      leading to the tab bar height being incorrectly set upon the next
      call to x_set_font.  (bug#59285) */
   int lines = height / unit;
+
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
   if (lines == 0 && height != 0)
     lines = 1;
 
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index c154d37f47f..13ac61de960 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -475,6 +475,11 @@ pgtk_change_tab_bar_height (struct frame *f, int height)
      leading to the tab bar height being incorrectly set upon the next
      call to x_set_font.  (bug#59285) */
   int lines = height / unit;
+
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
   if (lines == 0 && height != 0)
     lines = 1;
 
diff --git a/src/w32fns.c b/src/w32fns.c
index 07b389df84a..01644eff826 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1732,6 +1732,11 @@ w32_change_tab_bar_height (struct frame *f, int height)
      leading to the tab bar height being incorrectly set upon the next
      call to x_set_font.  (bug#59285) */
   int lines = height / unit;
+
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
   if (lines == 0 && height != 0)
     lines = 1;
 
diff --git a/src/xfns.c b/src/xfns.c
index 0b1e94af9f0..eadf46b44c4 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1792,6 +1792,11 @@ x_change_tab_bar_height (struct frame *f, int height)
      leading to the tab bar height being incorrectly set upon the next
      call to x_set_font.  (bug#59285) */
   int lines = height / unit;
+
+  /* Even so, HEIGHT might be less than unit if the tab bar face is
+     not so tall as the frame's font height; which if true lines will
+     be set to 0 and the tab bar will thus vanish.  */
+
   if (lines == 0 && height != 0)
     lines = 1;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]