mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-24 01:09:49 +01:00
parent
f16f170433
commit
25add26881
3 changed files with 20 additions and 10 deletions
|
@ -899,11 +899,12 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
|
||||||
g_pInputManager->setPointerConfigs();
|
g_pInputManager->setPointerConfigs();
|
||||||
g_pInputManager->setTouchDeviceConfigs();
|
g_pInputManager->setTouchDeviceConfigs();
|
||||||
g_pInputManager->setTabletConfigs();
|
g_pInputManager->setTabletConfigs();
|
||||||
}
|
|
||||||
|
|
||||||
if (!isFirstLaunch)
|
|
||||||
g_pHyprOpenGL->m_bReloadScreenShader = true;
|
g_pHyprOpenGL->m_bReloadScreenShader = true;
|
||||||
|
|
||||||
|
g_pHyprOpenGL->ensureBackgroundTexturePresence();
|
||||||
|
}
|
||||||
|
|
||||||
// parseError will be displayed next frame
|
// parseError will be displayed next frame
|
||||||
|
|
||||||
if (result.error)
|
if (result.error)
|
||||||
|
|
|
@ -2699,10 +2699,6 @@ void CHyprOpenGLImpl::initMissingAssetTexture() {
|
||||||
void CHyprOpenGLImpl::initAssets() {
|
void CHyprOpenGLImpl::initAssets() {
|
||||||
initMissingAssetTexture();
|
initMissingAssetTexture();
|
||||||
|
|
||||||
static auto PFORCEWALLPAPER = CConfigValue<Hyprlang::INT>("misc:force_default_wallpaper");
|
|
||||||
|
|
||||||
const auto FORCEWALLPAPER = std::clamp(*PFORCEWALLPAPER, static_cast<int64_t>(-1L), static_cast<int64_t>(2L));
|
|
||||||
|
|
||||||
m_pLockDeadTexture = loadAsset("lockdead.png");
|
m_pLockDeadTexture = loadAsset("lockdead.png");
|
||||||
m_pLockDead2Texture = loadAsset("lockdead2.png");
|
m_pLockDead2Texture = loadAsset("lockdead2.png");
|
||||||
|
|
||||||
|
@ -2712,9 +2708,20 @@ void CHyprOpenGLImpl::initAssets() {
|
||||||
"unknown"),
|
"unknown"),
|
||||||
CHyprColor{0.9F, 0.9F, 0.9F, 0.7F}, 20, true);
|
CHyprColor{0.9F, 0.9F, 0.9F, 0.7F}, 20, true);
|
||||||
|
|
||||||
// create the default background texture
|
ensureBackgroundTexturePresence();
|
||||||
{
|
}
|
||||||
std::string texPath = std::format("{}", "wall");
|
|
||||||
|
void CHyprOpenGLImpl::ensureBackgroundTexturePresence() {
|
||||||
|
static auto PNOWALLPAPER = CConfigValue<Hyprlang::INT>("misc:disable_hyprland_logo");
|
||||||
|
static auto PFORCEWALLPAPER = CConfigValue<Hyprlang::INT>("misc:force_default_wallpaper");
|
||||||
|
|
||||||
|
const auto FORCEWALLPAPER = std::clamp(*PFORCEWALLPAPER, static_cast<int64_t>(-1L), static_cast<int64_t>(2L));
|
||||||
|
|
||||||
|
if (*PNOWALLPAPER)
|
||||||
|
m_pBackgroundTexture.reset();
|
||||||
|
else if (!m_pBackgroundTexture) {
|
||||||
|
// create the default background texture
|
||||||
|
std::string texPath = "wall";
|
||||||
|
|
||||||
// get the adequate tex
|
// get the adequate tex
|
||||||
if (FORCEWALLPAPER == -1) {
|
if (FORCEWALLPAPER == -1) {
|
||||||
|
|
|
@ -223,6 +223,8 @@ class CHyprOpenGLImpl {
|
||||||
|
|
||||||
void setDamage(const CRegion& damage, std::optional<CRegion> finalDamage = {});
|
void setDamage(const CRegion& damage, std::optional<CRegion> finalDamage = {});
|
||||||
|
|
||||||
|
void ensureBackgroundTexturePresence();
|
||||||
|
|
||||||
uint32_t getPreferredReadFormat(PHLMONITOR pMonitor);
|
uint32_t getPreferredReadFormat(PHLMONITOR pMonitor);
|
||||||
std::vector<SDRMFormat> getDRMFormats();
|
std::vector<SDRMFormat> getDRMFormats();
|
||||||
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
|
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
|
||||||
|
@ -293,7 +295,7 @@ class CHyprOpenGLImpl {
|
||||||
CShader m_sFinalScreenShader;
|
CShader m_sFinalScreenShader;
|
||||||
CTimer m_tGlobalTimer;
|
CTimer m_tGlobalTimer;
|
||||||
|
|
||||||
SP<CTexture> m_pMissingAssetTexture, m_pBackgroundTexture, m_pLockDeadTexture, m_pLockDead2Texture, m_pLockTtyTextTexture;
|
SP<CTexture> m_pMissingAssetTexture, m_pBackgroundTexture, m_pLockDeadTexture, m_pLockDead2Texture, m_pLockTtyTextTexture; // TODO: don't always load lock
|
||||||
|
|
||||||
void logShaderError(const GLuint&, bool program = false);
|
void logShaderError(const GLuint&, bool program = false);
|
||||||
GLuint createProgram(const std::string&, const std::string&, bool dynamic = false);
|
GLuint createProgram(const std::string&, const std::string&, bool dynamic = false);
|
||||||
|
|
Loading…
Reference in a new issue