]> git.eshelyaron.com Git - emacs.git/commit
Rewrite PGTK selection code from scratch
authorPo Lu <luangruo@yahoo.com>
Tue, 21 Jun 2022 14:03:42 +0000 (22:03 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 21 Jun 2022 14:05:21 +0000 (22:05 +0800)
commitbe35c92c90d455739a6ff9d4beefa2b35d044852
tree19c5be6b9e09ccb45c58a5008f8f956f3ad92d57
parentb1af8c2c00aefe6aa554a468e65b6e07c9f14722
Rewrite PGTK selection code from scratch

* src/frame.c (delete_frame): Clear selections and swallow
special events.

* src/keyboard.c (kbd_buffer_get_event, process_special_events):
Also handle selection events on PGTK.

* src/keyboard.h (union buffered_input_event): Include selection
events on PGTK.

* src/pgtkselect.c (symbol_to_gtk_clipboard, LOCAL_SELECTION):
New functions and macros.
(selection_type_to_quarks, get_func, clear_func): Delete
functions.
(pgtk_selection_init, pgtk_selection_lost):
(pgtk_selection_usable): New functions.
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): Complete rewrite.
(syms_of_pgtkselect): Update defsyms and add more hooks.

* src/pgtkselect.h: Delete file.

* src/pgtkterm.c (evq_enqueue): Set last user time based on the
event.
(pgtk_any_window_to_frame, button_event): Fix coding style.
(pgtk_set_event_handler): Add selection events.
(pgtk_find_selection_owner, pgtk_selection_event): New
functions.
(pgtk_term_init): Remove call to `pgtk_selection_init'.

* src/pgtkterm.h (struct pgtk_display_info): New field
`display'.
(enum selection_input_event): New struct.  New macros for
accessing its fields.
src/frame.c
src/keyboard.c
src/keyboard.h
src/pgtkselect.c
src/pgtkselect.h [deleted file]
src/pgtkterm.c
src/pgtkterm.h