diff options
author | Mihai Fufezan <[email protected]> | 2024-08-04 15:19:37 +0300 |
---|---|---|
committer | Mihai Fufezan <[email protected]> | 2024-08-04 15:19:37 +0300 |
commit | 5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543 (patch) | |
tree | cb145c5eb46250dd7abece115524dbc5ebba46d7 /src/render/OpenGL.cpp | |
parent | 4ae89e1f227d8b19afe8c692033ab894e053c7ec (diff) | |
download | Hyprland-5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543.tar.gz Hyprland-5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543.zip |
CMake, Meson: install config and wallpapers to DATADIR/hypr
OpenGL: get wallpapers dir from DATAROOTDIR
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r-- | src/render/OpenGL.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index b925fcc9..ea388df0 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -2669,10 +2669,12 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) { PFB->alloc(pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y, pMonitor->output->state->state().drmFormat); if (!m_pBackgroundTexture) { - // TODO: use relative paths to the installation - // or configure the paths at build time std::string texPath = ""; - texPath = "/usr/share/hyprland/wall"; +#ifndef DATAROOTDIR + texPath = "/usr/share/hypr/wall"; +#else + texPath = std::format("{}{}", DATAROOTDIR, "/hypr/wall"); +#endif // get the adequate tex if (FORCEWALLPAPER == -1) { |