aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuuki Harano2019-07-07 03:15:20 +0900
committerJeff Walsh2020-11-22 14:46:55 +1100
commit19da22ed25753d0e90b9cbc2c79b37d0aae67712 (patch)
tree71a79e56ac12e519f1da59bfc2208438e5a9e14a /src
parentfbba846ee8d63304385b59e8f6a553398b533345 (diff)
downloademacs-19da22ed25753d0e90b9cbc2c79b37d0aae67712.tar.gz
emacs-19da22ed25753d0e90b9cbc2c79b37d0aae67712.zip
Add support for handing the internal border
src/pgtkterm.c (pgtk_clear_under_internal_border): remove #if 0 src/pgtkfns.c (x_set_internal_border_width): add clear and fill support internal-border 対応。
Diffstat (limited to 'src')
-rw-r--r--src/pgtkfns.c2
-rw-r--r--src/pgtkterm.c29
2 files changed, 21 insertions, 10 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index b726d1bcaf4..3f31c086f2d 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -549,7 +549,6 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
549static void 549static void
550x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) 550x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
551{ 551{
552#if 0
553 int old_width = FRAME_INTERNAL_BORDER_WIDTH (f); 552 int old_width = FRAME_INTERNAL_BORDER_WIDTH (f);
554 553
555 CHECK_TYPE_RANGED_INTEGER (int, arg); 554 CHECK_TYPE_RANGED_INTEGER (int, arg);
@@ -564,7 +563,6 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva
564 adjust_frame_size (f, -1, -1, 3, 0, Qinternal_border_width); 563 adjust_frame_size (f, -1, -1, 3, 0, Qinternal_border_width);
565 564
566 SET_FRAME_GARBAGED (f); 565 SET_FRAME_GARBAGED (f);
567#endif
568} 566}
569 567
570 568
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 1c2f0c96487..56a05dac9b8 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -4734,19 +4734,32 @@ pgtk_clear_under_internal_border (struct frame *f)
4734 4734
4735 block_input (); 4735 block_input ();
4736 4736
4737 struct {
4738 int x, y, w, h;
4739 } rects[] = {
4740 { 0, margin, width, border },
4741 { 0, 0, border, height },
4742 { width - border, 0, border, height },
4743 { 0, height - border, width, border },
4744 };
4745
4737 if (face) 4746 if (face)
4738 { 4747 {
4739 pgtk_fill_rectangle (f, color, 0, margin, width, border); 4748 for (int i = 0; i < 4; i++) {
4740 pgtk_fill_rectangle (f, color, 0, 0, border, height); 4749 int x = rects[i].x;
4741 pgtk_fill_rectangle (f, color, width - border, 0, border, height); 4750 int y = rects[i].y;
4742 pgtk_fill_rectangle (f, color, 0, height - border, width, border); 4751 int w = rects[i].w;
4752 int h = rects[i].h;
4753 cairo_surface_t *bg = create_background_surface_by_face (f, face, x, y, w, h);
4754 cairo_set_source_surface (cr, bg, x, y);
4755 cairo_rectangle (cr, x, y, w, h);
4756 cairo_fill (cr);
4757 }
4743 } 4758 }
4744 else 4759 else
4745 { 4760 {
4746 pgtk_clear_area (f, 0, 0, border, height); 4761 for (int i = 0; i < 4; i++)
4747 pgtk_clear_area (f, 0, margin, width, border); 4762 pgtk_clear_area (f, rects[i].x, rects[i].y, rects[i].w, rects[i].h);
4748 pgtk_clear_area (f, width - border, 0, border, height);
4749 pgtk_clear_area (f, 0, height - border, width, border);
4750 } 4763 }
4751 4764
4752 unblock_input (); 4765 unblock_input ();