mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ui/gtk: warn if setting the clipboard failed
Just in case. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
668df86ee8
commit
bf53e20232
1 changed files with 8 additions and 5 deletions
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
#include "ui/gtk.h"
|
||||
|
@ -95,11 +96,13 @@ static void gd_clipboard_update_info(GtkDisplayState *gd,
|
|||
gtk_clipboard_clear(gd->gtkcb[s]);
|
||||
if (targets) {
|
||||
gd->cbowner[s] = true;
|
||||
gtk_clipboard_set_with_data(gd->gtkcb[s],
|
||||
targets, n_targets,
|
||||
gd_clipboard_get_data,
|
||||
gd_clipboard_clear,
|
||||
gd);
|
||||
if (!gtk_clipboard_set_with_data(gd->gtkcb[s],
|
||||
targets, n_targets,
|
||||
gd_clipboard_get_data,
|
||||
gd_clipboard_clear,
|
||||
gd)) {
|
||||
warn_report("Failed to set GTK clipboard");
|
||||
}
|
||||
|
||||
gtk_target_table_free(targets, n_targets);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue