diff options
| author | Yuuki Harano | 2021-11-30 00:14:42 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-11-30 00:14:42 +0900 |
| commit | 073111cc7755bc5ac685936f5e738a4dbae7ef61 (patch) | |
| tree | 7022efe61412f6988951d6ca66d941097e49cc48 /src | |
| parent | 3b8e122bc7afc0830c6bb353e81a0face0d10746 (diff) | |
| download | emacs-073111cc7755bc5ac685936f5e738a4dbae7ef61.tar.gz emacs-073111cc7755bc5ac685936f5e738a4dbae7ef61.zip | |
Replace XFillRectangle with cairo_rectangle and cairo_fill
* src/pgtkterm.c (pgtk_flash):
Diffstat (limited to 'src')
| -rw-r--r-- | src/pgtkterm.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c index d6103d4f151..27b7ccabb48 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c | |||
| @@ -3578,9 +3578,6 @@ pgtk_flash (struct frame *f) | |||
| 3578 | cairo_set_source_rgb (cr, 1, 1, 1); | 3578 | cairo_set_source_rgb (cr, 1, 1, 1); |
| 3579 | cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE); | 3579 | cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE); |
| 3580 | 3580 | ||
| 3581 | #define XFillRectangle(d, win, gc, x, y, w, h) \ | ||
| 3582 | ( cairo_rectangle (cr, x, y, w, h), cairo_fill (cr) ) | ||
| 3583 | |||
| 3584 | { | 3581 | { |
| 3585 | /* Get the height not including a menu bar widget. */ | 3582 | /* Get the height not including a menu bar widget. */ |
| 3586 | int height = FRAME_PIXEL_HEIGHT (f); | 3583 | int height = FRAME_PIXEL_HEIGHT (f); |
| @@ -3595,23 +3592,28 @@ pgtk_flash (struct frame *f) | |||
| 3595 | /* If window is tall, flash top and bottom line. */ | 3592 | /* If window is tall, flash top and bottom line. */ |
| 3596 | if (height > 3 * FRAME_LINE_HEIGHT (f)) | 3593 | if (height > 3 * FRAME_LINE_HEIGHT (f)) |
| 3597 | { | 3594 | { |
| 3598 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3595 | cairo_rectangle (cr, |
| 3599 | flash_left, | 3596 | flash_left, |
| 3600 | (FRAME_INTERNAL_BORDER_WIDTH (f) | 3597 | (FRAME_INTERNAL_BORDER_WIDTH (f) |
| 3601 | + FRAME_TOP_MARGIN_HEIGHT (f)), | 3598 | + FRAME_TOP_MARGIN_HEIGHT (f)), |
| 3602 | width, flash_height); | 3599 | width, flash_height); |
| 3603 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3600 | cairo_fill (cr); |
| 3604 | flash_left, | ||
| 3605 | (height - flash_height | ||
| 3606 | - FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 3607 | width, flash_height); | ||
| 3608 | 3601 | ||
| 3602 | cairo_rectangle (cr, | ||
| 3603 | flash_left, | ||
| 3604 | (height - flash_height | ||
| 3605 | - FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 3606 | width, flash_height); | ||
| 3607 | cairo_fill (cr); | ||
| 3609 | } | 3608 | } |
| 3610 | else | 3609 | else |
| 3611 | /* If it is short, flash it all. */ | 3610 | { |
| 3612 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3611 | /* If it is short, flash it all. */ |
| 3613 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), | 3612 | cairo_rectangle (cr, |
| 3614 | width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); | 3613 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), |
| 3614 | width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); | ||
| 3615 | cairo_fill (cr); | ||
| 3616 | } | ||
| 3615 | 3617 | ||
| 3616 | FRAME_X_OUTPUT (f)->cr_surface_visible_bell = surface; | 3618 | FRAME_X_OUTPUT (f)->cr_surface_visible_bell = surface; |
| 3617 | { | 3619 | { |
| @@ -3625,7 +3627,6 @@ pgtk_flash (struct frame *f) | |||
| 3625 | start_atimer (ATIMER_RELATIVE, delay, recover_from_visible_bell, f); | 3627 | start_atimer (ATIMER_RELATIVE, delay, recover_from_visible_bell, f); |
| 3626 | } | 3628 | } |
| 3627 | 3629 | ||
| 3628 | #undef XFillRectangle | ||
| 3629 | } | 3630 | } |
| 3630 | 3631 | ||
| 3631 | cairo_destroy (cr); | 3632 | cairo_destroy (cr); |