From: martin rudalics <rudalics@gmx.at>
To: mwd@cert.org, 19619@debbugs.gnu.org
Subject: bug#19619: 25.0.50; Fullheight frames in daemonized emacsen are wrong width
Date: Fri, 16 Jan 2015 18:55:25 +0100 [thread overview]
Message-ID: <54B9508D.8040609@gmx.at> (raw)
In-Reply-To: <tnt387a7hgu.fsf@watermonitor.yellow.cert.org>
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
> echo "(setq default-frame-alist '((fullscreen . fullheight)))" > /tmp/foo.el
> emacs -Q --daemon -l /tmp/foo.el
> emacsclient -c -n
>
> Using the above recipe, I get a frame width of 78 characters instead of
> 80 characters. The information from (window--frame-dump) is as follows:
Thanks. I haven't looked into your recipe yet. Does the attached patch
improve anything? If it doesn't apply right away just tell me and don't
bother any further. I'm working on this problem currently and have
found a couple of related issues.
martin
[-- Attachment #2: fullscreen.diff --]
[-- Type: text/plain, Size: 4985 bytes --]
diff --git a/lisp/frame.el b/lisp/frame.el
index 1d5bbf2..c18e4be 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -152,10 +152,13 @@ get_frame_param (register struct frame *frame, Lisp_Object prop)
bool
frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter)
{
+ Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
+
return (EQ (frame_inhibit_implied_resize, Qt)
|| (CONSP (frame_inhibit_implied_resize)
&& !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
- || !NILP (get_frame_param (f, Qfullscreen))
+ || (horizontal && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullheight))
+ || (!horizontal && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullwidth))
|| FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
}
@@ -1009,7 +1012,8 @@ affects all frames on the same terminal device. */)
{
int width, height;
get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
- adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), 5, 0, Qnil);
+ adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f),
+ 5, 0, Qterminal_frame);
}
adjust_frame_glyphs (f);
@@ -3207,14 +3211,14 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
that here since otherwise a size change implied by an
intermittent font change may get lost as in Bug#17142. */
if (!width_change)
- width = (f->new_width
+ width = ((f->can_x_set_window_size && f->new_width)
? (f->new_pixelwise
? f->new_width
: (f->new_width * FRAME_COLUMN_WIDTH (f)))
: FRAME_TEXT_WIDTH (f));
if (!height_change)
- height = (f->new_height
+ height = ((f->can_x_set_window_size && f->new_height)
? (f->new_pixelwise
? f->new_height
: (f->new_height * FRAME_LINE_HEIGHT (f)))
@@ -4828,6 +4832,8 @@ syms_of_frame (void)
DEFSYM (Qset_window_configuration, "set-window-configuration");
DEFSYM (Qx_create_frame_1, "x-create-frame-1");
DEFSYM (Qx_create_frame_2, "x-create-frame-2");
+ DEFSYM (Qtip_frame, "tip-frame");
+ DEFSYM (Qterminal_frame, "terminal-frame");
#ifdef HAVE_NS
DEFSYM (Qns_parse_geometry, "ns-parse-geometry");
diff --git a/src/w32fns.c b/src/w32fns.c
index 2dd92ff..1db47f2 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1745,7 +1745,8 @@ x_change_tool_bar_height (struct frame *f, int height)
f->n_tool_bar_rows = 0;
adjust_frame_size (f, -1, -1,
- (!f->tool_bar_redisplayed_once ? 1
+ ((!f->tool_bar_redisplayed_once
+ && NILP (get_frame_param (f, Qfullscreen))) ? 1
: (old_height == 0 || height == 0) ? 2
: 4),
0, Qtool_bar_lines);
@@ -5786,7 +5787,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
SET_FRAME_COLS (f, 0);
SET_FRAME_LINES (f, 0);
adjust_frame_size (f, width * FRAME_COLUMN_WIDTH (f),
- height * FRAME_LINE_HEIGHT (f), 0, 1, Qnil);
+ height * FRAME_LINE_HEIGHT (f), 0, 1, Qtip_frame);
/* Add `tooltip' frame parameter's default value. */
if (NILP (Fframe_parameter (frame, Qtooltip)))
diff --git a/src/xfns.c b/src/xfns.c
index 936c769..c1a9e6c 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1079,7 +1079,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
void
x_change_tool_bar_height (struct frame *f, int height)
{
-#ifdef USE_GTK
+#if defined (USE_GTK) || defined (HAVE_NS)
FRAME_TOOL_BAR_LINES (f) = 0;
FRAME_TOOL_BAR_HEIGHT (f) = 0;
if (height)
@@ -1100,6 +1100,7 @@ x_change_tool_bar_height (struct frame *f, int height)
int unit = FRAME_LINE_HEIGHT (f);
int old_height = FRAME_TOOL_BAR_HEIGHT (f);
int lines = (height + unit - 1) / unit;
+ Lisp_Object fullscreen;
/* Make sure we redisplay all windows in this frame. */
windows_or_buffers_changed = 60;
@@ -1131,7 +1132,10 @@ x_change_tool_bar_height (struct frame *f, int height)
f->n_tool_bar_rows = 0;
adjust_frame_size (f, -1, -1,
- (!f->tool_bar_redisplayed_once ? 1
+ ((!f->tool_bar_redisplayed_once
+ && (NILP (fullscreen =
+ get_frame_param (f, Qfullscreen))
+ || EQ (fullscreen, Qfullwidth))) ? 1
: (old_height == 0 || height == 0) ? 2
: 4),
0, Qtool_bar_lines);
diff --git a/src/xterm.c b/src/xterm.c
index 3955d02..971f342 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9343,13 +9343,22 @@ x_check_fullscreen (struct frame *f)
break;
case FULLSCREEN_WIDTH:
width = x_display_pixel_width (dpyinfo);
- break;
+ height = height + FRAME_MENUBAR_HEIGHT (f);
+ break;
case FULLSCREEN_HEIGHT:
height = x_display_pixel_height (dpyinfo);
}
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
+
+ if (FRAME_VISIBLE_P (f))
+ x_wait_for_event (f, ConfigureNotify);
+ else
+ {
+ change_frame_size (f, width, height, false, true, false, true);
+ x_sync (f);
+ }
}
}
next prev parent reply other threads:[~2015-01-16 17:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 17:39 bug#19619: 25.0.50; Fullheight frames in daemonized emacsen are wrong width Michael Welsh Duggan
2015-01-16 17:55 ` martin rudalics [this message]
2015-01-16 18:16 ` Michael Welsh Duggan
2015-01-16 18:47 ` martin rudalics
2015-02-07 19:26 ` martin rudalics
2015-02-08 5:54 ` Michael Welsh Duggan
2015-02-08 20:29 ` Stephen Berman
2015-02-09 9:31 ` martin rudalics
2015-02-09 12:26 ` Stephen Berman
2015-02-09 18:41 ` martin rudalics
2015-02-10 10:13 ` Stephen Berman
2015-02-13 18:30 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B9508D.8040609@gmx.at \
--to=rudalics@gmx.at \
--cc=19619@debbugs.gnu.org \
--cc=mwd@cert.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.