]>
git.eshelyaron.com Git - emacs.git/log
Yuuki Harano [Mon, 26 Oct 2020 13:05:55 +0000 (22:05 +0900)]
Fix startup failure on svg-unsupported environments
* src/pgtkterm.c (pgtk_bitmap_icon): Re-port X-code.
(pgtk_term_init): Add member initialization.
* src/pgtkterm.h (struct pgtk_display_info): Add member.
(struct pgtk_output): Add member.
Yuuki Harano [Sun, 18 Oct 2020 11:14:52 +0000 (20:14 +0900)]
Avoid weird behavior when resizing with top-left corner
* src/frame.c (syms_of_frame): Defaults frame_resize_pixelwise to true.
Yuuki Harano [Fri, 16 Oct 2020 18:47:03 +0000 (03:47 +0900)]
Don't use gtk_window_resize to resize offscreen window
* src/xwidget.c (Fmake_xwidget): Use gtk_container_check_resize instead.
(Fxwidget_resize): Use gtk_container_check_resize instead.
; Gtk+3 document says:
; > Applications should not use any API specific to GtkWindow
; > to operate on this object. It should be treated as a GtkBin
; > that has no parent widget.
Yuuki Harano [Fri, 16 Oct 2020 18:51:15 +0000 (03:51 +0900)]
Avoid gtk warnings on X
* src/xwidget.c (xwidget_osr_draw_cb): Call it to avoid alloc_needes.
Kira Bruneau [Thu, 15 Oct 2020 18:46:44 +0000 (14:46 -0400)]
Avoid mutating invocation-name (tiny change)
* lisp/term/pgtk-win.el (window-system-initialization): copy invocation-name.
Yuuki Harano [Mon, 5 Oct 2020 12:18:06 +0000 (21:18 +0900)]
Fix Gtk warnings
* src/gtkutil.c (xg_frame_set_char_size): Call appropriate function
(xg_set_undecorated): Do nothing if child frame.
(xg_set_no_focus_on_map): Do nothing if child frame.
(xg_set_no_accept_focus): Do nothing if child frame.
(xg_set_frame_icon): Do nothing if child frame.
(xg_get_file_name): Do nothing if child frame.
(xg_get_font):
* src/pgtkterm.c (pgtk_focus_frame): Do nothing if child frames.
(x_set_frame_alpha): Select correct widget.
(x_new_focus_frame): Focus only when non-child frames.
(pgtk_set_event_handler): Don't set for child frames.
* src/pgtkfns.c (xg_set_icon): Do nothing if child frames.
(xg_set_icon_from_xpm_data): Do nothing if child frames.
(pgtk_set_sticky): Do nothing if child frames.
(Fx_show_tip): Do nothing if child frames.
(Fpgtk_set_mouse_absolute_pixel_position): Select correct widget.
(Fpgtk_mouse_absolute_pixel_position): Select correct widget.
* src/pgtkmenu.c (pgtk_menu_show):
(pgtk_dialog_show):
Yuuki Harano [Sat, 3 Oct 2020 11:09:07 +0000 (20:09 +0900)]
Fix crash on drag and drop
* src/pgtkterm.c (pgtk_select): Move dispatch before
g_main_context_query.
(drag_drop): Remove drag_drop.
(drag_data_received): Rename arg.
(pgtk_set_event_handler): Remove drag-drop callback.
Yuuki Harano [Tue, 29 Sep 2020 14:09:22 +0000 (23:09 +0900)]
Fix mouse cursor doesn't appear on motion events on xwidgets
* src/xwidget.c (xwidget_osr_event_forward): Propagate motion notify.
Yuuki Harano [Mon, 28 Sep 2020 13:49:38 +0000 (22:49 +0900)]
Fix tooltips don't hide on events
* src/pgtkterm.c: New variable to indicate whether any event occurs.
(configure_event): Clear help string on a event.
(leave_notify_event): Clear help string on a event.
(motion_notify_event): Use gen_help_event.
(pgtk_set_event_handler): Hook configure-event for outer widgets.
(pgtk_term_init): Clear the flag.
Yuuki Harano [Tue, 29 Sep 2020 08:20:59 +0000 (17:20 +0900)]
Fix crash on creating child frames.
* src/pgtkfns.c (frame_geometry): Returns nil when no widget.
Yuuki Harano [Tue, 29 Sep 2020 09:38:41 +0000 (18:38 +0900)]
Fix crash when child frame updates toolbar
* src/gtkutil.c (update_frame_tool_bar): Do nothing when child frame.
Yuuki Harano [Mon, 21 Sep 2020 15:14:34 +0000 (00:14 +0900)]
Exclude Xlib's modifier keys
* src/pgtkterm.c (IsModifierKey): New macro.
(key_press_event): Exclude Xlib's modifier keys.
Yuuki Harano [Sun, 6 Sep 2020 14:27:45 +0000 (23:27 +0900)]
Re-implement childframe with emacsgtkfixed
* src/emacsgtkfixed.c (G_DEFINE_TYPE): Make emacs_fixed_get_type public.
* src/emacsgtkfixed.h (EMACS_TYPE_FIXED): Make emacs_fixed_get_type public.
* src/gtkutil.c (xg_frame_set_char_size): Call appropriate functions
by whether the frame is a child frame or not.
(xg_create_frame_widgets): Use GTK_WINDOW_TOPLEVEL when creating child frame.
(xg_create_frame_outer_widgets): New function.
(xg_set_skip_taskbar): Call only when top-level frame.
(xg_set_no_accept_focus): See appropriate widget.
* src/gtkutil.h: New declaration.
* src/pgtkfns.c (pgtk_set_name_internal): Do only when top-level frame.
(Fx_create_frame): Reparent the frame.
(frame_geometry): Call appropriate functions
(syms_of_pgtkfns): Port from X code.
* src/pgtkterm.c (x_free_frame_resources): Destroy appropriate widget.
(x_calc_absolute_position): Port from X code.
(x_set_offset): Re-port from X code.
(pgtk_set_window_size): Use appropriate widget.
(pgtk_make_frame_visible): Use appropriate widget.
(pgtk_make_frame_invisible): Use appropriate widget.
(x_set_parent_frame): Reparent the frame.
(x_set_z_group): Process only when top-level frame.
(pgtk_text_icon): Process only when top-level frame.
(set_fullscreen_state): Process only when top-level frame.
(frame_highlight): Hold ref.
(frame_unhighlight): Hold ref.
(pgtk_window_is_of_frame_recursive): Prune child frames.
(pgtk_window_is_of_frame): Prune child frames.
(print_widget_tree_recursive): Don't call this when not debugging.
(pgtk_handle_draw): Don't call this when not debugging.
(pgtk_set_event_handler): expect map-event for edit_widget not outer widget.
* src/pgtkterm.h (FRAME_WIDGET): New macro.
Jeff Walsh [Thu, 27 Aug 2020 12:05:15 +0000 (22:05 +1000)]
Add support for x-support-frames
* src/pgtkfns.c (Fx_export_frames):
(syms_of_pgtkfns): port from X11 version
* src/pgtkterm.c (pgtk_cr_accumulate_data):
(pgtk_cr_destroy):
(pgtk_cr_export_frames): port from X11
* src/pgtkterm.h: add defs
Yuuki Harano [Sat, 22 Aug 2020 10:17:04 +0000 (19:17 +0900)]
Enable GtkIMContext by default
* lisp/term/pgtk-win.el: Call pgtk-use-im-context after init.
* src/pgtkim.c (pgtk_im_use_context): New function.
(pgtk_im_init): Call pgtk_im_use_context.
(Fpgtk_use_im_context): Call pgtk_im_use_context.
(syms_of_pgtkim): New variable Vpgtk_use_im_context_on_new_connection.
Yuuki Harano [Sun, 16 Aug 2020 12:37:59 +0000 (21:37 +0900)]
Remove duplicated syms_of_xwidget call
* src/emacs.c (main): Remove duplicated syms_of_xwidget() call.
Yuuki Harano [Fri, 14 Aug 2020 16:13:52 +0000 (01:13 +0900)]
Self-implement tooltip
* src/gtkutil.c (xg_create_frame_widgets): Use popup for tooltip.
* src/pgtkfns.c (unwind_create_tip_frame): Port X code.
(x_create_tip_frame): Re-port X code.
(x_hide_tip): Re-port X code.
(Fx_show_tip): Re-port X code.
(frame_geometry): Get left_pos and top_pos here.
(syms_of_pgtkfns): Add variables for tooltip.
* src/pgtkterm.c (pgtk_set_event_handler): Set event handler for tooltip.
Yuuki Harano [Thu, 13 Aug 2020 05:26:43 +0000 (14:26 +0900)]
Add PGTK to system-configuration-features
* configure.ac: Set HAVE_PGTK when configuring for PGTK, and
add PGTK for iteration.
Yuuki Harano [Mon, 10 Aug 2020 10:06:40 +0000 (19:06 +0900)]
Re-port image drawing code from X
* src/pgtkterm.c (x_cr_draw_image): Re-port X code.
(x_draw_image_foreground): Re-port X code.
(x_draw_image_glyph_string): Re-port X code.
Yuuki Harano [Thu, 6 Aug 2020 15:47:38 +0000 (00:47 +0900)]
Make pointer visible when motion notify event
* src/pgtkterm.c (motion_notify_event): set pending_signals to true.
Yuuki Harano [Mon, 20 Jul 2020 12:35:21 +0000 (21:35 +0900)]
Fix non-English layout does not work
* src/pgtkterm.c (key_press_event): Use Vlocale_coding_system.
Yuuki Harano [Mon, 13 Jul 2020 14:38:07 +0000 (23:38 +0900)]
Fix font lock is not applied on continued lines
* src/pgtkterm.c (pgtk_parse_color): Remove alpha bits.
Jeff Walsh [Thu, 2 Jul 2020 06:27:30 +0000 (16:27 +1000)]
Restore support for terminal only emacs in PGTK (add --with-pgtk)
* configure.ac: add "--with-pgtk" switch for building pgtk terminal
support.
Adjust X11 window system tests to no clobber pgtk preferences
Jeff Walsh [Mon, 29 Jun 2020 12:54:57 +0000 (22:54 +1000)]
Add font chooser functionality
* src/pgtkfns.c (Fpgtk_popup_font_panel): repurpose X/gtk font chooser code
(syms_of_pgtkfns): add new symbol
Jeff Walsh [Thu, 25 Jun 2020 06:17:37 +0000 (16:17 +1000)]
Fix migrating Child frames
* src/pgtkterm.c:
(x_calc_absolute_position): Remove Function that has no effect
(x_set_offset): titlebar off should not be stored as an offset, only
used to calculate final move locations
Yuuki Harano [Tue, 26 May 2020 11:41:09 +0000 (20:41 +0900)]
* src/keyboard.c (make_lispy_event): Fix coding style
Yuuki Harano [Tue, 26 May 2020 11:38:38 +0000 (20:38 +0900)]
Change coding style
* src/gtkutil.c (xg_display_open):
(xg_get_image_for_pixmap):
(xg_frame_resized):
(xg_create_frame_widgets):
(x_wm_set_size_hint):
(xg_frame_restack):
(xg_finish_scroll_bar_creation):
(xg_update_scrollbar_pos):
(xg_update_horizontal_scrollbar_pos):
(xg_set_toolkit_scroll_bar_thumb):
(xg_event_is_for_scrollbar):
Yuuki Harano [Tue, 26 May 2020 11:25:28 +0000 (20:25 +0900)]
Fix coding style
* src/emacs.c (main): Fix coding style
Yuuki Harano [Tue, 26 May 2020 11:22:20 +0000 (20:22 +0900)]
Change coding style
* src/image.c (image_create_pattern_from_pixbuf): Change coding style
(image_create_bitmap_from_data): Change coding style
(image_create_bitmap_from_file): Change coding style
Yuuki Harano [Sun, 24 May 2020 10:45:35 +0000 (19:45 +0900)]
* src/pgtkselect.h: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:41:51 +0000 (19:41 +0900)]
* src/pgtkim.c: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:39:44 +0000 (19:39 +0900)]
* src/pgtkterm.h: Change coding style
Yuuki Harano [Sun, 24 May 2020 10:37:24 +0000 (19:37 +0900)]
* src/pgtkterm.h: Remove unused code
Yuuki Harano [Sun, 24 May 2020 10:33:43 +0000 (19:33 +0900)]
* src/pgtkgui.h: change coding style
Yuuki Harano [Sun, 24 May 2020 10:31:06 +0000 (19:31 +0900)]
* src/pgtkmenu.c: change coding style
Yuuki Harano [Sun, 24 May 2020 09:16:03 +0000 (18:16 +0900)]
* src/pgtkselect.c: change coding style
Yuuki Harano [Sun, 24 May 2020 09:11:22 +0000 (18:11 +0900)]
* src/pgtkfns.c: change coding style
Yuuki Harano [Sat, 23 May 2020 15:08:00 +0000 (00:08 +0900)]
* src/pgtkterm.c: change coding style
Yuuki Harano [Sun, 17 May 2020 11:04:18 +0000 (20:04 +0900)]
* src/pgtkmenu.c (set_frame_menubar): Suppress gcc warning
Yuuki Harano [Tue, 12 May 2020 13:39:15 +0000 (22:39 +0900)]
* src/pgtkterm.c (pgtk_defined_color): support gtk special colors
Color functions take the frame
* src/gtkutil.c (xg_check_special_colors): pass frame as argument.
* src/pgtkfns.c (x_set_foreground_color, x_set_background_color,
x_set_cursor_color, pgtk_set_scroll_bar_foreground,
pgtk_set_scroll_bar_background, Fxw_color_defined_p,
Fxw_color_values): pass frame as argument.
* src/pgtkterm.c (pgtk_parse_color): take frame as argument.
(pgtk_lisp_to_color): take frame as argument, and pass it.
Remove pgtk_lisp_to_color
* src/pgtkfns.c (x_set_foreground_color, x_set_background_color,
x_set_cursor_color): use x_decode_color instead of pgtk_lisp_to_color.
(Fxw_color_defined_p, Fxw_color_values):
use pgtk_defined_color instead of pgtk_lisp_to_color.
* src/pgtkterm.c (pgtk_lisp_to_color): remove.
* src/gtkutil.c (xg_check_special_colors): change color format
* src/pgtkterm.h: remove pgtk_lisp_to_color declaration
Yuuki Harano [Wed, 6 May 2020 10:04:23 +0000 (19:04 +0900)]
* pgtkmenu.c (set_frame_menubar): fix empty menu.
Yuuki Harano [Wed, 6 May 2020 03:55:04 +0000 (12:55 +0900)]
Make icons and titles work like on X
* pgtk-win.el (frame-title-format, icon-title-format): remove.
* pgtkfns.c (pgtk_set_name_as_filename): remove.
* pgtkfns.c (pgtk_set_name_internal): remove gtk_window_set_icon_name call.
* pgtkfns.c (pgtk_set_name): change value of update_mode_lines.
* pgtkfns.c (pgtk_explicitly_set_name):
prefer the symbol to an immediate value.
* pgtkfns.c (pgtk_implicitly_set_name): remove pgtk_set_name_as_filename call.
* pgtkfns.c (x_set_icon_type, x_set_icon_name): re-port from X code.
* pgtkfns.c (xg_set_icon, xg_set_icon_from_xpm_data): port from X code.
* pgtkterm.c (pgtk_bitmap_icon, pgtk_text_icon, pgtk_create_terminal):
port from X code.
* pgtkterm.h: add function declarations.
Yuuki Harano [Fri, 1 May 2020 15:21:03 +0000 (00:21 +0900)]
* pgtk-win.el: fix compile-time warnings.
Yuuki Harano [Mon, 27 Apr 2020 14:51:01 +0000 (23:51 +0900)]
* src/pgtkterm.c: Remove incorrect mark_object call.
Yuuki Harano [Sat, 11 Apr 2020 14:36:36 +0000 (23:36 +0900)]
follow x_set_internal_border_width change.
* ../src/pgtkfns.c (x_set_internal_border_width):
Yuuki Harano [Sat, 11 Apr 2020 14:36:08 +0000 (23:36 +0900)]
restore frame_rehighlight_hook.
* src/frame.c (gui_set_border_width):
Yuuki Harano [Sun, 5 Apr 2020 10:23:10 +0000 (19:23 +0900)]
use pgtk_menu_set_in_use.
* ../src/pgtkfns.c:
(Fx_file_dialog, clean_up_dialog):
* src/pgtkmenu.c (pgtk_menu_wait_for_event):
Yuuki Harano [Fri, 3 Apr 2020 14:36:41 +0000 (23:36 +0900)]
implement popup/context menu
* ../src/pgtkterm.c (x_draw_glyph_string_background)
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground)
(x_draw_glyphless_glyph_string_foreground, x_draw_relief_rect)
(x_draw_box_rect, x_draw_glyph_string_box, x_draw_image_relief)
(x_draw_image_foreground, x_draw_image_glyph_string)
(button_event):
* src/pgtkterm.h (struct pgtk_display_info):
* src/pgtkmenu.c (pgtk_menu_set_in_use)
(pgtk_menu_wait_for_event, Fx_menu_bar_open_internal)
(popup_widget_loop, pgtk_activate_menubar)
(popup_deactivate_callback, show_help_event): new functions
(menu_highlight_callback): remove
(update_frame_menubar, popup_selection_callback, pop_down_menu)
(create_and_show_popup_menu, cleanup_widget_value_tree)
(pgtk_menu_show, dialog_selection_callback): new
(create_and_show_dialog, pgtk_dialog_show, pgtk_popup_dialog)
(popup_activated, Fmenu_or_popup_active_p, syms_of_pgtkmenu):
Yuuki Harano [Mon, 30 Mar 2020 16:32:10 +0000 (01:32 +0900)]
minimize gtkutil.c differences.
* src/pgtkterm.h: remove compiletime ifdefs
* src/gtkutil.h: block out unused decl
* src/gtkutil.c:
(xg_get_pixbuf_from_pix_and_mask, xg_height_or_width_changed)
(xg_create_frame_widgets, x_wm_set_size_hint)
(xg_event_is_for_menubar, update_frame_tool_bar):
resolve argument type mismatch.
fix compatibility.
Yuuki Harano [Mon, 30 Mar 2020 16:31:07 +0000 (01:31 +0900)]
improve code readability.
* src/gtkutil.c (xg_create_frame_widgets):
Jeff Walsh [Tue, 18 Feb 2020 06:13:26 +0000 (17:13 +1100)]
Set screen/display dpi res to make broadway work as expected
* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):
* src/gtkutil.c (xg_create_frame_widgets):
* src/pgtkterm.c (pgtk_initialize_display_info)
(window_state_event, pgtk_term_init):
* src/ftcrfont.c (ftcrfont_open):
Jeff Walsh [Thu, 9 Jan 2020 05:36:11 +0000 (16:36 +1100)]
Some work toward posframe on wayland
* src/pgtkterm.c (flip_cr_context, x_set_offset): update for new functionality
(pgtk_set_window_size): remove dead code
(x_set_parent_frame): cleanup trace code
(pgtk_cr_update_surface_desired_size): add comment
* src/pgtkmenu.c (Fmenu_or_popup_active_p):
* src/pgtkfns.c (pgtk_frame_parm_handlers, Fx_create_frame):
* src/gtkutil.c (xg_create_frame_widgets, x_wm_set_size_hint):
* src/gtkutil.c (xg_create_frame_widgets):
hacky GTK offsets taht will need better calculations
Get parent frame's editor widget allocation for the offset
Fix child-frame offsets for negative values
Add some function comments around the new double context handling
Jeff Walsh [Mon, 13 Jan 2020 05:17:50 +0000 (16:17 +1100)]
End Resize flickering by copying surface rather than just clearing
* src/pgtkterm.h (FRAME_NATIVE_WINDOW):
* src/pgtkterm.c (pgtk_set_window_size): cleanup traces
(x_draw_bar_cursor, pgtk_handle_draw, syms_of_pgtkterm):
Jeff Walsh [Tue, 14 Jan 2020 05:44:38 +0000 (16:44 +1100)]
Bring pgtk more inline with X11-cairo builds
* src/pgtkterm.h (struct pgtk_output):
* src/pgtkterm.c (FRAME_CR_ACTIVE_CONTEXT, flip_cr_context)
(x_draw_bar_cursor, pgtk_scroll_run, pgtk_update_end)
(pgtk_cr_draw_image, pgtk_flash, pgtk_handle_draw)
(pgtk_cr_update_surface_desired_size, pgtk_begin_cr_clip)
(pgtk_cr_destroy_frame_context):
* src/image.c (image_create_pattern_from_pixbuf):
- Don't create a context each time, just hold a reference
- Pull in a few cairo image changes from master
- Remove redundant code in pgtk_update_begin()
Yuuki Harano [Tue, 24 Mar 2020 15:23:42 +0000 (00:23 +0900)]
update redisplay_interface.
* src/pgtkfns.c (Fx_create_frame, pgtk_default_font_parameter):
* src/pgtkterm.c (pgtk_redisplay_interface):
* src/pgtkterm.h:
Yuuki Harano [Mon, 23 Mar 2020 15:33:57 +0000 (00:33 +0900)]
emacsclient should use both of DISPLAY and WAYLAND_DISPLAY.
* lisp/server.el (server-create-window-system-frame): error out when
not on a supported window
* lib-src/emacsclient.c (decode_options): handle WALAND_DISPLAY on PGTK
Yuuki Harano [Tue, 21 Jan 2020 13:45:37 +0000 (22:45 +0900)]
Before sleep, dispatch draw events.
* src/pgtkterm.c (pgtk_select): remove sigio signal
(pgtk_term_init): dispatch draw
Jeff Walsh [Mon, 13 Jan 2020 05:17:50 +0000 (16:17 +1100)]
End Resize flickering by copying surface rather than just clearing
* src/pgtkterm.h (struct pgtk_output): store desired sizes
* src/pgtkterm.c (FRAME_CR_SURFACE_DESIRED_HEIGHT)
(FRAME_CR_SURFACE_DESIRED_WIDTH, size_allocate, configure_event)
(pgtk_cr_update_surface_desired_size): add "desired" size for handling
surface change
* src/gtkutil.c (xg_frame_resized, xg_create_frame_widgets): remove
surface destroy, turn off double buffer call
Yuuki Harano [Sat, 11 Jan 2020 16:29:39 +0000 (01:29 +0900)]
Add support for Jpeglib
configure.ac: enable jpeglib support for pgtk
jpeglib を使えるようにした。
imagemagick がうまく機能してるので気付かなかった…
Yuuki Harano [Thu, 21 Nov 2019 15:27:12 +0000 (00:27 +0900)]
Let gtk handle scaling.
* src/gtkutil.c (xg_get_scale):
Yuuki Harano [Wed, 13 Nov 2019 14:36:27 +0000 (23:36 +0900)]
implement pre-edit input method
* src/termhooks.h (enum event_kind): new pgtk value
* src/pgtkterm.h (struct pgtk_display_info):
* src/pgtkterm.c (x_free_frame_resources, pgtk_delete_terminal)
(pgtk_enqueue_string, pgtk_enqueue_preedit, key_press_event)
(focus_in_event, focus_out_event, pgtk_term_init): call pgtkim
* src/pgtkim.c: new file
(im_context_commit_cb, im_context_retrieve_surrounding_cb)
(make_color_string, im_context_preedit_changed_cb)
(im_context_preedit_end_cb, im_context_preedit_start_cb)
(pgtk_im_focus_in, pgtk_im_focus_out, pgtk_im_filter_keypress)
(pgtk_im_finish, Fpgtk_use_im_context, syms_of_pgtkim):
* src/pgtkfns.c (check_pgtk_display_info):
* src/keyboard.c (kbd_buffer_get_event, make_lispy_event)
(keys_of_keyboard):
* src/emacs.c (main): add syms_of_pgtkim
* lisp/term/pgtk-win.el (pgtk-preedit-text): new defun
* configure.ac (XWIDGETS_OBJ): add pgtkim.o
input method 対応
preedit を overlay で表示するようにした。
preedit 表示後すぐに反映されなかったのを修正
この機能を ON/OFF できるようにした。
default off.
確定と同時に次の preedit が始まった場合に表示位置がおかしかったのを修正。
sample.
preedit をテキストで渡すようにした
Yuuki Harano [Sat, 12 Oct 2019 16:41:34 +0000 (01:41 +0900)]
Support focus on click event
* src/pgtkterm.c (enter_notify_event, leave_notify_event)
(focus_in_event, focus_out_event): support focus on click
focus-on-click な環境に対応。
Yuuki Harano [Tue, 8 Oct 2019 14:05:55 +0000 (23:05 +0900)]
experimental support of tab-bar.
* src/window.h: compile conditional
* src/pgtkterm.h: function decls
* src/pgtkterm.c (x_draw_image_relief, pgtk_create_terminal)
(motion_notify_event, button_event): tabbar support
* src/pgtkfns.c (x_set_tab_bar_lines, x_change_tab_bar_height)
(pgtk_frame_parm_handlers, Fx_create_frame, frame_geometry): tabbar support
余計なイベントが生成されていたのを修正。
Yuuki Harano [Wed, 31 Jul 2019 16:26:55 +0000 (01:26 +0900)]
Make multipdisplay work by limiting selection while enabed
* src/pgtkterm.c (pgtk_mouse_position):
* src/pgtkselect.c (pgtk_selection_usable): new function
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): check usable selection
multi-display で落ちる理由を一つ潰した。
まだまだありそう。
multi-display 時は selection を使えないようにした。
Yuuki Harano [Mon, 29 Jul 2019 13:44:58 +0000 (22:44 +0900)]
Improve drawing efficency by refactoring code
* ../src/pgtkterm.c (fill_background, fill_background_by_face)
(x_draw_glyph_string_background, x_draw_glyph_string_bg_rect)
(x_draw_image_glyph_string, x_draw_stretch_glyph_string)
(pgtk_clear_under_internal_border): Refator duplcate code
更に効率化。
Yuuki Harano [Mon, 29 Jul 2019 12:31:42 +0000 (21:31 +0900)]
improve some efficiency - simplify draws
* src/pgtkterm.h (struct pgtk_bitmap_record):
* src/pgtkterm.c (create_background_surface_by_face):
* src/image.c (image_create_pattern_from_pixbuf)
(image_create_bitmap_from_data, image_create_bitmap_from_file):
少し効率化。
Yuuki Harano [Thu, 25 Jul 2019 17:14:13 +0000 (02:14 +0900)]
implement restacking and cleanup frame z order
src/pgtkfns.c:
(pgtk_frame_restack, Fpgtk_frame_restack, syms_of_pgtkfns):
pgtk-frame-restack を実装だけ。
ついでに、pgtk-frame-list-z-order は無意味なので削除した。
Yuuki Harano [Thu, 25 Jul 2019 16:47:48 +0000 (01:47 +0900)]
implement pgtk-frame-list-z-order same as frame-list.
* src/pgtkfns.c (Fpgtk_frame_list_z_order): return frame list as it's
the same
Yuuki Harano [Sun, 21 Jul 2019 14:11:50 +0000 (23:11 +0900)]
Implement Scroll-bar-forground and scroll-bar-background
* src/pgtkterm.h (struct pgtk_output):
* src/pgtkterm.c (x_free_frame_resources):
* src/pgtkfns.c (pgtk_set_scroll_bar_foreground)
(pgtk_set_scroll_bar_background, pgtk_frame_parm_handlers)
(Fx_create_frame):
* src/gtkutil.c (xg_finish_scroll_bar_creation):handle scrollbar css values
* etc/org.gnu.emacs.defaults.gschema.xml: add scroll bar fields
scroll-bar-foreground, scroll-bar-background 実装。
Yuuki Harano [Sat, 20 Jul 2019 16:22:45 +0000 (01:22 +0900)]
implement set-tool-bar-position and set-sticky
* ../src/pgtkfns.c (pgtk_set_tool_bar_position)
(pgtk_frame_parm_handlers):
tool-bar-position 実装。
Yuuki Harano [Thu, 18 Jul 2019 15:15:52 +0000 (00:15 +0900)]
TIMERFD support for PGTK, prevent calling when timerfd<0
* ../src/atimer.c (set_alarm):
Yuuki Harano [Thu, 18 Jul 2019 10:42:02 +0000 (19:42 +0900)]
Add PGTK support for fullscreen
* src/gtkutil.c (x_wm_set_size_hint): Fullscreen support for PGTK
fullscreen にできるようにした。
Yuuki Harano [Wed, 17 Jul 2019 16:07:36 +0000 (01:07 +0900)]
Use gsettings instead of X resource database
* src/pgtkfns.c (pgtk_is_lower_char, pgtk_is_upper_char)
(pgtk_is_numeric_char, parse_resource_key)
(pgtk_get_defaults_value, pgtk_set_defaults_value)
(Fpgtk_set_resource, pgtk_get_string_resource): handle gsettings scheme
* m4/gsettings.m4: new file
* etc/org.gnu.emacs.defaults.gschema.xml: new file
* configure.ac (GLIB_DISABLE_DEPRECATION_WARNINGS)
(gsettingsschemadir):
* Makefile.in (gsettingsschemadir, GLIB_COMPILE_SCHEMAS)
(install, uninstall, clean):
* .gitignore: add gschema
*.gschema.valid は生成ファイルなので無視。
schema の置き場所を変更。
Yuuki Harano [Tue, 9 Jul 2019 17:32:35 +0000 (02:32 +0900)]
Implement Meta key detection
* ../src/pgtkterm.c (x_find_modifier_meanings, )
(key_press_event, construct_mouse_click, scroll_event)
(pgtk_term_init):
* src/pgtkterm.h (struct pgtk_display_info):
* ../src/gtkutil.c (xg_tool_bar_callback):
meta キーの検出を実装。
X11 で alt キーを meta キーとして使えなくなっていたのを修正。
Yuuki Harano [Sun, 7 Jul 2019 16:56:21 +0000 (01:56 +0900)]
Implement invisible-pointer to create blinking effect
* src/pgtkterm.h (struct pgtk_display_info): add cursor and callback
* src/pgtkterm.c (x_setup_pointer_blanking)
(XTtoggle_invisible_pointer, x_toggle_visible_pointer): new functions
(pgtk_create_terminal, pgtk_term_init): use gdkcursor
* src/pgtkgui.h: define Emacs_cursor as a GdkCursor
invisible pointer 実装。
Yuuki Harano [Fri, 26 Jul 2019 14:55:03 +0000 (23:55 +0900)]
init border_pixel.
* ../src/pgtkfns.c (Fx_create_frame): remove if preprocessor
Yuuki Harano [Sun, 7 Jul 2019 13:43:59 +0000 (22:43 +0900)]
border_color/pixel width
* src/pgtkterm.h (struct pgtk_output):
* src/pgtkterm.c (x_free_frame_resources, frame_highlight)
(frame_unhighlight, pgtk_frame_rehighlight): use css information
* src/pgtkfns.c (x_set_border_color, pgtk_frame_parm_handlers)
(Fx_create_frame): new functions connected
* src/frame.c (gui_set_border_width): ifdef for PGTK
border_color/pixel 対応。
Yuuki Harano [Sat, 6 Jul 2019 18:15:20 +0000 (03:15 +0900)]
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 対応。
Yuuki Harano [Sat, 6 Jul 2019 17:24:14 +0000 (02:24 +0900)]
Addframe highlighting support
* ../src/pgtkterm.c:
(pgtk_focus_frame, set_opacity_recursively, x_set_frame_alpha)
(frame_highlight, frame_unhighlight, pgtk_frame_rehighlight)
(XTframe_rehighlight, x_new_focus_frame, pgtk_create_terminal):
frame の highlight に対応。
とりあえず opacity のみ対応。
Yuuki Harano [Fri, 5 Jul 2019 13:37:18 +0000 (22:37 +0900)]
Add Stipple support for PGTK
* ../src/pgtkterm.c (create_background_surface_by_face)
(create_background_surface, x_draw_glyph_string_background)
(x_draw_glyph_string_bg_rect, x_draw_image_glyph_string)
(x_draw_stretch_glyph_string, pgtk_draw_fringe_bitmap): handle stipple
* ../src/image.c (image_create_bitmap_from_file, )
(syms_of_image): Add pgtk support
* ../lisp/faces.el (face-valid-attribute-values): add pgtk support
stipple 対応。
stipple がまともに動いてなかったので修正。
Yuuki Harano [Tue, 2 Jul 2019 16:05:10 +0000 (01:05 +0900)]
Add support for make-frame-(in)visible
* ../src/pgtkterm.c (pgtk_make_frame_visible_wait_for_map_event_cb)
(pgtk_make_frame_visible_wait_for_map_event_timeout)
(x_make_frame_visible, x_new_font)
(pgtk_make_frame_visible_invisible, pgtk_make_frame_visible)
(pgtk_redisplay_interface, pgtk_create_terminal, map_event)
(syms_of_pgtkterm):
make-frame-visible/invisible 実装。
Jeff Walsh [Fri, 12 Jun 2020 11:44:18 +0000 (21:44 +1000)]
Early toolbar improvements
* src/xdisp.c (redisplay_tool_bar):
* src/pgtkterm.h:
* src/pgtkterm.c:
(pgtk_make_frame_visible, pgtk_make_frame_invisible)
(pgtk_update_begin, pgtk_parse_color, pgtk_query_colors)
(syms_of_pgtkterm):
* src/pgtkfns.c: cleanup function
* src/image.c (image_create_bitmap_from_file):
* src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask):
Yuuki Harano [Tue, 25 Jun 2019 15:30:33 +0000 (00:30 +0900)]
Add Preferred geometry settings
* ../src/pgtkterm.h (struct pgtk_output):
* ../src/pgtkterm.c (pgtk_set_window_size):
* ../src/gtkutil.c (x_wm_set_size_hint):
* ../src/emacsgtkfixed.c (emacs_fixed_get_preferred_width)
(emacs_fixed_get_preferred_height):
Fixup toolbar handling
toolbar, menubar の ON/OFF でサイズが変化していっていたのを修正。
Yuuki Harano [Tue, 25 Jun 2019 12:36:39 +0000 (21:36 +0900)]
Migrate to Emacs_GC
* ../src/xfaces.c (x_create_gc, x_free_gc):
* ../src/pgtkterm.h (struct pgtk_output, struct pgtk_output):
* ../src/pgtkterm.c (x_set_cursor_gc, x_set_mouse_face_gc)
(x_setup_relief_color, x_draw_image_foreground_1)
(x_draw_image_foreground)
(pgtk_cr_draw_image, pgtk_draw_fringe_bitmap)
(pgtk_begin_cr_clip, pgtk_set_cr_source_with_gc_foreground)
(pgtk_set_cr_source_with_gc_background):
* ../src/pgtkgui.h:
* ../src/dispextern.h (struct glyph_string): clean up XGCValues emulation
XGCValues, GC 廃止。
Emacs_GC に統一。
Yuuki Harano [Sat, 22 Jun 2019 18:19:10 +0000 (03:19 +0900)]
Add pgtk-read-file-name function
* ../src/pgtkfns.c (read_file_name_closed_cb)
(Fpgtk_read_file_name, syms_of_pgtkfns): add function
pgtk-read-file-name を作成。
toolbar からよく呼ばれるので…
Jeff Walsh [Sat, 15 Jun 2019 04:44:47 +0000 (14:44 +1000)]
Implement menubar for pgtk emacs
* src/xdisp.c (display_menu_bar): add pgtk case
* ../src/pgtkterm.c (pgtk_create_terminal): update hooks
(pgtk_menu_show): delete
* src/pgtkterm.h: add decls
* src/pgtkmenu.c: new file
* ../src/pgtkfns.c (x_set_menu_bar_lines)
(x_change_tool_bar_height, x_set_tool_bar_lines)
(Fx_create_frame):
Yuuki Harano [Fri, 3 May 2019 08:20:47 +0000 (17:20 +0900)]
Cleanup x_* to gui_ to match upstream work
* ../src/pgtkterm.h (struct pgtk_display_info):
* ../src/pgtkterm.c (mark_pgtkterm, x_free_frame_resources)
(pgtk_update_window_end, pgtk_mouse_position)
(pgtk_redisplay_interface, pgtk_query_frame_background_color)
(pgtk_delete_terminal, pgtk_create_terminal)
(pgtk_query_frame_background_color, frame_highlight)
(motion_notify_event, button_event, scroll_event):
* ../src/pgtkfns.c (x_set_cursor_color, x_icon)
(pgtk_frame_parm_handlers, x_default_font_parameter)
(Fx_create_frame):
"for the time being, commit" -- rename x->gui, frame_X_X(f) macros
ひとまず commit。
Yuuki Harano [Wed, 3 Apr 2019 13:14:28 +0000 (22:14 +0900)]
Simplify compilaiton condtion
* ../src/menu.c (single_menu_item):
change condition.
Yuuki Harano [Wed, 3 Apr 2019 12:45:37 +0000 (21:45 +0900)]
replace listn with list.
* ../src/pgtkfns.c (frame_geometry):
replace listn with list.
Yuuki Harano [Sat, 12 May 2018 14:49:00 +0000 (23:49 +0900)]
Fix xdg-open handling
* ../src/pgtkterm.c (pgtk_term_init, NUM_ARGV, pgtk_term_init):
* ../lisp/net/browse-url.el (browse-url):
xdg-open できなかったのを修正。
Yuuki Harano [Sat, 13 Jan 2018 11:27:11 +0000 (20:27 +0900)]
Add support for cursor_foreground_colors
* ../src/pgtkterm.c (x_set_cursor_gc):
* ../src/pgtkfns.c (x_set_cursor_color, Fx_create_frame)
(syms_of_pgtkfns):
* src/pgtkterm.h (struct pgtk_output):
cursor_foreground_color 対応。
あんまり意味なかった感じ。
Yuuki Harano [Wed, 10 Jan 2018 13:33:18 +0000 (22:33 +0900)]
Don't mark name_list_element as it's not required
* ../src/pgtkterm.c (mark_pgtkterm):
これは余分。
Yuuki Harano [Mon, 8 Jan 2018 12:21:55 +0000 (21:21 +0900)]
Add set_skip_taskbar frame parm
* src/pgtkfns.c (x_set_skip_taskbar, pgtk_frame_parm_handlers):
Add set_skip_taskbar
Yuuki Harano [Mon, 8 Jan 2018 12:13:25 +0000 (21:13 +0900)]
Add set_undecorated frame parameter
* src/pgtkfns.c (x_set_undecorated, pgtk_frame_parm_handlers): Add
undecorated frame parameter handle
Yuuki Harano [Sat, 28 Oct 2017 07:16:29 +0000 (16:16 +0900)]
Introduce Pure GTK3 port
* src/xsettings.h:
* src/xsettings.c:
(dpyinfo_valid, store_tool_bar_style_changed)
(XSETTINGS_FONT_NAME, get_prop_window, read_settings)
(apply_xft_settings, read_and_apply_settings)
(xft_settings_event, init_xsettings, xsettings_initialize):
* src/xfaces.c:
(x_create_gc, x_free_gc):
* src/xdisp.c (redisplay_tool_bar, redisplay_internal)
(draw_glyphs_debug, draw_glyphs, mouse_face_from_buffer_pos)
(note_mouse_highlight):
* src/terminal.c (Fterminal_live_p):
* src/termhooks.h (enum output_method, GCALIGNED_STRUCT)
(TERMINAL_FONT_CACHE):
* src/process.c (wait_reading_process_output):
* src/pgtkterm.h:
* src/pgtkterm.c:
* src/pgtkselect.h:
* src/pgtkselect.c:
* src/pgtkgui.h:
* src/pgtkfns.c:
* src/image.c:
(XGetPixel, XPutPixel, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_destroy_x_image, gui_put_x_image, image_get_x_image)
(Create_Pixmap_From_Bitmap_Data, xbm_load_image, )
(xpm_load_image, lookup_rgb_color, image_disable_image)
(image_build_heuristic_mask, imagemagick_load_image):
* src/gtkutil.h:
* src/gtkutil.c (PGTK_TRACE, xg_set_screen, xg_display_open)
(xg_display_close, xg_create_default_cursor)
(xg_get_pixbuf_from_pix_and_mask, xg_check_special_colors)
(qttip_cb, hierarchy_ch_cb, xg_prepare_tooltip, )
(xg_show_tooltip, xg_hide_tooltip, xg_frame_resized)
(xg_frame_set_char_size, xg_height_or_width_changed)
(xg_set_widget_bg, style_changed_cb, xg_create_frame_widgets)
(xg_free_frame_widgets, x_wm_set_size_hint, xg_frame_restack)
(xg_mark_data, xg_update_frame_menubar, free_frame_menubar)
(xg_update_submenu, xg_finish_scroll_bar_creation)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_event_is_for_scrollbar)
(draw_page, xg_pack_tool_bar, xg_create_tool_bar)
(xg_update_tool_bar_sizes, update_frame_tool_bar)
(free_frame_tool_bar, xg_change_toolbar_position):
* src/ftcrfont.c:
(ftcrfont_draw):
* src/fringe.c:
(init_fringe_bitmap):
* src/frame.h (GCALIGNED_STRUCT, FRAME_WINDOW_P):
* src/frame.c (Fframep):
* src/font.h:
* src/font.c (syms_of_font):
* src/emacsgtkfixed.c:
(emacs_fixed_get_preferred_width)
(emacs_fixed_get_preferred_height, XSetWMSizeHints):
* src/emacs.c (main):
* src/dispnew.c (init_display_interactive):
* src/dispextern.h:
* src/alloc.c:
(garbage_collect):
* src/Makefile.in (PGTK_OBJ, PGTK_LIBS, base_obj, LIBES):
* src/.gdbinit:
* lisp/url/url-privacy.el (url-setup-privacy-info):
* lisp/term/pgtk-win.el (featurep):
* lisp/startup.el (command-line, fancy-splash-frame):
* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select):
* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):
* lisp/loadup.el (featurep):
* lisp/international/mule-cmds.el (set-coding-system-map):
* lisp/frame.el (pgtk-frame-geometry, frame-geometry)
(w32-frame-edges, frame-edges)
(pgtk-mouse-absolute-pixel-position)
(mouse-absolute-pixel-position)
(pgtk-set-mouse-absolute-pixel-position)
(pgtk-frame-list-z-order, frame-list-z-order)
(pgtk-frame-restack, frame-restack, display-mouse-p)
(display-graphic-p, display-symbol-keys-p, )
(display-pixel-height, display-mm-height, display-mm-width)
(display-backing-store, display-save-under, display-color-cells)
(display-planes, display-visual-class)
(pgtk-display-monitor-attributes-list)
(display-monitor-attributes-list):
* lisp/faces.el (face-spec-set-match-display, tool-bar):
* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed, custom-display):
* configure.ac (AUTO_DEPEND, XARGS_LIMIT, XWIDGETS_OBJ):
Jared Finder [Sun, 15 Nov 2020 07:44:26 +0000 (23:44 -0800)]
Migrate usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.
* src/termhooks.h (enum event_kind):
* src/term.c (term_mouse_click, handle_one_term_event):
* src/keyboard.c (discard_mouse_events, make_lispy_event): Migrate
usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.
Stefan Monnier [Sat, 21 Nov 2020 00:28:34 +0000 (19:28 -0500)]
* lisp/emacs-lisp/package.el (package-strip-rcs-id): Don't ignore errors
Ignoring errors here just postpones the error and replaces a clear
"invalid version syntax" with a confusing "package lacks a version".
Mauro Aranda [Fri, 20 Nov 2020 22:28:03 +0000 (19:28 -0300)]
Use cl-letf instead of unwind-protect in a test
* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Good use case for cl-letf, so use it.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca> in:
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00914.html
Stefan Monnier [Fri, 20 Nov 2020 21:54:06 +0000 (16:54 -0500)]
* test/manual/indent/tcl.tcl: Add string interpolation case
Stefan Monnier [Fri, 20 Nov 2020 21:45:56 +0000 (16:45 -0500)]
Don't optimize away `eval` when its lexical context is different
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-eval):
Obey lexical-binding.