MCPcopy Create free account
hub / github.com/SFML/SFML / ~WindowImplX11

Method ~WindowImplX11

src/SFML/Window/Unix/WindowImplX11.cpp:780–816  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

778
779////////////////////////////////////////////////////////////
780WindowImplX11::~WindowImplX11()
781{
782 using namespace WindowImplX11Impl;
783
784 // Cleanup graphical resources
785 cleanup();
786
787 // Destroy icon pixmap
788 if (m_iconPixmap)
789 XFreePixmap(m_display.get(), m_iconPixmap);
790
791 // Destroy icon mask pixmap
792 if (m_iconMaskPixmap)
793 XFreePixmap(m_display.get(), m_iconMaskPixmap);
794
795 // Destroy the cursor
796 if (m_hiddenCursor)
797 XFreeCursor(m_display.get(), m_hiddenCursor);
798
799 // Destroy the input context
800 if (m_inputContext)
801 XDestroyIC(m_inputContext);
802
803 // Destroy the window
804 if (m_window && !m_isExternal)
805 {
806 XDestroyWindow(m_display.get(), m_window);
807 XFlush(m_display.get());
808 }
809
810 // Remove this window from the global list of windows (required for focus request)
811 const std::lock_guard lock(allWindowsMutex);
812 allWindows.erase(std::find(allWindows.begin(), allWindows.end(), this));
813
814 // Set window group IDs on all existing windows, lock must be held
815 setWindowGroupIds();
816}
817
818
819////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 5

cleanupFunction · 0.85
getMethod · 0.80
eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected