Make the example more true

This commit is contained in:
mattkae 2023-02-18 14:09:01 -05:00
parent cde75070d3
commit d158d619c6
3 changed files with 20 additions and 2 deletions

3
.gitignore vendored
View File

@ -34,4 +34,5 @@
# Custom
mir-builder.*
build
Technical_Test_-_Software_Engineer_-_Mir_-_Google_Docs.pdf
Technical_Test_-_Software_Engineer_-_Mir_-_Google_Docs.pdf
.cache

View File

@ -5,7 +5,9 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
@ -17,4 +19,4 @@ find_package(OpenGL REQUIRED)
add_executable(compositor src/main.cpp)
target_include_directories(compositor PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
target_link_libraries( compositor ${MIRAL_LDFLAGS})
target_link_libraries( compositor ${MIRAL_LDFLAGS})

View File

@ -68,11 +68,26 @@ int main(int argc, char const* argv[]) {
};
};
Keymap config_keymap;
auto run_startup_apps = [&](std::string const& apps)
{
for (auto i = begin(apps); i != end(apps); )
{
auto const j = find(i, end(apps), ':');
external_client_launcher.launch(std::vector<std::string>{std::string{i, j}});
if ((i = j) != end(apps)) ++i;
}
};
return runner.run_with(
{
set_window_management_policy<MinimalWindowManager>(),
WaylandExtensions{},
X11Support{},
AppendEventFilter{quit_on_ctrl_alt_bksp},
config_keymap
});
return EXIT_SUCCESS;
}