Skip to content

Commit

Permalink
Merge pull request emacs-mirror#18 from masm11/fix/compilation-for-x-gtk
Browse files Browse the repository at this point in the history
Fix/compilation for x gtk
  • Loading branch information
Yuuki Harano authored Mar 30, 2020
2 parents 973a02e + 691f910 commit baed679
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
18 changes: 7 additions & 11 deletions src/gtkutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1834,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,
Expand Down
2 changes: 2 additions & 0 deletions src/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/pgtkterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit baed679

Please sign in to comment.