mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
config: move various cursor-related vars to cursor:
This commit is contained in:
parent
7cf810b181
commit
b0861b6709
9 changed files with 21 additions and 21 deletions
|
@ -2394,9 +2394,9 @@ PHLWINDOW CCompositor::getWindowByRegex(const std::string& regexp) {
|
|||
void CCompositor::warpCursorTo(const Vector2D& pos, bool force) {
|
||||
|
||||
// warpCursorTo should only be used for warps that
|
||||
// should be disabled with no_cursor_warps
|
||||
// should be disabled with no_warps
|
||||
|
||||
static auto PNOWARPS = CConfigValue<Hyprlang::INT>("general:no_cursor_warps");
|
||||
static auto PNOWARPS = CConfigValue<Hyprlang::INT>("cursor:no_warps");
|
||||
|
||||
if (*PNOWARPS && !force)
|
||||
return;
|
||||
|
|
|
@ -311,8 +311,6 @@ CConfigManager::CConfigManager() {
|
|||
m_pConfig->addConfigValue("general:gaps_in", Hyprlang::CConfigCustomValueType{configHandleGapSet, configHandleGapDestroy, "5"});
|
||||
m_pConfig->addConfigValue("general:gaps_out", Hyprlang::CConfigCustomValueType{configHandleGapSet, configHandleGapDestroy, "20"});
|
||||
m_pConfig->addConfigValue("general:gaps_workspaces", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:cursor_inactive_timeout", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:no_cursor_warps", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:no_focus_fallback", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:resize_on_border", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:extend_border_grab_area", Hyprlang::INT{15});
|
||||
|
@ -320,7 +318,6 @@ CConfigManager::CConfigManager() {
|
|||
m_pConfig->addConfigValue("general:layout", {"dwindle"});
|
||||
m_pConfig->addConfigValue("general:allow_tearing", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:resize_corner", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("general:default_cursor_monitor", {STRVAL_EMPTY});
|
||||
|
||||
m_pConfig->addConfigValue("misc:disable_hyprland_logo", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:disable_splash_rendering", Hyprlang::INT{0});
|
||||
|
@ -341,18 +338,13 @@ CConfigManager::CConfigManager() {
|
|||
m_pConfig->addConfigValue("misc:swallow_exception_regex", {STRVAL_EMPTY});
|
||||
m_pConfig->addConfigValue("misc:focus_on_activate", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:no_direct_scanout", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("misc:hide_cursor_on_touch", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("misc:mouse_move_focuses_monitor", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("misc:render_ahead_of_time", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:render_ahead_safezone", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("misc:cursor_zoom_factor", {1.f});
|
||||
m_pConfig->addConfigValue("misc:cursor_zoom_rigid", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:allow_session_lock_restore", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:close_special_on_empty", Hyprlang::INT{1});
|
||||
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:enable_hyprcursor", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("misc:hide_cursor_on_key_press", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("misc:initial_workspace_tracking", Hyprlang::INT{1});
|
||||
|
||||
m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1});
|
||||
|
@ -519,6 +511,14 @@ CConfigManager::CConfigManager() {
|
|||
|
||||
m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("cursor:hotspot_padding", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("cursor:inactive_timeout", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("cursor:no_warps", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("cursor:default_monitor", {STRVAL_EMPTY});
|
||||
m_pConfig->addConfigValue("cursor:zoom_factor", {1.f});
|
||||
m_pConfig->addConfigValue("cursor:zoom_rigid", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("cursor:enable_hyprcursor", Hyprlang::INT{1});
|
||||
m_pConfig->addConfigValue("cursor:hide_on_key_press", Hyprlang::INT{0});
|
||||
m_pConfig->addConfigValue("cursor:hide_on_touch", Hyprlang::INT{1});
|
||||
|
||||
m_pConfig->addConfigValue("autogenerated", Hyprlang::INT{0});
|
||||
|
||||
|
|
|
@ -955,7 +955,7 @@ std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) {
|
|||
}
|
||||
|
||||
// decorations will probably need a repaint
|
||||
if (COMMAND.contains("decoration:") || COMMAND.contains("border") || COMMAND == "workspace" || COMMAND.contains("cursor_zoom_factor") || COMMAND == "source") {
|
||||
if (COMMAND.contains("decoration:") || COMMAND.contains("border") || COMMAND == "workspace" || COMMAND.contains("zoom_factor") || COMMAND == "source") {
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
g_pHyprRenderer->damageMonitor(m.get());
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
static void checkDefaultCursorWarp(SP<CMonitor> PNEWMONITOR, std::string monitorName) {
|
||||
|
||||
static auto PCURSORMONITOR = CConfigValue<std::string>("general:default_cursor_monitor");
|
||||
static auto PCURSORMONITOR = CConfigValue<std::string>("cursor:default_monitor");
|
||||
static auto firstMonitorAdded = std::chrono::system_clock::now();
|
||||
static bool cursorDefaultDone = false;
|
||||
static bool firstLaunch = true;
|
||||
|
|
|
@ -327,7 +327,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
|||
}
|
||||
|
||||
void CMonitor::addDamage(const pixman_region32_t* rg) {
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("misc:cursor_zoom_factor");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("cursor:zoom_factor");
|
||||
if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == this) {
|
||||
wlr_damage_ring_add_whole(&damage);
|
||||
g_pCompositor->scheduleFrameForMonitor(this);
|
||||
|
@ -340,7 +340,7 @@ void CMonitor::addDamage(const CRegion* rg) {
|
|||
}
|
||||
|
||||
void CMonitor::addDamage(const CBox* box) {
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("misc:cursor_zoom_factor");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("cursor:zoom_factor");
|
||||
if (*PZOOMFACTOR != 1.f && g_pCompositor->getMonitorFromCursor() == this) {
|
||||
wlr_damage_ring_add_whole(&damage);
|
||||
g_pCompositor->scheduleFrameForMonitor(this);
|
||||
|
|
|
@ -156,7 +156,7 @@ void CCursorManager::setXCursor(const std::string& name) {
|
|||
|
||||
void CCursorManager::setCursorFromName(const std::string& name) {
|
||||
|
||||
static auto PUSEHYPRCURSOR = CConfigValue<Hyprlang::INT>("misc:enable_hyprcursor");
|
||||
static auto PUSEHYPRCURSOR = CConfigValue<Hyprlang::INT>("cursor:enable_hyprcursor");
|
||||
|
||||
if (!m_pHyprcursor->valid() || !*PUSEHYPRCURSOR) {
|
||||
setXCursor(name);
|
||||
|
|
|
@ -132,7 +132,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
static auto PMOUSEFOCUSMON = CConfigValue<Hyprlang::INT>("misc:mouse_move_focuses_monitor");
|
||||
static auto PRESIZEONBORDER = CConfigValue<Hyprlang::INT>("general:resize_on_border");
|
||||
static auto PRESIZECURSORICON = CConfigValue<Hyprlang::INT>("general:hover_icon_on_border");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("misc:cursor_zoom_factor");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("cursor:zoom_factor");
|
||||
|
||||
const auto FOLLOWMOUSE = *PFOLLOWONDND && m_sDrag.drag ? 1 : *PFOLLOWMOUSE;
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, const CRegion& damage_, CFramebu
|
|||
}
|
||||
|
||||
void CHyprOpenGLImpl::end() {
|
||||
static auto PZOOMRIGID = CConfigValue<Hyprlang::INT>("misc:cursor_zoom_rigid");
|
||||
static auto PZOOMRIGID = CConfigValue<Hyprlang::INT>("cursor:zoom_rigid");
|
||||
|
||||
TRACY_GPU_ZONE("RenderEnd");
|
||||
|
||||
|
|
|
@ -1092,7 +1092,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
|||
static auto PDAMAGEBLINK = CConfigValue<Hyprlang::INT>("debug:damage_blink");
|
||||
static auto PNODIRECTSCANOUT = CConfigValue<Hyprlang::INT>("misc:no_direct_scanout");
|
||||
static auto PVFR = CConfigValue<Hyprlang::INT>("misc:vfr");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("misc:cursor_zoom_factor");
|
||||
static auto PZOOMFACTOR = CConfigValue<Hyprlang::FLOAT>("cursor:zoom_factor");
|
||||
static auto PANIMENABLED = CConfigValue<Hyprlang::INT>("animations:enabled");
|
||||
static auto PFIRSTLAUNCHANIM = CConfigValue<Hyprlang::INT>("animations:first_launch_animation");
|
||||
static auto PTEARINGENABLED = CConfigValue<Hyprlang::INT>("general:allow_tearing");
|
||||
|
@ -2278,9 +2278,9 @@ void CHyprRenderer::setCursorFromName(const std::string& name, bool force) {
|
|||
}
|
||||
|
||||
void CHyprRenderer::ensureCursorRenderingMode() {
|
||||
static auto PCURSORTIMEOUT = CConfigValue<Hyprlang::INT>("general:cursor_inactive_timeout");
|
||||
static auto PHIDEONTOUCH = CConfigValue<Hyprlang::INT>("misc:hide_cursor_on_touch");
|
||||
static auto PHIDEONKEY = CConfigValue<Hyprlang::INT>("misc:hide_cursor_on_key_press");
|
||||
static auto PCURSORTIMEOUT = CConfigValue<Hyprlang::INT>("cursor:inactive_timeout");
|
||||
static auto PHIDEONTOUCH = CConfigValue<Hyprlang::INT>("cursor:hide_on_touch");
|
||||
static auto PHIDEONKEY = CConfigValue<Hyprlang::INT>("cursor:hide_on_key_press");
|
||||
|
||||
if (*PCURSORTIMEOUT <= 0)
|
||||
m_sCursorHiddenConditions.hiddenOnTimeout = false;
|
||||
|
|
Loading…
Reference in a new issue