/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1989, 1993-2015 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-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 "composite.h"
#include "frame.h"
#include "dispextern.h"
+#include "xwidget.h"
#include "fontset.h"
#include "termhooks.h"
#include "termopts.h"
Lisp_Object acc = Qnil;
int count = SPECPDL_INDEX ();
- Fredisplay (Qt);
+ specbind (Qredisplay_dont_pause, Qt);
+ redisplay_preserve_echo_area (31);
f = XFRAME (XCAR (frames));
frames = XCDR (frames);
cr = cairo_create (surface);
cairo_surface_destroy (surface);
record_unwind_protect (x_cr_destroy, make_save_ptr (cr));
- unblock_input ();
while (1)
{
- QUIT;
-
- block_input ();
x_free_cr_resources (f);
FRAME_CR_CONTEXT (f) = cr;
x_clear_area (f, 0, 0, width, height);
expose_frame (f, 0, 0, width, height);
FRAME_CR_CONTEXT (f) = NULL;
- unblock_input ();
if (NILP (frames))
break;
- block_input ();
cairo_surface_show_page (surface);
f = XFRAME (XCAR (frames));
frames = XCDR (frames);
height = FRAME_PIXEL_HEIGHT (f);
if (surface_set_size_func)
(*surface_set_size_func) (surface, width, height);
+
unblock_input ();
+ QUIT;
+ block_input ();
}
#ifdef CAIRO_HAS_PNG_FUNCTIONS
if (surface_type == CAIRO_SURFACE_TYPE_IMAGE)
{
- block_input ();
cairo_surface_flush (surface);
cairo_surface_write_to_png_stream (surface, x_cr_accumulate_data, &acc);
- unblock_input ();
}
#endif
+ unblock_input ();
+
unbind_to (count, Qnil);
return CALLN (Fapply, intern ("concat"), Fnreverse (acc));
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
Display *display = FRAME_X_DISPLAY (f);
- Window window = FRAME_X_WINDOW (f);
GC gc = f->output_data.x->normal_gc;
struct face *face = p->face;
#else /* not USE_CAIRO */
if (p->which)
{
+ Window window = FRAME_X_WINDOW (f);
char *bits;
Pixmap pixmap, clipmask = (Pixmap) 0;
int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f));
x_draw_image_glyph_string (s);
break;
+ case XWIDGET_GLYPH:
+ x_draw_xwidget_glyph_string (s);
+ break;
+
case STRETCH_GLYPH:
x_draw_stretch_glyph_string (s);
break;
/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable.
If they are <= 0, this is probably an error. */
-static void
+static ATTRIBUTE_UNUSED void
x_clear_area1 (Display *dpy, Window window,
int x, int y, int width, int height, int exposures)
{
XClearArea (dpy, window, x, y, width, height, exposures);
}
-
void
x_clear_area (struct frame *f, int x, int y, int width, int height)
{
if (cursor_glyph == NULL)
return;
+ /* Experimental avoidance of cursor on xwidget. */
+ if (cursor_glyph->type == XWIDGET_GLYPH)
+ return;
+
/* If on an image, draw like a normal cursor. That's usually better
visible than drawing a bar, esp. if the image is large so that
the bar might not be in the window. */
cancel_mouse_face (f);
unblock_input ();
+
+ do_pending_window_change (false);
}
/* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */