MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getWindowId

Function getWindowId

source/MRViewer/MRFileDialogPortal.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37std::string getWindowId( GLFWwindow* window )
38{
39 // https://flatpak.github.io/xdg-desktop-portal/docs/window-identifiers.html
40#if GLFW_VERSION_MAJOR > 3 || ( GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4 )
41 switch ( glfwGetPlatform() )
42 {
43 case GLFW_PLATFORM_X11:
44 return fmt::format( "x11:{:08x}", glfwGetX11Window( window ) );
45 // TODO: Wayland support
46 default:
47 return "";
48 }
49#else
50 return fmt::format( "x11:{:08x}", glfwGetX11Window( window ) );
51#endif
52}
53
54void dbusAppend( DBusMessageIter& iter, std::byte value )
55{

Callers 1

runPortalFileDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected