MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ sync_size()

void MayaFlux::Portal::Forma::Context::sync_size ( )

Run the resize callbacks if the window's size differs from the size they last saw.

A window can reach its real size after the callbacks were registered, for instance when the compositor answers the requested size with another, and the resize event that carried it may predate them. Input events call this first, so the callbacks catch up on the first pointer or key event; call it directly to catch up sooner. A no-op when the size has not changed.

Definition at line 537 of file Context.cpp.

538{
539 if (!m_window) {
540 return;
541 }
542
543 const auto& state = m_window->get_state();
544 if (state.current_width != m_known_width || state.current_height != m_known_height) {
545 handle_resize(state.current_width, state.current_height);
546 }
547}
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:356
void handle_resize(uint32_t width, uint32_t height)
Definition Context.cpp:549

References handle_resize(), m_known_height, m_known_width, and m_window.

Referenced by handle_key_press(), handle_move(), handle_press(), handle_scroll(), and handle_text().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: