mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 19:25:59 +01:00
add config to disable hyprcursor
This commit is contained in:
parent
4b5313938a
commit
06323012a8
3 changed files with 6 additions and 2 deletions
|
@ -347,6 +347,7 @@ CConfigManager::CConfigManager() {
|
||||||
m_pConfig->addConfigValue("misc:close_special_on_empty", Hyprlang::INT{1});
|
m_pConfig->addConfigValue("misc:close_special_on_empty", Hyprlang::INT{1});
|
||||||
m_pConfig->addConfigValue("misc:background_color", Hyprlang::INT{0xff111111});
|
m_pConfig->addConfigValue("misc:background_color", Hyprlang::INT{0xff111111});
|
||||||
m_pConfig->addConfigValue("misc:new_window_takes_over_fullscreen", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("misc:new_window_takes_over_fullscreen", Hyprlang::INT{0});
|
||||||
|
m_pConfig->addConfigValue("misc:enable_hyprcursor", Hyprlang::INT{1});
|
||||||
|
|
||||||
m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1});
|
m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1});
|
||||||
m_pConfig->addConfigValue("group:focus_removed_window", Hyprlang::INT{1});
|
m_pConfig->addConfigValue("group:focus_removed_window", Hyprlang::INT{1});
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "CursorManager.hpp"
|
#include "CursorManager.hpp"
|
||||||
#include "Compositor.hpp"
|
#include "Compositor.hpp"
|
||||||
|
#include "../config/ConfigValue.hpp"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <wlr/interfaces/wlr_buffer.h>
|
#include <wlr/interfaces/wlr_buffer.h>
|
||||||
|
@ -96,7 +97,9 @@ void CCursorManager::setCursorSurface(wlr_surface* surf, const Vector2D& hotspot
|
||||||
|
|
||||||
void CCursorManager::setCursorFromName(const std::string& name) {
|
void CCursorManager::setCursorFromName(const std::string& name) {
|
||||||
|
|
||||||
if (!m_pHyprcursor->valid()) {
|
static auto PUSEHYPRCURSOR = CConfigValue<Hyprlang::INT>("misc:enable_hyprcursor");
|
||||||
|
|
||||||
|
if (!m_pHyprcursor->valid() || !*PUSEHYPRCURSOR) {
|
||||||
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, m_pWLRXCursorMgr, name.c_str());
|
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, m_pWLRXCursorMgr, name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5
|
Subproject commit 50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b
|
Loading…
Reference in a new issue