From 5e927eae1b613d3be228a9fe188b6a6ed324c8e9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 28 Jun 2025 10:46:57 +1000 Subject: [PATCH] Docs: corrections, clarifications to code-comments --- intern/ghost/GHOST_C-api.h | 3 ++- intern/ghost/GHOST_ISystem.hh | 7 +++++-- source/blender/windowmanager/intern/wm_files.cc | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 4c4a4af5746..a169d96eb07 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -925,7 +925,8 @@ extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, /** * Return the data from the clipboard - * \param selection: Boolean to return the selection instead, X11 only feature. + * \param selection: Boolean to return the selection instead. + * The capability flag: #GHOST_kCapabilityPrimaryClipboard can be used to check for supported. * \return clipboard data */ extern char *GHOST_getClipboard(bool selection); diff --git a/intern/ghost/GHOST_ISystem.hh b/intern/ghost/GHOST_ISystem.hh index 54394e3ac86..1e7786cc625 100644 --- a/intern/ghost/GHOST_ISystem.hh +++ b/intern/ghost/GHOST_ISystem.hh @@ -445,8 +445,11 @@ class GHOST_ISystem { ***************************************************************************************/ /** - * Returns the selection buffer - * \return "unsigned char" from X11 XA_CUT_BUFFER0 buffer + * Return the clipboard buffer or null. + * + * \param selection: Use the "primary" selection. + * Check the #GHOST_kCapabilityPrimaryClipboard for backends that support this. + * \return Returns the clipboard data as a null terminated string or null when unavailable. */ virtual char *getClipboard(bool selection) const = 0; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 3ddbfc1ed29..0844faa7549 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -2741,7 +2741,7 @@ static wmOperatorStatus wm_userpref_read_exec(bContext *C, wmOperator *op) BKE_callback_exec_null(bmain, BKE_CB_EVT_EXTENSION_REPOS_UPDATE_POST); - /* Needed to recalculate UI scaling values (eg, #UserDef.inv_dpi_fac). */ + /* Needed to recalculate UI scaling values (eg, #UserDef.inv_scale_factor). */ wm_window_clear_drawable(static_cast(bmain->wm.first)); WM_event_add_notifier(C, NC_WINDOW, nullptr);