sdgtk: don't follow our own selection

When the main window is focused, we are probably the owner of it.
This commit is contained in:
Přemysl Eric Janouch 2020-09-14 02:02:38 +02:00
parent aa19848499
commit e47667b28a
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -214,6 +214,7 @@ on_selection (GtkClipboard *clipboard, GdkEvent *event,
G_GNUC_UNUSED gpointer data)
{
if (g.watch_selection
&& !gtk_window_has_toplevel_focus (GTK_WINDOW (g.window))
&& event->owner_change.owner != NULL)
gtk_clipboard_request_text (clipboard, on_selection_received, NULL);
}