aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2024-08-04 15:19:37 +0300
committerMihai Fufezan <[email protected]>2024-08-04 15:19:37 +0300
commit5dd2c27b631f16e49a2c6e6cbbefba9fa50bf543 (patch)
treecb145c5eb46250dd7abece115524dbc5ebba46d7 /src/render/OpenGL.cpp
parent4ae89e1f227d8b19afe8c692033ab894e053c7ec (diff)
downloadHyprland-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.cpp8
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) {