/* Updating of data structures for redisplay.
-Copyright (C) 1985-1988, 1993-1995, 1997-2015 Free Software Foundation,
+Copyright (C) 1985-1988, 1993-1995, 1997-2016 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "syssignal.h"
#include "systime.h"
#include "tparam.h"
+#include "xwidget.h"
#ifdef HAVE_WINDOW_SYSTEM
#include TERM_HEADER
int width = w->total_cols;
double d = max (0, margin);
d = min (width / 2 - 1, d);
- return (int) ((double) total_glyphs / width * d);
+ /* Since MARGIN is positive, we cannot possibly have less than
+ one glyph for the marginal area. */
+ return max (1, (int) ((double) total_glyphs / width * d));
}
return 0;
}
clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end)
{
eassert (start <= end);
- eassert (start >= 0 && start < matrix->nrows);
+ eassert (start >= 0 && (start < matrix->nrows
+ /* matrix->nrows can be 0 for the initial frame. */
+ || (matrix->nrows == 0)));
eassert (end >= 0 && end <= matrix->nrows);
for (; start < end; ++start)
add_window_display_history (w, w->current_matrix->method, paused_p);
#endif
+ xwidget_end_redisplay (w, w->current_matrix);
clear_glyph_matrix (desired_matrix);
return paused_p;
break;
}
+#ifdef HAVE_XWIDGETS
+ /* Currently this seems needed to detect xwidget movement reliably. */
+ return 0;
+#endif
+
/* Give up if some rows in the desired matrix are not enabled. */
if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
return -1;
SECONDS may be a floating-point value, meaning that you can wait for a
fraction of a second. Optional second arg MILLISECONDS specifies an
additional wait period, in milliseconds; this is for backwards compatibility.
-(Not all operating systems support waiting for a fraction of a second.) */)
+\(Not all operating systems support waiting for a fraction of a second.) */)
(Lisp_Object seconds, Lisp_Object milliseconds)
{
double duration = extract_float (seconds);
doc: /* Name of the window system that Emacs uses for the first frame.
The value is a symbol:
nil for a termcap frame (a character-only terminal),
- 'x' for an Emacs frame that is really an X window,
- 'w32' for an Emacs frame that is a window on MS-Windows display,
- 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
- 'pc' for a direct-write MS-DOS frame.
+ `x' for an Emacs frame that is really an X window,
+ `w32' for an Emacs frame that is a window on MS-Windows display,
+ `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ `pc' for a direct-write MS-DOS frame.
Use of this variable as a boolean is deprecated. Instead,
use `display-graphic-p' or any of the other `display-*-p'
doc: /* Name of window system through which the selected frame is displayed.
The value is a symbol:
nil for a termcap frame (a character-only terminal),
- 'x' for an Emacs frame that is really an X window,
- 'w32' for an Emacs frame that is a window on MS-Windows display,
- 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
- 'pc' for a direct-write MS-DOS frame.
+ `x' for an Emacs frame that is really an X window,
+ `w32' for an Emacs frame that is a window on MS-Windows display,
+ `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ `pc' for a direct-write MS-DOS frame.
Use of this variable as a boolean is deprecated. Instead,
use `display-graphic-p' or any of the other `display-*-p'