From f9b9fac0493fb23ab80e865ba84b7f09da81ef3e Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Tue, 31 Mar 2020 01:28:41 +0900 Subject: [PATCH 1/4] PGTK_PREEDIT_TEXT_EVENT is only used in HAVE_PGTK. --- src/keyboard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index 24013b0fee80..c66518a023f9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6057,8 +6057,10 @@ make_lispy_event (struct input_event *event) return list3 (Qconfig_changed_event, event->arg, event->frame_or_window); +#ifdef HAVE_PGTK case PGTK_PREEDIT_TEXT_EVENT: return list2 (intern("pgtk-preedit-text"), event->arg); +#endif /* The 'kind' field of the event is something we don't recognize. */ default: From 1ac37b2ff99674245399e0dcf4951c5713834db8 Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Tue, 31 Mar 2020 01:31:07 +0900 Subject: [PATCH 2/4] improve code readability. --- src/gtkutil.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index b60dcaf621ca..1da5aae13b11 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1339,17 +1339,13 @@ xg_create_frame_widgets (struct frame *f) wtop = gtk_plug_new_for_display (gdpy, f->output_data.xp->parent_desc); } else -#endif - -#ifdef HAVE_PGTK - if (!NILP(f->parent_frame)){ - type = GTK_WINDOW_POPUP; - } -#endif - + wtop = gtk_window_new (type); +#else + if (!NILP(f->parent_frame)){ + type = GTK_WINDOW_POPUP; + } wtop = gtk_window_new (type); -#ifdef HAVE_PGTK - gtk_widget_add_events(wtop, GDK_ALL_EVENTS_MASK); + gtk_widget_add_events(wtop, GDK_ALL_EVENTS_MASK); #endif /* gtk_window_set_has_resize_grip is a Gtk+ 3.0 function but Ubuntu From 2a8e8fe86067345356ba38328ad269162e3c3143 Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Tue, 31 Mar 2020 01:31:29 +0900 Subject: [PATCH 3/4] fix indentation. --- src/pgtkterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index a4c55ff9bd4f..c37b29470256 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -387,7 +387,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity) if (yoff < 0){ f->size_hint_flags |= YNegative; f->top_pos = yoff; - } else { + } else { f->top_pos = yoff + a.y; //~60 } f->win_gravity = NorthWestGravity; From 691f9104cb5b8b742a450ba55bc3b3357fe1de0a Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Tue, 31 Mar 2020 01:32:10 +0900 Subject: [PATCH 4/4] resolve argument type mismatch. --- src/gtkutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index 1da5aae13b11..fe753c33f20a 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1830,7 +1830,7 @@ xg_set_override_redirect (struct frame *f, Lisp_Object override_redirect) functions so GTK does not overwrite the icon. */ void -xg_set_frame_icon (struct frame *f, Pixmap icon_pixmap, Pixmap icon_mask) +xg_set_frame_icon (struct frame *f, Emacs_Pixmap icon_pixmap, Emacs_Pixmap icon_mask) { GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (f, icon_pixmap,