[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/13] ui/gtk-clipboard: use existing macros
From: |
marcandre . lureau |
Subject: |
[PATCH v2 03/13] ui/gtk-clipboard: use existing macros |
Date: |
Wed, 21 Jul 2021 12:41:29 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Hardcoding strings is error prone, use dedicated macros instead.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/gtk-clipboard.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c
index bff28d2030..5e817ae55c 100644
--- a/ui/gtk-clipboard.c
+++ b/ui/gtk-clipboard.c
@@ -177,11 +177,11 @@ void gd_clipboard_init(GtkDisplayState *gd)
qemu_clipboard_peer_register(&gd->cbpeer);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD] =
- gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE));
+ gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_PRIMARY] =
- gtk_clipboard_get(gdk_atom_intern("PRIMARY", FALSE));
+ gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_SECONDARY] =
- gtk_clipboard_get(gdk_atom_intern("SECONDARY", FALSE));
+ gtk_clipboard_get(GDK_SELECTION_SECONDARY);
g_signal_connect(gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD],
"owner-change", G_CALLBACK(gd_owner_change), gd);
--
2.32.0.264.g75ae10bc75
- [PATCH v2 00/13] Clipboard fixes (for 6.1?), marcandre . lureau, 2021/07/21
- [PATCH v2 01/13] ui/vdagent: fix leak on error path, marcandre . lureau, 2021/07/21
- [PATCH v2 03/13] ui/gtk-clipboard: use existing macros,
marcandre . lureau <=
- [PATCH v2 02/13] ui/vdagent: remove copy-pasta comment, marcandre . lureau, 2021/07/21
- [PATCH v2 04/13] ui/gtk-clipboard: fix clipboard enum typo, marcandre . lureau, 2021/07/21
- [PATCH v2 05/13] ui/clipboard: add helper to retrieve current clipboard, marcandre . lureau, 2021/07/21
- [PATCH v2 06/13] ui/clipboard: release owned grabs on unregister, marcandre . lureau, 2021/07/21
- [PATCH v2 09/13] ui/vdagent: split clipboard recv message handling, marcandre . lureau, 2021/07/21
- [PATCH v2 10/13] ui/vdagent: use qemu_clipboard_info helper, marcandre . lureau, 2021/07/21
- [PATCH v2 11/13] ui/gtk-clipboard: use qemu_clipboard_info helper, marcandre . lureau, 2021/07/21
- [PATCH v2 12/13] ui/vdagent: send release when no clipboard owner, marcandre . lureau, 2021/07/21
- [PATCH v2 13/13] ui/gtk-clipboard: emit release clipboard events, marcandre . lureau, 2021/07/21
- [PATCH v2 07/13] ui/vdagent: disconnect handlers and reset state on finalize, marcandre . lureau, 2021/07/21