<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/xselect.c, branch scratch/noverlay</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>; * src/xselect.c (x_handle_selection_request): Fix typo in last change.</title>
<updated>2022-11-12T11:01:30+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-11-12T07:51:02+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=505e8c5b295bf3ae3b84fab82e224fad3d93a610'/>
<id>505e8c5b295bf3ae3b84fab82e224fad3d93a610</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix implementation of MULTIPLE</title>
<updated>2022-11-12T11:01:30+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-11-12T07:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=25c6bc7a3d3679b26406bbcac33954186db491f2'/>
<id>25c6bc7a3d3679b26406bbcac33954186db491f2</id>
<content type='text'>
* src/xselect.c (x_handle_selection_request): Make sure the type
of a reply to a MULTIPLE request is ATOM_PAIR.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xselect.c (x_handle_selection_request): Make sure the type
of a reply to a MULTIPLE request is ATOM_PAIR.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix drag-and-drop bugs on Lucid build</title>
<updated>2022-10-25T11:51:08+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-10-25T11:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b6097fe279b03e2fb50fc6af063d7c8f1e55fe8b'/>
<id>b6097fe279b03e2fb50fc6af063d7c8f1e55fe8b</id>
<content type='text'>
Also, optimize Fx_translate_coordinates to avoid excessive calls
to _XReply.

* lisp/x-dnd.el (x-dnd-get-drop-rectangle): Return empty drop
rectangle if posn-area.
* src/xfns.c (Fx_translate_coordinates): Accept arg
`require_child'.  If not set, allow optimizations based on
cached position data.
* src/xselect.c (x_handle_dnd_message): Use
x_translate_coordinates.
* src/xterm.c (x_translate_coordinates): Export function.
(x_handle_translate_coordinates): New function.
(handle_one_xevent): Fix coding style.
* src/xterm.h: Update prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, optimize Fx_translate_coordinates to avoid excessive calls
to _XReply.

* lisp/x-dnd.el (x-dnd-get-drop-rectangle): Return empty drop
rectangle if posn-area.
* src/xfns.c (Fx_translate_coordinates): Accept arg
`require_child'.  If not set, allow optimizations based on
cached position data.
* src/xselect.c (x_handle_dnd_message): Use
x_translate_coordinates.
* src/xterm.c (x_translate_coordinates): Export function.
(x_handle_translate_coordinates): New function.
(handle_one_xevent): Fix coding style.
* src/xterm.h: Update prototypes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix pieces of code being too expensive over slow network connections</title>
<updated>2022-10-17T13:00:09+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-10-17T12:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=abf683bb0324b9c5d01adb90aedb6aa6fa7175e9'/>
<id>abf683bb0324b9c5d01adb90aedb6aa6fa7175e9</id>
<content type='text'>
* lisp/menu-bar.el (menu-bar-edit-menu): Test buffer-read-only
before gui-backend-selection-exists-p.  This places the less
expensive condition before the more expensive one.
* src/xfns.c (compute_tip_xy): Use cached monitor attributes
whenever available.
(Fx_show_tip): Remove code that really did nothing.
(Fx_backspace_delete_keys_p): Do not download the entire keymap
from the server upon creating a frame.
* src/xmenu.c (create_and_show_popup_menu): Use
x_translate_coordinates_to_root.
(x_menu_show): Use x_translate_coordinates_to_root.
* src/xselect.c (Fx_selection_exists_p): If a temporary
selection owner can be found, use it.
* src/xterm.c (x_translate_coordinates_to_root)
(x_handle_selection_monitor_event, x_find_selection_owner): New
functions.  These functions try to avoid downloading data from
the X server in places that are called very often (i.e. during
tool bar updates.)
(handle_one_xevent): Handle selection notify events.  Also catch
some mistakes found.  Fetch all kinds of key names as well.
(x_create_special_window): New function.
(x_term_init, x_delete_display): Ask for all key names.  Also,
passively monitor selections that are given to
`x-selection-exists-p' during redisplay, so we do not have to
ask the server about them upon each redisplay.
(syms_of_xterm): New variable `x-fast-selection-list'.
* src/xterm.h (struct x_monitored_selection): New structure.
(X_INVALID_WINDOW): New define.
(struct x_display_info): New fields for selection monitoring.
Also, record the fixes extension base.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/menu-bar.el (menu-bar-edit-menu): Test buffer-read-only
before gui-backend-selection-exists-p.  This places the less
expensive condition before the more expensive one.
* src/xfns.c (compute_tip_xy): Use cached monitor attributes
whenever available.
(Fx_show_tip): Remove code that really did nothing.
(Fx_backspace_delete_keys_p): Do not download the entire keymap
from the server upon creating a frame.
* src/xmenu.c (create_and_show_popup_menu): Use
x_translate_coordinates_to_root.
(x_menu_show): Use x_translate_coordinates_to_root.
* src/xselect.c (Fx_selection_exists_p): If a temporary
selection owner can be found, use it.
* src/xterm.c (x_translate_coordinates_to_root)
(x_handle_selection_monitor_event, x_find_selection_owner): New
functions.  These functions try to avoid downloading data from
the X server in places that are called very often (i.e. during
tool bar updates.)
(handle_one_xevent): Handle selection notify events.  Also catch
some mistakes found.  Fetch all kinds of key names as well.
(x_create_special_window): New function.
(x_term_init, x_delete_display): Ask for all key names.  Also,
passively monitor selections that are given to
`x-selection-exists-p' during redisplay, so we do not have to
ask the server about them upon each redisplay.
(syms_of_xterm): New variable `x-fast-selection-list'.
* src/xterm.h (struct x_monitored_selection): New structure.
(X_INVALID_WINDOW): New define.
(struct x_display_info): New fields for selection monitoring.
Also, record the fixes extension base.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash while converting empty vector to X data</title>
<updated>2022-09-05T01:51:22+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-09-05T01:51:05+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=21c8a9d944b37e431f56738c10a9fa7a75f4c3a9'/>
<id>21c8a9d944b37e431f56738c10a9fa7a75f4c3a9</id>
<content type='text'>
* src/xselect.c (lisp_data_to_selection_data): Assume an empty
vector represents INTEGER data, instead of blindly trying to
aref it's first element.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xselect.c (lisp_data_to_selection_data): Assume an empty
vector represents INTEGER data, instead of blindly trying to
aref it's first element.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix junk data being returned with incremental selection transfers</title>
<updated>2022-08-30T11:28:03+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-08-30T11:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0bf5463f8147ea9143d286d5a9df7c8421a1ac4b'/>
<id>0bf5463f8147ea9143d286d5a9df7c8421a1ac4b</id>
<content type='text'>
* src/xselect.c (receive_incremental_selection): New arg
REAL_BYTES_RET.  Set it to the actual size instead of using the
size of the array after it was grown by xpalloc.
(x_get_window_property_as_lisp_data): Adjust call to
receive_incremental_selection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xselect.c (receive_incremental_selection): New arg
REAL_BYTES_RET.  Set it to the actual size instead of using the
size of the array after it was grown by xpalloc.
(x_get_window_property_as_lisp_data): Adjust call to
receive_incremental_selection.
</pre>
</div>
</content>
</entry>
<entry>
<title>Copy-edit doc strings and comments wrt bignum and fixnum</title>
<updated>2022-08-18T15:10:46+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2022-08-18T10:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=f33a429a53ea2647199804f12e16c65768d526d5'/>
<id>f33a429a53ea2647199804f12e16c65768d526d5</id>
<content type='text'>
Don't say that a value is a fixnum if small enough and a bignum
otherwise, because that is now how Lisp integers always work,
and we generally don't expose the fixnum/bignum difference to the user
unless really necessary.

* src/charset.c (Fencode_char):
* src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid)
(Fgroup_real_gid, Femacs_pid):
* src/font.c (Ffont_variation_glyphs):
* src/process.c (Fprocess_id):
Edit doc strings.
* src/pgtkselect.c:
* src/xselect.c: Edit comments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't say that a value is a fixnum if small enough and a bignum
otherwise, because that is now how Lisp integers always work,
and we generally don't expose the fixnum/bignum difference to the user
unless really necessary.

* src/charset.c (Fencode_char):
* src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid)
(Fgroup_real_gid, Femacs_pid):
* src/font.c (Ffont_variation_glyphs):
* src/process.c (Fprocess_id):
Edit doc strings.
* src/pgtkselect.c:
* src/xselect.c: Edit comments.
</pre>
</div>
</content>
</entry>
<entry>
<title>Only preserve PRIMARY and CLIPBOARD selection ownership by default</title>
<updated>2022-07-15T13:47:09+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-07-15T13:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c96a6a0c9fc44be846834ab1d7d8d527dc8dc5e9'/>
<id>c96a6a0c9fc44be846834ab1d7d8d527dc8dc5e9</id>
<content type='text'>
* lisp/cus-start.el (standard): Update defcustom type.
* src/xselect.c (x_should_preserve_selection): New function.
(x_clear_frame_selections): Use it to determine whether or not
to preserve a selection.
* src/xterm.c (x_preserve_selections): Fix tail initialization.
(syms_of_xterm): Update doc string of
`x-auto-preserve-selections'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/cus-start.el (standard): Update defcustom type.
* src/xselect.c (x_should_preserve_selection): New function.
(x_clear_frame_selections): Use it to determine whether or not
to preserve a selection.
* src/xterm.c (x_preserve_selections): Fix tail initialization.
(syms_of_xterm): Update doc string of
`x-auto-preserve-selections'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix closing displays when preserving selections is enabled</title>
<updated>2022-07-13T03:01:59+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-07-13T03:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6be201cf51e0b1c69e713dec318cef18eef4c617'/>
<id>6be201cf51e0b1c69e713dec318cef18eef4c617</id>
<content type='text'>
* src/frame.c (delete_frame): Bind `x-auto-preserve-selections'
to nil if deleting display.
* src/xselect.c (x_clear_frame_selections): Pass original frame
to that function.
* src/xterm.c (x_preserve_selections): Fix determining the new
owner.
(syms_of_xterm): New defsym `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/frame.c (delete_frame): Bind `x-auto-preserve-selections'
to nil if deleting display.
* src/xselect.c (x_clear_frame_selections): Pass original frame
to that function.
* src/xterm.c (x_preserve_selections): Fix determining the new
owner.
(syms_of_xterm): New defsym `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Try to save selections from being disowned during frame deletion</title>
<updated>2022-07-12T02:47:51+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-07-12T02:47:23+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=86d128c6c3acca1665addc65aa43ff80572f46e8'/>
<id>86d128c6c3acca1665addc65aa43ff80572f46e8</id>
<content type='text'>
* lisp/cus-start.el (standard): Add
`x-auto-preserve-selections'.
* src/xselect.c (x_clear_frame_selections): Collect deleted
selections into a variable and preserve them.
* src/xterm.c (x_preserve_selections): New function.
(syms_of_xterm): New variable `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/cus-start.el (standard): Add
`x-auto-preserve-selections'.
* src/xselect.c (x_clear_frame_selections): Collect deleted
selections into a variable and preserve them.
* src/xterm.c (x_preserve_selections): New function.
(syms_of_xterm): New variable `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.
</pre>
</div>
</content>
</entry>
</feed>
