]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix visual-bell on X
authorYuuki Harano <masm+github@masm11.me>
Mon, 11 Jan 2021 10:56:32 +0000 (19:56 +0900)
committerYuuki Harano <masm+github@masm11.me>
Mon, 11 Jan 2021 10:56:32 +0000 (19:56 +0900)
* src/pgtkterm.c (pgtk_flash): Change size source.

On X, surface_orig is not an image surface but xlib surface, so I
cannot get its size with cairo_image_surface_get_{width,height}.

src/pgtkterm.c

index 00381671f2147d6ba41978ed1ab687565e4982ed..44e1f3e2966b5af9e1c8f1d6fcc30625421ebd75 100644 (file)
@@ -3706,8 +3706,8 @@ pgtk_flash (struct frame *f)
   {
     cairo_surface_t *surface_orig = FRAME_CR_SURFACE (f);
 
-    int width = cairo_image_surface_get_width (surface_orig);
-    int height = cairo_image_surface_get_height (surface_orig);
+    int width = FRAME_CR_SURFACE_DESIRED_WIDTH (f);
+    int height = FRAME_CR_SURFACE_DESIRED_HEIGHT (f);
     cairo_surface_t *surface =
       cairo_surface_create_similar (surface_orig, CAIRO_CONTENT_COLOR_ALPHA,
                                    width, height);