diff options
author | Po Lu <luangruo@yahoo.com> | 2022-06-13 12:49:12 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-06-13 12:49:12 +0800 |
commit | 16df1f4fae5414556e905ec0f1c1c565e17cb7ae (patch) | |
tree | 2d84e29c3f0e7ea926a6ffca592b5ad35c12e69c | |
parent | 1ce0d8d9efee60d7bc6d4b81c7e7d6be508c0b7b (diff) | |
download | emacs-16df1f4fae5414556e905ec0f1c1c565e17cb7ae.tar.gz emacs-16df1f4fae5414556e905ec0f1c1c565e17cb7ae.tar.bz2 emacs-16df1f4fae5414556e905ec0f1c1c565e17cb7ae.zip |
Improve DND tooltip updating
* src/xterm.c (x_dnd_update_tooltip_now): Add missing part of
last change.
(x_monitors_changed_cb, handle_one_xevent): Only update if a
change in monitor configuration really happened.
-rw-r--r-- | src/xterm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/xterm.c b/src/xterm.c index 4bc4c53eea2..81b3b5cbeff 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -15335,7 +15335,7 @@ x_dnd_update_tooltip_now (void) if (!x_dnd_in_progress || !x_dnd_update_tooltip) return; - dpyinfo = FRAME_DISPLAY_INFO (XFRAME (x_dnd_frame)); + dpyinfo = FRAME_DISPLAY_INFO (x_dnd_frame); rc = XQueryPointer (dpyinfo->display, dpyinfo->root_window, @@ -15721,14 +15721,14 @@ x_monitors_changed_cb (GdkScreen *gscr, gpointer user_data) ie.arg = terminal; kbd_buffer_store_event (&ie); - } - dpyinfo->last_monitor_attributes_list = current_monitors; + if (x_dnd_in_progress && x_dnd_update_tooltip) + x_dnd_monitors = current_monitors; - if (x_dnd_in_progress && x_dnd_update_tooltip) - x_dnd_monitors = current_monitors; + x_dnd_update_tooltip_now (); + } - x_dnd_update_tooltip_now (); + dpyinfo->last_monitor_attributes_list = current_monitors; } #endif @@ -21548,7 +21548,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_in_progress && x_dnd_update_tooltip) x_dnd_monitors = current_monitors; - x_dnd_update_tooltip_now (); + if (inev.ie.kind != NO_EVENT) + x_dnd_update_tooltip_now (); } #endif OTHER: |