diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index 14089c0..08eec3e 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -894,8 +894,7 @@ void Hy3Layout::shiftNode(Hy3Node& node, ShiftDirection direction, bool once, bo } void shiftFloatingWindow(CWindow* window, ShiftDirection direction) { - static const auto* kbd_shift_delta = - &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:kbd_shift_delta")->intValue; + static const auto kbd_shift_delta = ConfigValue("plugin:hy3:kbd_shift_delta"); if(!window) return; @@ -1073,7 +1072,7 @@ CWindow* getWindowInDirection(CWindow* source, ShiftDirection direction, BitFlag const auto current_surface_box = source->getWindowMainSurfaceBox(); auto target_distance = Distance { direction }; - int focus_policy = *&HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:focus_obscured_windows_policy")->intValue; + int focus_policy = *ConfigValue("plugin:hy3:focus_obscured_windows_policy"); bool permit_obscured_windows = focus_policy == 0 || (focus_policy == 2 && layers_same_monitor.HasNot(Layer::Floating | Layer::Tiled)); // TODO: Don't assume that source window is on focused monitor @@ -1159,7 +1158,7 @@ void Hy3Layout::shiftFocus(int workspace, ShiftDirection direction, bool visible // If no eligible_layers specified then choose the same layer as the source window if(eligible_layers == Layer::None) eligible_layers = source_window->m_bIsFloating ? Layer::Floating : Layer::Tiled; - int focus_policy = *&HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:focus_obscured_windows_policy")->intValue; + int focus_policy = *ConfigValue("plugin:hy3:focus_obscured_windows_policy"); bool skip_obscured = focus_policy == 1 || (focus_policy == 2 && eligible_layers.Has(Layer::Floating | Layer::Tiled)); // Determine the starting point for looking for a tiled node - it's either the diff --git a/src/dispatchers.cpp b/src/dispatchers.cpp index 60f8fda..13939a9 100644 --- a/src/dispatchers.cpp +++ b/src/dispatchers.cpp @@ -134,7 +134,7 @@ void dispatch_movefocus(std::string value) { } if(!layerArg) { - auto default_movefocus_layer = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:default_movefocus_layer")->strValue; + auto default_movefocus_layer = ConfigValue("plugin:hy3:default_movefocus_layer"); if((layerArg = parseLayerArg(*default_movefocus_layer))) layers = layerArg.value(); }