XMCLIPBOARDUNLOCK(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– XmClipboardUnlock πŸ’–

okay bestie, gather round, because we're talking about XmClipboardUnlock β€” a clipboard function from the Xm library calls that unlocks the clipboard πŸ”“βœ¨ yes, the whole vibe is "let go of the thing so other apps can touch it."


✨ SYNOPSIS ✨

like, here's the receipts, no cap:

#include <Xm/CutPaste.h>
int XmClipboardUnlock (display, window, remove_all_locks)
        Display * display;
        Window  window;
        Boolean remove_all_locks;
(void)

🌸 DESCRIPTION 🌸

XmClipboardUnlock unlocks the clipboard, which literally just means it enables the clipboard to be accessed by other applications. sharing is caring, periodt 🫢

okay but here's the part that gets people: if you called XmClipboardLock multiple times, then you need the same number of calls to XmClipboardUnlock to actually unlock the clipboard β€” it's a nesting thing, not a one-and-done β€” unless you set remove_all_locks to True, in which case it clears the whole stack in one go. it's giving "unsubscribe from all" energy πŸ’…

the args, one by one πŸŽ€

  • display β€” a pointer to the Display structure that came back from a previous call to XOpenDisplay or XtDisplay. you know, the one you already have lying around.
  • window β€” the window ID of a widget that relates the application window to the clipboard. you can grab it through XtWindow. and listen: the same application instance should pass the same window ID to each of the clipboard functions that it calls. consistency is the whole look, iykyk πŸ‘‘
  • remove_all_locks β€” when True, it indicates that all nested locks should be removed. when False, it indicates that only one level of lock should be removed. so like, one layer at a time, or scorched earth. your call bestie 😌

⭐ RETURN ⭐

here's what you get back:

  • XmClipboardSuccess β€” the function was successful. slay, we ate πŸŽ‰
  • XmClipboardFail β€” the function failed because the clipboard was not locked, or was locked by another application. 😭 so awkward. not your clipboard, not your business.

the whole clipboard friend group, all in one place β€” go say hi:


and that's the whole page, bestie 🌈 this one lives in the library call section of the manual under the name XmClipboardUnlock β€” same title up top, same title at the bottom, absolutely iconic of it. mwah, go unlock something πŸ’‹πŸ’–