old_font = SelectObject (s->hdc, FONT_HANDLE (font));
for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++)
+ /* TAB in a composition means display glyphs with padding
+ space on the left or right. */
if (COMPOSITION_GLYPH (s->cmp, j) != '\t')
{
int xx = x + s->cmp->offsets[j * 2];
Nominally, highlight colors for `3d' faces are calculated by
brightening an object's color by a constant scale factor, but this
- doesn't yield good results for dark colors, so for colors who's
+ doesn't yield good results for dark colors, so for colors whose
brightness is less than this value (on a scale of 0-255) have to
use an additional additive factor.
static void
w32_draw_relief_rect (struct frame *f,
- int left_x, int top_y, int right_x, int bottom_y, int width,
- int raised_p, int top_p, int bot_p, int left_p, int right_p,
+ int left_x, int top_y, int right_x, int bottom_y,
+ int width, int raised_p,
+ int top_p, int bot_p, int left_p, int right_p,
RECT *clip_rect)
{
int i;
if (s->hl == DRAW_IMAGE_SUNKEN
|| s->hl == DRAW_IMAGE_RAISED)
{
- thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
+ thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief
+ : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
raised_p = s->hl == DRAW_IMAGE_RAISED;
}
else
/* Handle mouse button event on the tool-bar of frame F, at
frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress
- or ButtonRelase. */
+ or ButtonRelease. */
static void
w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event)
/* Create a scroll bar and return the scroll bar vector for it. W is
the Emacs window on which to create the scroll bar. TOP, LEFT,
- WIDTH and HEIGHT are.the pixel coordinates and dimensions of the
+ WIDTH and HEIGHT are the pixel coordinates and dimensions of the
scroll bar. */
static struct scroll_bar *
si.fMask = SIF_POS;
si.nPos = y;
/* Remember apparent position (we actually lag behind the real
- position, so don't set that directly. */
+ position, so don't set that directly). */
last_scroll_bar_drag_pos = y;
SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, FALSE);
}
/* If window has been obscured or exposed by another window
- being maximised or minimised/restored, then recheck
+ being maximized or minimized/restored, then recheck
visibility of all frames. Direct changes to our own
windows get handled by WM_SIZE. */
#if 0
pending_autoraise_frame = 0;
}
- /* Check which frames are still visisble, if we have enqueued any user
+ /* Check which frames are still visible, if we have enqueued any user
events or been notified of events that may affect visibility. We
do this here because there doesn't seem to be any direct
notification from Windows that the visibility of a window has
x_catch_errors_unwind (old_val)
x_check_errors (dpy, format)
x_fully_uncatch_errors ()
-x_catching_errors ()
x_had_errors_p (dpy)
x_clear_errors (dpy)
x_uncatch_errors (dpy, count)
input focus anyway (so the window with focus will never be
completely obscured) - if not, then just moving the mouse over it
is sufficient to give it focus. On Windows, the user must actually
- click on the frame (preferrably the title bar so as not to move
+ click on the frame (preferably the title bar so as not to move
point), which is more awkward. Also, no other Windows program
raises a window to the top but leaves another window (possibly now
completely obscured) with input focus.
f->output_data.w32->asked_for_visible = 1;
- /* The first of these seems to give more expected behavior, but
- was added as a commented out line in Sept 1997, with the
- second version remaining uncommented. There may have been
- some problem with it that led to it not being enabled,
- so the old version remains commented out below in case we
- decide we need to go back to it [23.0.60 2008-06-09]. */
+ /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL
+ causes unexpected behavior when unminimizing frames that were
+ previously maximized. But only SW_SHOWNORMAL works properly for
+ frames that were truely hidden (using make-frame-invisible), so
+ we need it to avoid Bug#5482. It seems that async_iconified
+ is only set for minimized windows that are still visible, so
+ use that to determine the appropriate flag to pass ShowWindow. */
my_show_window (f, FRAME_W32_WINDOW (f),
- f->async_iconified ? SW_RESTORE : SW_SHOW);
- /* my_show_window (f, FRAME_W32_WINDOW (f), SW_SHOWNORMAL); */
+ f->async_iconified ? SW_RESTORE : SW_SHOWNORMAL);
}
/* Synchronize to ensure Emacs knows the frame is visible
dpyinfo->has_palette = GetDeviceCaps (hdc, RASTERCAPS) & RC_PALETTE;
ReleaseDC (NULL, hdc);
- /* initialise palette with white and black */
+ /* initialize palette with white and black */
{
XColor color;
w32_defined_color (0, "white", &color, 1);