mirror of
https://gitlab.gnome.org/GNOME/evince
synced 2024-06-30 22:54:23 +00:00
Fix crash when annotation window is closed outside of Evince
Under Wayland, when closing an Evince annotation window directly from the desktop compositor e.g. gnome-shell then Evince would crash when trying to draw the window as it haven't noticed it has gone. Fixed by listening to "delete-event" signal so Evince notices the closing and acts accordingly. Fixes #2009
This commit is contained in:
parent
f4acdb58e3
commit
64596bd624
|
@ -343,6 +343,9 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
g_signal_connect_swapped (window->close_button, "clicked",
|
||||
G_CALLBACK (ev_annotation_window_close),
|
||||
window);
|
||||
/* Handle case when window is closed from outside Evince e.g. by desktop compositor */
|
||||
g_signal_connect (GTK_WIDGET (window), "delete-event",
|
||||
G_CALLBACK (ev_annotation_window_close), NULL);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), window->close_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (window->close_button);
|
||||
|
|
Loading…
Reference in New Issue
Block a user