aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-06-13 12:49:12 +0800
committerPo Lu2022-06-13 12:49:12 +0800
commit16df1f4fae5414556e905ec0f1c1c565e17cb7ae (patch)
tree2d84e29c3f0e7ea926a6ffca592b5ad35c12e69c /src
parent1ce0d8d9efee60d7bc6d4b81c7e7d6be508c0b7b (diff)
downloademacs-16df1f4fae5414556e905ec0f1c1c565e17cb7ae.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c15
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)
15335 if (!x_dnd_in_progress || !x_dnd_update_tooltip) 15335 if (!x_dnd_in_progress || !x_dnd_update_tooltip)
15336 return; 15336 return;
15337 15337
15338 dpyinfo = FRAME_DISPLAY_INFO (XFRAME (x_dnd_frame)); 15338 dpyinfo = FRAME_DISPLAY_INFO (x_dnd_frame);
15339 15339
15340 rc = XQueryPointer (dpyinfo->display, 15340 rc = XQueryPointer (dpyinfo->display,
15341 dpyinfo->root_window, 15341 dpyinfo->root_window,
@@ -15721,14 +15721,14 @@ x_monitors_changed_cb (GdkScreen *gscr, gpointer user_data)
15721 ie.arg = terminal; 15721 ie.arg = terminal;
15722 15722
15723 kbd_buffer_store_event (&ie); 15723 kbd_buffer_store_event (&ie);
15724 }
15725 15724
15726 dpyinfo->last_monitor_attributes_list = current_monitors; 15725 if (x_dnd_in_progress && x_dnd_update_tooltip)
15726 x_dnd_monitors = current_monitors;
15727 15727
15728 if (x_dnd_in_progress && x_dnd_update_tooltip) 15728 x_dnd_update_tooltip_now ();
15729 x_dnd_monitors = current_monitors; 15729 }
15730 15730
15731 x_dnd_update_tooltip_now (); 15731 dpyinfo->last_monitor_attributes_list = current_monitors;
15732} 15732}
15733#endif 15733#endif
15734 15734
@@ -21548,7 +21548,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
21548 if (x_dnd_in_progress && x_dnd_update_tooltip) 21548 if (x_dnd_in_progress && x_dnd_update_tooltip)
21549 x_dnd_monitors = current_monitors; 21549 x_dnd_monitors = current_monitors;
21550 21550
21551 x_dnd_update_tooltip_now (); 21551 if (inev.ie.kind != NO_EVENT)
21552 x_dnd_update_tooltip_now ();
21552 } 21553 }
21553#endif 21554#endif
21554 OTHER: 21555 OTHER: