From d09bf56818b0670925fad7f4a63e5c11b7a29e91 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 27 Feb 2025 11:39:21 -0500
Subject: [PATCH] clipboard: Cleanup coding style
---
src/events/SDL_clipboardevents.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/events/SDL_clipboardevents.c b/src/events/SDL_clipboardevents.c
index 0296ceda7eb63..d5cf8ad7b8150 100644
--- a/src/events/SDL_clipboardevents.c
+++ b/src/events/SDL_clipboardevents.c
@@ -29,14 +29,16 @@
void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t num_mime_types)
{
if (!owner) {
- // Clear our internal clipboard contents when external clipboard is set
- /* Wayland sends a data offer to the client from which the clipboard data originated, and as there is no way
- * to determine the origin of the offer, the clipboard must not be cleared in the case of a recursive offer,
- * or the original data may be destroyed. Cleanup will be done in the backend when an offer cancellation
- * event arrives.
+ /* Clear our internal clipboard contents when external clipboard is set.
+ *
+ * Wayland recursively sends a data offer to the client from which the clipboard data originated,
+ * and as the client can't determine the origin of the offer, the clipboard must not be cleared,
+ * or the original data may be destroyed. Cleanup will be done in the backend when an offer
+ * cancellation event arrives.
*/
- if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "wayland") != 0)
+ if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "wayland") != 0) {
SDL_CancelClipboardData(0);
+ }
SDL_SaveClipboardMimeTypes((const char **)mime_types, num_mime_types);
}