MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Show

Method Show

Source/Engine/Platform/SDL/SDLWindow.cpp:586–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void SDLWindow::Show()
587{
588 if (_visible)
589 return;
590
591 if (_showAfterFirstPaint)
592 {
593 if (RenderTask)
594 RenderTask->Enabled = true;
595 return;
596 }
597
598 SDL_ShowWindow(_window);
599 if (_settings.AllowInput && _settings.ActivateWhenFirstShown)
600 Focus();
601 else if (_settings.Parent == nullptr)
602 BringToFront();
603
604 // Reused top-most windows doesn't stay on top for some reason
605 if (_settings.IsTopmost && !IsPopupWindow(_settings.Type))
606 SetIsAlwaysOnTop(true);
607
608 if (_isTrackingMouse)
609 {
610 if (!SDL_CaptureMouse(true))
611 {
612 if (!SDLPlatform::UsesWayland()) // Suppress "That operation is not supported" errors
613 LOG(Warning, "SDL_CaptureMouse: {0}", String(SDL_GetError()));
614 }
615 }
616
617 WindowBase::Show();
618}
619
620void SDLWindow::Hide()
621{

Callers

nothing calls this directly

Calls 4

FocusFunction · 0.85
BringToFrontFunction · 0.85
IsPopupWindowFunction · 0.85
StringClass · 0.50

Tested by

no test coverage detected