mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
asyncResourceGatherer: support for home relative paths (#96)
This commit is contained in:
parent
d1f542a75f
commit
738cc241e3
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <pango/pangocairo.h>
|
||||
#include <algorithm>
|
||||
#include "../core/hyprlock.hpp"
|
||||
#include "../helpers/MiscFunctions.hpp"
|
||||
|
||||
std::mutex cvmtx;
|
||||
|
||||
|
@ -130,10 +131,11 @@ void CAsyncResourceGatherer::gather() {
|
|||
if (path.empty())
|
||||
continue;
|
||||
|
||||
std::string id = std::string{"background:"} + path;
|
||||
std::string id = std::string{"background:"} + path;
|
||||
const auto ABSOLUTEPATH = absolutePath(path, "").value_or(path);
|
||||
|
||||
// preload bg img
|
||||
const auto CAIROISURFACE = cairo_image_surface_create_from_png(path.c_str());
|
||||
const auto CAIROISURFACE = cairo_image_surface_create_from_png(ABSOLUTEPATH.c_str());
|
||||
|
||||
const auto CAIRO = cairo_create(CAIROISURFACE);
|
||||
cairo_scale(CAIRO, 1, 1);
|
||||
|
|
Loading…
Reference in a new issue