[gtk/clipboard-test] Fix clipboard tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/clipboard-test] Fix clipboard tests
- Date: Fri, 30 Apr 2021 02:11:39 +0000 (UTC)
commit 9971892a4d1998124e7ce23a31cebba4ba8ba829
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 29 22:08:36 2021 -0400
Fix clipboard tests
Embarrassing bug: We are connecting to notify::is-active
to defer our clipboard operation until the window has focus.
But when we launch the getter instance with its own window,
we lose the focus, and get another notify::is-active emission.
Ignore the second one.
testsuite/gdk/clipboard-client.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/testsuite/gdk/clipboard-client.c b/testsuite/gdk/clipboard-client.c
index 726f50d45c..d11d17458a 100644
--- a/testsuite/gdk/clipboard-client.c
+++ b/testsuite/gdk/clipboard-client.c
@@ -188,6 +188,9 @@ do_it (GObject *object,
{
GdkClipboard *clipboard;
+ if (!gtk_window_is_active (GTK_WINDOW (object)))
+ return;
+
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
if (strcmp (action, "info") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]