XMUPDATEDISPLAY(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

πŸ’… XmUpdateDisplay β€” the Motif glow-up moment

okay so bestie, real talk: this one lives in the library call section of the manual (the XmUpdateDisplay(library call) crew πŸ’–), and it's literally the function that processes all pending exposure events immediately. no cap.


✨ NAME ✨

XmUpdateDisplay β€” a function that processes all pending exposure events immediately. that's the whole vibe. periodt. 🫢


🌸 SYNOPSIS 🌸

void XmUpdateDisplay (widget)
        Widget  widget;
(void)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and it's actually kind of iconic: XmUpdateDisplay gives your application a mechanism for forcing all pending exposure events to be removed from the input queue and processed immediately. like, right now. not later. now. πŸ’…

here's the scenario that made this function necessary, and honestly it's so relatable 😭 β€” when a user selects a button within a menu pane, the menu panes get unposted and then any activation callbacks registered by the application are invoked. cool, cool, fine. BUT. if one of those callbacks performs a time-consuming action, the portion of the application window that was covered by the menu panes will not have been redrawn, because normal exposure processing does not occur until all of the callbacks have been invoked. so your window is just... sitting there. half-dressed. not giving main character energy at all. πŸ’€

so if the application writer suspects that a callback will take a long time, then the callback may choose to invoke XmUpdateDisplay before starting its time-consuming operation. slay. that way the window gets its little refresh moment first, and then you go do the slow thing. 🌈

and bestie, this function is also useful any time a transient window, such as a dialog box, is unposted β€” because callbacks are invoked before normal exposure processing can occur. same energy, different widget. πŸ‘‘

the one and only argument 🌸

  • widget β€” Specifies any widget or gadget. literally any of them. it's not picky, it's not exclusive, it's giving accepting. πŸ’œ

⚠️ heads up: this is a void function β€” it returns nothing, so don't go looking for a return value, you will not find one, and that's on purpose. πŸŽ€

and that's the whole page, bestie β€” this was XmUpdateDisplay(library call), same as the header up top, just here to tuck you in at the bottom. mwah. πŸ’– ✨ πŸ¦‹ πŸŽ€ πŸ’