void
haiku_change_tab_bar_height (struct frame *f, int height)
{
- int unit, old_height, lines;
- Lisp_Object fullscreen;
-
- unit = FRAME_LINE_HEIGHT (f);
- old_height = FRAME_TAB_BAR_HEIGHT (f);
- fullscreen = get_frame_param (f, Qfullscreen);
+ int unit = FRAME_LINE_HEIGHT (f);
+ int old_height = FRAME_TAB_BAR_HEIGHT (f);
/* This differs from the tool bar code in that the tab bar height is
not rounded up. Otherwise, if redisplay_tab_bar decides to grow
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 x_set_font. (bug#59285) */
- lines = height / unit;
+ int lines = height / unit;
+ if (lines == 0 && height != 0)
+ lines = 1;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);
if (!f->tab_bar_resized)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
/* As long as tab_bar_resized is false, effectively try to change
F's native height. */
if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
void
ns_change_tab_bar_height (struct frame *f, int height)
{
- int unit, old_height, lines;
- Lisp_Object fullscreen;
-
- unit = FRAME_LINE_HEIGHT (f);
- old_height = FRAME_TAB_BAR_HEIGHT (f);
- fullscreen = get_frame_param (f, Qfullscreen);
+ int unit = FRAME_LINE_HEIGHT (f);
+ int old_height = FRAME_TAB_BAR_HEIGHT (f);
/* This differs from the tool bar code in that the tab bar height is
not rounded up. Otherwise, if redisplay_tab_bar decides to grow
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 x_set_font. (bug#59285) */
- lines = height / unit;
+ int lines = height / unit;
+ if (lines == 0 && height != 0)
+ lines = 1;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);
if (!f->tab_bar_resized)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
/* As long as tab_bar_resized is false, effectively try to change
F's native height. */
if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
void
pgtk_change_tab_bar_height (struct frame *f, int height)
{
- int unit, old_height, lines;
- Lisp_Object fullscreen;
-
- unit = FRAME_LINE_HEIGHT (f);
- old_height = FRAME_TAB_BAR_HEIGHT (f);
- fullscreen = get_frame_param (f, Qfullscreen);
+ int unit = FRAME_LINE_HEIGHT (f);
+ int old_height = FRAME_TAB_BAR_HEIGHT (f);
/* This differs from the tool bar code in that the tab bar height is
not rounded up. Otherwise, if redisplay_tab_bar decides to grow
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 x_set_font. (bug#59285) */
- lines = height / unit;
+ int lines = height / unit;
+ if (lines == 0 && height != 0)
+ lines = 1;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);
if (!f->tab_bar_resized)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
/* As long as tab_bar_resized is false, effectively try to change
F's native height. */
if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
void
w32_change_tab_bar_height (struct frame *f, int height)
{
- int unit, old_height, lines;
- Lisp_Object fullscreen;
-
- unit = FRAME_LINE_HEIGHT (f);
- old_height = FRAME_TAB_BAR_HEIGHT (f);
- fullscreen = get_frame_param (f, Qfullscreen);
+ int unit = FRAME_LINE_HEIGHT (f);
+ int old_height = FRAME_TAB_BAR_HEIGHT (f);
/* This differs from the tool bar code in that the tab bar height is
not rounded up. Otherwise, if redisplay_tab_bar decides to grow
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 x_set_font. (bug#59285) */
- lines = height / unit;
+ int lines = height / unit;
+ if (lines == 0 && height != 0)
+ lines = 1;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);
if (!f->tab_bar_resized)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
/* As long as tab_bar_resized is false, effectively try to change
F's native height. */
if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
void
x_change_tab_bar_height (struct frame *f, int height)
{
- int unit, old_height, lines;
- Lisp_Object fullscreen;
-
- unit = FRAME_LINE_HEIGHT (f);
- old_height = FRAME_TAB_BAR_HEIGHT (f);
- fullscreen = get_frame_param (f, Qfullscreen);
+ int unit = FRAME_LINE_HEIGHT (f);
+ int old_height = FRAME_TAB_BAR_HEIGHT (f);
/* This differs from the tool bar code in that the tab bar height is
not rounded up. Otherwise, if redisplay_tab_bar decides to grow
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 x_set_font. (bug#59285) */
- lines = height / unit;
+ int lines = height / unit;
+ if (lines == 0 && height != 0)
+ lines = 1;
/* Make sure we redisplay all windows in this frame. */
fset_redisplay (f);
if (!f->tab_bar_resized)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
/* As long as tab_bar_resized is false, effectively try to change
F's native height. */
if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))