mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 19:25:59 +01:00
Revert headers commit again
This commit is contained in:
parent
c78893b7a2
commit
db048e3634
9 changed files with 29 additions and 15 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#include <cctype>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -9,6 +10,7 @@
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <ranges>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <format>
|
#include <format>
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <cstdarg>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <hyprutils/string/String.hpp>
|
#include <hyprutils/string/String.hpp>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "../render/decorations/CHyprGroupBarDecoration.hpp"
|
#include "../render/decorations/CHyprGroupBarDecoration.hpp"
|
||||||
#include "config/ConfigDataValues.hpp"
|
#include "config/ConfigDataValues.hpp"
|
||||||
|
#include "helpers/varlist/VarList.hpp"
|
||||||
#include "../protocols/LayerShell.hpp"
|
#include "../protocols/LayerShell.hpp"
|
||||||
#include "config/defaultConfig.hpp"
|
#include "config/defaultConfig.hpp"
|
||||||
|
|
||||||
|
@ -27,7 +28,6 @@
|
||||||
#include <hyprutils/string/String.hpp>
|
#include <hyprutils/string/String.hpp>
|
||||||
using namespace Hyprutils::String;
|
using namespace Hyprutils::String;
|
||||||
|
|
||||||
|
|
||||||
extern "C" char** environ;
|
extern "C" char** environ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1119,7 +1119,7 @@ std::vector<SWindowRule> CConfigManager::getMatchingRules(PHLWINDOW pWindow, boo
|
||||||
if (!valid(pWindow))
|
if (!valid(pWindow))
|
||||||
return std::vector<SWindowRule>();
|
return std::vector<SWindowRule>();
|
||||||
|
|
||||||
// Adjust shadowExec based on window mapping status
|
// if the window is unmapped, don't process exec rules yet.
|
||||||
shadowExec = shadowExec || !pWindow->m_bIsMapped;
|
shadowExec = shadowExec || !pWindow->m_bIsMapped;
|
||||||
|
|
||||||
std::vector<SWindowRule> returns;
|
std::vector<SWindowRule> returns;
|
||||||
|
@ -2608,4 +2608,4 @@ std::optional<std::string> CConfigManager::handlePlugin(const std::string& comma
|
||||||
m_vDeclaredPlugins.push_back(path);
|
m_vDeclaredPlugins.push_back(path);
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,23 @@
|
||||||
#define CONFIG_MANAGER_H
|
#define CONFIG_MANAGER_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include "../debug/Log.hpp"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "../defines.hpp"
|
#include "../defines.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <regex>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <functional>
|
||||||
#include <xf86drmMode.h>
|
#include <xf86drmMode.h>
|
||||||
#include "../helpers/WLClasses.hpp"
|
#include "../helpers/WLClasses.hpp"
|
||||||
#include "../helpers/Monitor.hpp"
|
#include "../helpers/Monitor.hpp"
|
||||||
|
#include "../helpers/varlist/VarList.hpp"
|
||||||
#include "../desktop/Window.hpp"
|
#include "../desktop/Window.hpp"
|
||||||
#include "../desktop/LayerSurface.hpp"
|
#include "../desktop/LayerSurface.hpp"
|
||||||
|
|
||||||
|
#include "defaultConfig.hpp"
|
||||||
#include "ConfigDataValues.hpp"
|
#include "ConfigDataValues.hpp"
|
||||||
|
|
||||||
#include <hyprlang.hpp>
|
#include <hyprlang.hpp>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <typeindex>
|
#include <typeindex>
|
||||||
#include <hyprlang.hpp>
|
#include <hyprlang.hpp>
|
||||||
|
#include "../debug/Log.hpp"
|
||||||
#include "../macros.hpp"
|
#include "../macros.hpp"
|
||||||
#include "ConfigManager.hpp"
|
#include "ConfigManager.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "LayerSurface.hpp"
|
#include "LayerSurface.hpp"
|
||||||
#include "../Compositor.hpp"
|
#include "../Compositor.hpp"
|
||||||
|
#include "../events/Events.hpp"
|
||||||
#include "../protocols/LayerShell.hpp"
|
#include "../protocols/LayerShell.hpp"
|
||||||
#include "../protocols/core/Compositor.hpp"
|
#include "../protocols/core/Compositor.hpp"
|
||||||
#include "../managers/SeatManager.hpp"
|
#include "../managers/SeatManager.hpp"
|
||||||
|
@ -366,12 +367,12 @@ void CLayerSurface::applyRules() {
|
||||||
} else if (rule.rule == "dimaround") {
|
} else if (rule.rule == "dimaround") {
|
||||||
dimAround = true;
|
dimAround = true;
|
||||||
} else if (rule.rule.starts_with("xray")) {
|
} else if (rule.rule.starts_with("xray")) {
|
||||||
Hyprutils::String::CVarList vars{rule.rule, 0, ' '};
|
CVarList vars{rule.rule, 0, ' '};
|
||||||
try {
|
try {
|
||||||
xray = configStringToInt(vars[1]);
|
xray = configStringToInt(vars[1]);
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
} else if (rule.rule.starts_with("animation")) {
|
} else if (rule.rule.starts_with("animation")) {
|
||||||
Hyprutils::String::CVarList vars{rule.rule, 2, 's'};
|
CVarList vars{rule.rule, 2, 's'};
|
||||||
animationStyle = vars[1];
|
animationStyle = vars[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ void CHyprDwindleLayout::alterSplitRatio(PHLWINDOW pWindow, float ratio, bool ex
|
||||||
}
|
}
|
||||||
|
|
||||||
std::any CHyprDwindleLayout::layoutMessage(SLayoutMessageHeader header, std::string message) {
|
std::any CHyprDwindleLayout::layoutMessage(SLayoutMessageHeader header, std::string message) {
|
||||||
const auto ARGS = Hyprutils::String::CVarList(message, 0, ' ');
|
const auto ARGS = CVarList(message, 0, ' ');
|
||||||
if (ARGS[0] == "togglesplit") {
|
if (ARGS[0] == "togglesplit") {
|
||||||
toggleSplit(header.pWindow);
|
toggleSplit(header.pWindow);
|
||||||
} else if (ARGS[0] == "swapsplit") {
|
} else if (ARGS[0] == "swapsplit") {
|
||||||
|
|
|
@ -1096,7 +1096,7 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
||||||
g_pInputManager->m_pForcedFocus.reset();
|
g_pInputManager->m_pForcedFocus.reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
Hyprutils::String::CVarList vars(message, 0, ' ');
|
CVarList vars(message, 0, ' ');
|
||||||
|
|
||||||
if (vars.size() < 1 || vars[0].empty()) {
|
if (vars.size() < 1 || vars[0].empty()) {
|
||||||
Debug::log(ERR, "layoutmsg called without params");
|
Debug::log(ERR, "layoutmsg called without params");
|
||||||
|
@ -1376,7 +1376,7 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
||||||
}
|
}
|
||||||
|
|
||||||
// If vars is null, we use the default list
|
// If vars is null, we use the default list
|
||||||
void CHyprMasterLayout::runOrientationCycle(SLayoutMessageHeader& header, Hyprutils::String::CVarList* vars, int direction) {
|
void CHyprMasterLayout::runOrientationCycle(SLayoutMessageHeader& header, CVarList* vars, int direction) {
|
||||||
std::vector<eOrientation> cycle;
|
std::vector<eOrientation> cycle;
|
||||||
if (vars != nullptr)
|
if (vars != nullptr)
|
||||||
buildOrientationCycleVectorFromVars(cycle, *vars);
|
buildOrientationCycleVectorFromVars(cycle, *vars);
|
||||||
|
@ -1416,7 +1416,7 @@ void CHyprMasterLayout::buildOrientationCycleVectorFromEOperation(std::vector<eO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, Hyprutils::String::CVarList& vars) {
|
void CHyprMasterLayout::buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, CVarList& vars) {
|
||||||
for (size_t i = 1; i < vars.size(); ++i) {
|
for (size_t i = 1; i < vars.size(); ++i) {
|
||||||
if (vars[i] == "top") {
|
if (vars[i] == "top") {
|
||||||
cycle.push_back(ORIENTATION_TOP);
|
cycle.push_back(ORIENTATION_TOP);
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
#include "IHyprLayout.hpp"
|
#include "IHyprLayout.hpp"
|
||||||
#include "../desktop/DesktopTypes.hpp"
|
#include "../desktop/DesktopTypes.hpp"
|
||||||
|
#include "../config/ConfigManager.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <deque>
|
||||||
#include <any>
|
#include <any>
|
||||||
|
|
||||||
enum eFullscreenMode : int8_t;
|
enum eFullscreenMode : int8_t;
|
||||||
|
@ -75,9 +77,9 @@ class CHyprMasterLayout : public IHyprLayout {
|
||||||
|
|
||||||
bool m_bForceWarps = false;
|
bool m_bForceWarps = false;
|
||||||
|
|
||||||
void buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, Hyprutils::String::CVarList& vars);
|
void buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, CVarList& vars);
|
||||||
void buildOrientationCycleVectorFromEOperation(std::vector<eOrientation>& cycle);
|
void buildOrientationCycleVectorFromEOperation(std::vector<eOrientation>& cycle);
|
||||||
void runOrientationCycle(SLayoutMessageHeader& header, Hyprutils::String::CVarList* vars, int next);
|
void runOrientationCycle(SLayoutMessageHeader& header, CVarList* vars, int next);
|
||||||
eOrientation getDynamicOrientation(PHLWORKSPACE);
|
eOrientation getDynamicOrientation(PHLWORKSPACE);
|
||||||
int getNodesOnWorkspace(const int&);
|
int getNodesOnWorkspace(const int&);
|
||||||
void applyNodeDataToWindow(SMasterNodeData*);
|
void applyNodeDataToWindow(SMasterNodeData*);
|
||||||
|
|
|
@ -861,7 +861,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
|
||||||
keeb.get());
|
keeb.get());
|
||||||
|
|
||||||
keeb->keyboardEvents.keymap.registerStaticListener(
|
keeb->keyboardEvents.keymap.registerStaticListener(
|
||||||
[](void* owner, std::any data) {
|
[this](void* owner, std::any data) {
|
||||||
auto PKEEB = ((IKeyboard*)owner)->self.lock();
|
auto PKEEB = ((IKeyboard*)owner)->self.lock();
|
||||||
const auto LAYOUT = PKEEB->getActiveLayout();
|
const auto LAYOUT = PKEEB->getActiveLayout();
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ void CInputManager::setPointerConfigs() {
|
||||||
} else if (ACCELPROFILE == "flat") {
|
} else if (ACCELPROFILE == "flat") {
|
||||||
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT);
|
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT);
|
||||||
} else if (ACCELPROFILE.starts_with("custom")) {
|
} else if (ACCELPROFILE.starts_with("custom")) {
|
||||||
Hyprutils::String::CVarList accelValues = {ACCELPROFILE, 0, ' '};
|
CVarList accelValues = {ACCELPROFILE, 0, ' '};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
double accelStep = std::stod(accelValues[1]);
|
double accelStep = std::stod(accelValues[1]);
|
||||||
|
@ -1185,7 +1185,7 @@ void CInputManager::setPointerConfigs() {
|
||||||
const auto CONFIG = libinput_config_accel_create(LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM);
|
const auto CONFIG = libinput_config_accel_create(LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM);
|
||||||
|
|
||||||
if (!SCROLLPOINTS.empty()) {
|
if (!SCROLLPOINTS.empty()) {
|
||||||
Hyprutils::String::CVarList scrollValues = {SCROLLPOINTS, 0, ' '};
|
CVarList scrollValues = {SCROLLPOINTS, 0, ' '};
|
||||||
try {
|
try {
|
||||||
double scrollStep = std::stod(scrollValues[0]);
|
double scrollStep = std::stod(scrollValues[0]);
|
||||||
std::vector<double> scrollPoints;
|
std::vector<double> scrollPoints;
|
||||||
|
@ -1624,7 +1624,8 @@ void CInputManager::newSwitch(wlr_input_device* pDevice) {
|
||||||
|
|
||||||
Debug::log(LOG, "New switch with name \"{}\" added", pDevice->name);
|
Debug::log(LOG, "New switch with name \"{}\" added", pDevice->name);
|
||||||
|
|
||||||
PNEWDEV->hyprListener_destroy.initCallback(&pDevice->events.destroy, [&](void* owner, void* data) { destroySwitch((SSwitchDevice*)owner); }, PNEWDEV, "SwitchDevice");
|
PNEWDEV->hyprListener_destroy.initCallback(
|
||||||
|
&pDevice->events.destroy, [&](void* owner, void* data) { destroySwitch((SSwitchDevice*)owner); }, PNEWDEV, "SwitchDevice");
|
||||||
|
|
||||||
const auto PSWITCH = wlr_switch_from_input_device(pDevice);
|
const auto PSWITCH = wlr_switch_from_input_device(pDevice);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue