Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
844794c8
Commit
844794c8
authored
Jan 25, 2010
by
Jan Djärv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfns.c (Fx_create_frame): If frame height i stoo big, try
sizes 24 and 10. Bug #3643.
parent
a4cf170d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
src/ChangeLog
src/ChangeLog
+5
-0
src/xfns.c
src/xfns.c
+17
-9
No files found.
src/ChangeLog
View file @
844794c8
2010-01-25 Jan Djärv <jan.h.d@swipnet.se>
* xfns.c (Fx_create_frame): If frame height i stoo big, try
sizes 24 and 10. Bug #3643.
2010-01-20 Kenichi Handa <handa@m17n.org>
* coding.c (consume_chars): If ! multibyte and the encoder is ccl,
...
...
src/xfns.c
View file @
844794c8
...
...
@@ -3518,27 +3518,35 @@ This function is an internal primitive--use `make-frame' instead. */)
window_prompting = x_figure_window_size (f, parms, 1);
/* Don't make height higher than display height unless the user asked
for it. */
for it.
Try sizes 24 and 10 if current is too large.
*/
height = FRAME_LINES (f);
tem = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER);
if (EQ (tem, Qunbound))
{
int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f));
int h = FRAME_LINES (f) + FRAME_TOOL_BAR_LINES (f)
+ FRAME_MENU_BAR_LINES (f) + 2;
int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h);
int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f));
static int tryheight[] = { 24, 10, 0 } ;
int i;
ph += (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0) /* Gtk toolbar size */
+ (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0); /* Arbitrary */
/* Some desktops have fixed menus above and/or panels below. Try to
figure out the usable size we have for emacs. */
current_desktop = x_get_current_desktop (f);
x_get_desktop_workarea (f, current_desktop, &deskw, &deskh);
if (deskh > 0 && deskh < dph) dph = deskh;
if (ph > dph)
/* Allow 40 pixels for manager decorations. */
for (i = 0; ph+40 > dph && tryheight[i] != 0; ++i)
{
height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, dph) -
FRAME_TOOL_BAR_LINES (f) - FRAME_MENU_BAR_LINES (f);
if (FRAME_EXTERNAL_TOOL_BAR (f))
height -= 2; /* We can't know how big it will be. */
if (FRAME_EXTERNAL_MENU_BAR (f))
height -= 2; /* We can't know how big it will be. */
height = tryheight[i];
h = height + FRAME_TOOL_BAR_LINES (f) + FRAME_MENU_BAR_LINES (f) + 2;
ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h)
+ (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0)
+ (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment