mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:06:01 +01:00
config: avoid using initial ws tracking for exec-once
This commit is contained in:
parent
a0d15a0b7b
commit
33a5c8ce32
3 changed files with 8 additions and 4 deletions
|
@ -1299,12 +1299,14 @@ void CConfigManager::dispatchExecOnce() {
|
||||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS");
|
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS");
|
||||||
|
|
||||||
firstExecDispatched = true;
|
firstExecDispatched = true;
|
||||||
|
isLaunchingExecOnce = true;
|
||||||
|
|
||||||
for (auto& c : firstExecRequests) {
|
for (auto& c : firstExecRequests) {
|
||||||
handleRawExec("", c);
|
handleRawExec("", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
firstExecRequests.clear(); // free some kb of memory :P
|
firstExecRequests.clear(); // free some kb of memory :P
|
||||||
|
isLaunchingExecOnce = false;
|
||||||
|
|
||||||
// set input, fixes some certain issues
|
// set input, fixes some certain issues
|
||||||
g_pInputManager->setKeyboardLayout();
|
g_pInputManager->setKeyboardLayout();
|
||||||
|
|
|
@ -129,9 +129,6 @@ class CConfigManager {
|
||||||
void performMonitorReload();
|
void performMonitorReload();
|
||||||
void appendMonitorRule(const SMonitorRule&);
|
void appendMonitorRule(const SMonitorRule&);
|
||||||
bool replaceMonitorRule(const SMonitorRule&);
|
bool replaceMonitorRule(const SMonitorRule&);
|
||||||
bool m_bWantsMonitorReload = false;
|
|
||||||
bool m_bForceReload = false;
|
|
||||||
bool m_bNoMonitorReload = false;
|
|
||||||
void ensureMonitorStatus();
|
void ensureMonitorStatus();
|
||||||
void ensureVRR(CMonitor* pMonitor = nullptr);
|
void ensureVRR(CMonitor* pMonitor = nullptr);
|
||||||
|
|
||||||
|
@ -192,6 +189,11 @@ class CConfigManager {
|
||||||
std::unordered_map<std::string, std::function<CWindowOverridableVar<int>*(PHLWINDOW)>> miWindowProperties = {
|
std::unordered_map<std::string, std::function<CWindowOverridableVar<int>*(PHLWINDOW)>> miWindowProperties = {
|
||||||
{"rounding", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.rounding; }}, {"bordersize", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.borderSize; }}};
|
{"rounding", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.rounding; }}, {"bordersize", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.borderSize; }}};
|
||||||
|
|
||||||
|
bool m_bWantsMonitorReload = false;
|
||||||
|
bool m_bForceReload = false;
|
||||||
|
bool m_bNoMonitorReload = false;
|
||||||
|
bool isLaunchingExecOnce = false; // For exec-once to skip initial ws tracking
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Hyprlang::CConfig> m_pConfig;
|
std::unique_ptr<Hyprlang::CConfig> m_pConfig;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ using namespace Hyprutils::String;
|
||||||
static std::vector<std::pair<std::string, std::string>> getHyprlandLaunchEnv() {
|
static std::vector<std::pair<std::string, std::string>> getHyprlandLaunchEnv() {
|
||||||
static auto PINITIALWSTRACKING = CConfigValue<Hyprlang::INT>("misc:initial_workspace_tracking");
|
static auto PINITIALWSTRACKING = CConfigValue<Hyprlang::INT>("misc:initial_workspace_tracking");
|
||||||
|
|
||||||
if (!*PINITIALWSTRACKING)
|
if (!*PINITIALWSTRACKING || g_pConfigManager->isLaunchingExecOnce)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
||||||
|
|
Loading…
Reference in a new issue