aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2021-11-30 08:19:46 +0800
committerPo Lu2021-11-30 08:19:46 +0800
commit194c299470e087aeeff5c496c7dfc6400e1185a7 (patch)
treedbd2af7b48609ae668e03ffa4c228090eded96b2 /src
parent8f5d2a3181d22f858ede3fb6a1452f99272901fe (diff)
parent7d8f0c0586dbbf630ee6e683c1fe5d8d4ab8d1bb (diff)
downloademacs-194c299470e087aeeff5c496c7dfc6400e1185a7.tar.gz
emacs-194c299470e087aeeff5c496c7dfc6400e1185a7.zip
Merge remote-tracking branch 'origin/feature/pgtk' into feature/pgtk
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/pgtkfns.c4
-rw-r--r--src/pgtkterm.c59
-rw-r--r--src/xdisp.c12
4 files changed, 34 insertions, 43 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 1cb90b85cf5..0574d5691b1 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1432,7 +1432,7 @@ xg_create_frame_widgets (struct frame *f)
1432 1432
1433 block_input (); 1433 block_input ();
1434 1434
1435#ifndef HAVE_PGTK // gtk_plug not found. 1435#ifndef HAVE_PGTK /* gtk_plug not found. */
1436 if (FRAME_X_EMBEDDED_P (f)) 1436 if (FRAME_X_EMBEDDED_P (f))
1437 { 1437 {
1438 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); 1438 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 339d6dd45ae..afcb44f1223 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1602,7 +1602,7 @@ This function is an internal primitive--use `make-frame' instead. */ )
1602#endif 1602#endif
1603 1603
1604 /* Create the X widget or window. */ 1604 /* Create the X widget or window. */
1605 // x_window (f); 1605 /* x_window (f); */
1606 xg_create_frame_widgets (f); 1606 xg_create_frame_widgets (f);
1607 pgtk_set_event_handler (f); 1607 pgtk_set_event_handler (f);
1608 1608
@@ -3591,7 +3591,7 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
3591 tab_bar_height = FRAME_TAB_BAR_HEIGHT (f); 3591 tab_bar_height = FRAME_TAB_BAR_HEIGHT (f);
3592 tab_bar_width = (tab_bar_height 3592 tab_bar_width = (tab_bar_height
3593 ? native_width - 2 * internal_border_width : 0); 3593 ? native_width - 2 * internal_border_width : 0);
3594 // inner_top += tab_bar_height; 3594 /* inner_top += tab_bar_height; */
3595 3595
3596 /* Construct list. */ 3596 /* Construct list. */
3597 if (EQ (attribute, Qouter_edges)) 3597 if (EQ (attribute, Qouter_edges))
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 0c286ca1510..27b7ccabb48 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -3218,7 +3218,7 @@ pgtk_mouse_position (struct frame **fp, int insist, Lisp_Object * bar_window,
3218 f1 = pgtk_any_window_to_frame (win); 3218 f1 = pgtk_any_window_to_frame (win);
3219 else 3219 else
3220 { 3220 {
3221 // crossing display server? 3221 /* crossing display server? */
3222 f1 = SELECTED_FRAME (); 3222 f1 = SELECTED_FRAME ();
3223 } 3223 }
3224 } 3224 }
@@ -3488,8 +3488,8 @@ static struct redisplay_interface pgtk_redisplay_interface = {
3488 gui_clear_end_of_line, 3488 gui_clear_end_of_line,
3489 pgtk_scroll_run, 3489 pgtk_scroll_run,
3490 pgtk_after_update_window_line, 3490 pgtk_after_update_window_line,
3491 NULL, // gui_update_window_begin, 3491 NULL, /* gui_update_window_begin, */
3492 NULL, // gui_update_window_end, 3492 NULL, /* gui_update_window_end, */
3493 pgtk_flush_display, 3493 pgtk_flush_display,
3494 gui_clear_window_mouse_face, 3494 gui_clear_window_mouse_face,
3495 gui_get_glyph_overhangs, 3495 gui_get_glyph_overhangs,
@@ -3505,7 +3505,7 @@ static struct redisplay_interface pgtk_redisplay_interface = {
3505 pgtk_draw_window_cursor, 3505 pgtk_draw_window_cursor,
3506 pgtk_draw_vertical_window_border, 3506 pgtk_draw_vertical_window_border,
3507 pgtk_draw_window_divider, 3507 pgtk_draw_window_divider,
3508 NULL, // pgtk_shift_glyphs_for_insert, 3508 NULL, /* pgtk_shift_glyphs_for_insert, */
3509 pgtk_show_hourglass, 3509 pgtk_show_hourglass,
3510 pgtk_hide_hourglass, 3510 pgtk_hide_hourglass,
3511 pgtk_default_font_parameter, 3511 pgtk_default_font_parameter,
@@ -3527,7 +3527,7 @@ pgtk_clear_frame (struct frame *f)
3527 if (!FRAME_DEFAULT_FACE (f)) 3527 if (!FRAME_DEFAULT_FACE (f))
3528 return; 3528 return;
3529 3529
3530 // mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); 3530 /* mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); */
3531 3531
3532 block_input (); 3532 block_input ();
3533 3533
@@ -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);
@@ -4794,10 +4795,10 @@ pgtk_create_terminal (struct pgtk_display_info *dpyinfo)
4794 terminal->update_begin_hook = pgtk_update_begin; 4795 terminal->update_begin_hook = pgtk_update_begin;
4795 terminal->update_end_hook = pgtk_update_end; 4796 terminal->update_end_hook = pgtk_update_end;
4796 terminal->read_socket_hook = pgtk_read_socket; 4797 terminal->read_socket_hook = pgtk_read_socket;
4797 // terminal->frame_up_to_date_hook = pgtk_frame_up_to_date; 4798 /* terminal->frame_up_to_date_hook = pgtk_frame_up_to_date; */
4798 terminal->mouse_position_hook = pgtk_mouse_position; 4799 terminal->mouse_position_hook = pgtk_mouse_position;
4799 terminal->frame_rehighlight_hook = XTframe_rehighlight; 4800 terminal->frame_rehighlight_hook = XTframe_rehighlight;
4800 // terminal->frame_raise_lower_hook = pgtk_frame_raise_lower; 4801 /* terminal->frame_raise_lower_hook = pgtk_frame_raise_lower; */
4801 terminal->frame_visible_invisible_hook = pgtk_make_frame_visible_invisible; 4802 terminal->frame_visible_invisible_hook = pgtk_make_frame_visible_invisible;
4802 terminal->fullscreen_hook = pgtk_fullscreen_hook; 4803 terminal->fullscreen_hook = pgtk_fullscreen_hook;
4803 terminal->menu_show_hook = pgtk_menu_show; 4804 terminal->menu_show_hook = pgtk_menu_show;
@@ -4838,7 +4839,7 @@ struct pgtk_window_is_of_frame_recursive_t
4838{ 4839{
4839 GdkWindow *window; 4840 GdkWindow *window;
4840 bool result; 4841 bool result;
4841 GtkWidget *emacs_gtk_fixed; // stop on emacsgtkfixed other than this. 4842 GtkWidget *emacs_gtk_fixed; /* stop on emacsgtkfixed other than this. */
4842}; 4843};
4843 4844
4844static void 4845static void
@@ -5487,7 +5488,7 @@ key_press_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
5487 evq_enqueue (&inev); 5488 evq_enqueue (&inev);
5488 } 5489 }
5489 5490
5490 // count += nchars; 5491 /* count += nchars; */
5491 5492
5492 inev.ie.kind = NO_EVENT; /* Already stored above. */ 5493 inev.ie.kind = NO_EVENT; /* Already stored above. */
5493 5494
@@ -5501,7 +5502,7 @@ done:
5501 { 5502 {
5502 XSETFRAME (inev.ie.frame_or_window, f); 5503 XSETFRAME (inev.ie.frame_or_window, f);
5503 evq_enqueue (&inev); 5504 evq_enqueue (&inev);
5504 // count++; 5505 /* count++; */
5505 } 5506 }
5506 5507
5507 SAFE_FREE (); 5508 SAFE_FREE ();
@@ -6831,7 +6832,7 @@ A value of nil means Emacs doesn't use toolkit scroll bars.
6831With the X Window system, the value is a symbol describing the 6832With the X Window system, the value is a symbol describing the
6832X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. 6833X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
6833With MS Windows or Nextstep, the value is t. */ ); 6834With MS Windows or Nextstep, the value is t. */ );
6834 // Vx_toolkit_scroll_bars = Qt; 6835 /* Vx_toolkit_scroll_bars = Qt; */
6835 Vx_toolkit_scroll_bars = intern_c_string ("gtk"); 6836 Vx_toolkit_scroll_bars = intern_c_string ("gtk");
6836 6837
6837 DEFVAR_BOOL ("x-use-underline-position-properties", x_use_underline_position_properties, 6838 DEFVAR_BOOL ("x-use-underline-position-properties", x_use_underline_position_properties,
diff --git a/src/xdisp.c b/src/xdisp.c
index 0b8b5a41e8c..0e1e29eafe0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -29608,16 +29608,6 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
29608 return x_reached; 29608 return x_reached;
29609} 29609}
29610 29610
29611static int draw_glyphs_debug (const char *file, int lineno,
29612 struct window *w, int x, struct glyph_row *row,
29613 enum glyph_row_area area, ptrdiff_t start, ptrdiff_t end,
29614 enum draw_glyphs_face hl, int overlaps)
29615{
29616 return draw_glyphs(w, x, row, area, start, end, hl, overlaps);
29617}
29618#define draw_glyphs(w, x, r, a, s, e, h, o) \
29619 draw_glyphs_debug (__FILE__, __LINE__, w, x, r, a, s, e, h, o)
29620
29621/* Find the first glyph in the run of underlined glyphs preceding the 29611/* Find the first glyph in the run of underlined glyphs preceding the
29622 beginning of glyph string S, and return its font (which could be 29612 beginning of glyph string S, and return its font (which could be
29623 NULL). This is needed because that font determines the underline 29613 NULL). This is needed because that font determines the underline
@@ -33249,7 +33239,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
33249 hlinfo->mouse_face_face_id 33239 hlinfo->mouse_face_face_id
33250 = face_at_buffer_position (w, mouse_charpos, &ignore, 33240 = face_at_buffer_position (w, mouse_charpos, &ignore,
33251 mouse_charpos + 1, 33241 mouse_charpos + 1,
33252 !hlinfo->mouse_face_hidden, -1, 0); 33242 !hlinfo->mouse_face_hidden, -1, 0);
33253 show_mouse_face (hlinfo, DRAW_MOUSE_FACE); 33243 show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
33254} 33244}
33255 33245