/* Graphical user interface functions for the Microsoft Windows API.
-Copyright (C) 1989, 1992-2014 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#define IDC_HAND MAKEINTRESOURCE(32649)
#endif
-Lisp_Object Qundefined_color;
-Lisp_Object Qcancel_timer;
-Lisp_Object Qfont_param;
-Lisp_Object Qhyper;
-Lisp_Object Qsuper;
-Lisp_Object Qmeta;
-Lisp_Object Qalt;
-Lisp_Object Qctrl;
-Lisp_Object Qcontrol;
-Lisp_Object Qshift;
-static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes;
-
-
/* Prefix for system colors. */
#define SYSTEM_COLOR_PREFIX "System"
#define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1)
else
nlines = 0;
- if (nlines == 0)
- x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
- else
- {
- f->n_tool_bar_rows = 0;
- FRAME_TOOL_BAR_LINES (f) = nlines;
- adjust_frame_glyphs (f);
- SET_FRAME_GARBAGED (f);
- }
+ x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
}
/* Recalculate tool bar and frame text sizes. */
FRAME_TOOL_BAR_HEIGHT (f) = height;
FRAME_TOOL_BAR_LINES (f) = lines;
-/** FRAME_TEXT_HEIGHT (f) **/
-/** = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
-/** FRAME_LINES (f) **/
-/** = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
- /* Store the `tool-bar-lines' and `height' frame parameters. */
+ /* Store `tool-bar-lines' and `height' frame parameters. */
store_frame_param (f, Qtool_bar_lines, make_number (lines));
store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
Qtool_bar_lines);
+ /* adjust_frame_size might not have done anything, garbage frame
+ here. */
+ adjust_frame_glyphs (f);
+ SET_FRAME_GARBAGED (f);
if (FRAME_X_WINDOW (f))
x_clear_under_internal_border (f);
}
place the cursor there. Don't include the width of
this glyph. */
last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
- if (INTEGERP (last->object))
+ if (NILP (last->object))
row_width -= last->pixel_width;
}
else
Don't count that glyph. */
struct glyph *g = row->glyphs[TEXT_AREA];
- if (g->type == STRETCH_GLYPH && INTEGERP (g->object))
+ if (g->type == STRETCH_GLYPH && NILP (g->object))
{
row_width -= g->pixel_width;
seen_reversed_p = 1;
if (row->used[TEXT_AREA] && !row->reversed_p)
{
last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
- if (INTEGERP (last->object))
+ if (NILP (last->object))
row_width -= last->pixel_width;
}
}
/* Draw into the window. */
- w->must_be_updated_p = 1;
- update_single_window (w, 1);
+ w->must_be_updated_p = true;
+ update_single_window (w);
unblock_input ();
Lisp_Object absdoc_encoded = ENCODE_FILE (absdoc);
if (faccessat (AT_FDCWD, SSDATA (absdoc_encoded), F_OK, AT_EACCESS) == 0)
- document = absdoc_encoded;
+ {
+ /* ShellExecute fails if DOCUMENT is a UNC with forward
+ slashes (expand-file-name above converts all backslashes
+ to forward slashes). Now that we know DOCUMENT is a
+ file, we can mirror all forward slashes into backslashes. */
+ unixtodos_filename (SSDATA (absdoc_encoded));
+ document = absdoc_encoded;
+ }
else
document = ENCODE_FILE (document);
}
/* Notify input thread about new hot-key definition, so that it
takes effect without needing to switch focus. */
PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY,
- (WPARAM) XLI (key), 0);
+ (WPARAM) XINT (key), 0);
}
return key;