mirror of
https://github.com/hyprwm/Hyprland
synced 2026-01-06 22:50:11 +01:00
piss
This commit is contained in:
parent
e3fc75e91b
commit
2cb792f9b1
2 changed files with 9 additions and 2 deletions
|
|
@ -1455,7 +1455,7 @@ PHLWINDOW CCompositor::getWindowInDirection(const CBox& box, PHLWORKSPACE pWorks
|
|||
// get idx
|
||||
int windowIDX = -1;
|
||||
const auto& HISTORY = Desktop::History::windowTracker()->fullHistory();
|
||||
for (int64_t i = HISTORY.size() - 1; i > 0; --i) {
|
||||
for (int64_t i = HISTORY.size() - 1; i >= 0; --i) {
|
||||
if (HISTORY[i] == w) {
|
||||
windowIDX = i;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,14 @@ SP<CWindowHistoryTracker> History::windowTracker() {
|
|||
}
|
||||
|
||||
CWindowHistoryTracker::CWindowHistoryTracker() {
|
||||
static auto P = g_pHookSystem->hookDynamic("activeWindow", [this](void* self, SCallbackInfo& info, std::any data) {
|
||||
static auto P = g_pHookSystem->hookDynamic("openWindowEarly", [this](void* self, SCallbackInfo& info, std::any data) {
|
||||
auto window = std::any_cast<PHLWINDOW>(data);
|
||||
|
||||
// add a last track
|
||||
m_history.insert(m_history.begin(), window);
|
||||
});
|
||||
|
||||
static auto P1 = g_pHookSystem->hookDynamic("activeWindow", [this](void* self, SCallbackInfo& info, std::any data) {
|
||||
auto window = std::any_cast<PHLWINDOW>(data);
|
||||
|
||||
track(window);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue