mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Don't move the history needle when recording
This commit is contained in:
parent
fc041e8ba1
commit
cb8415939b
1 changed files with 9 additions and 6 deletions
15
history.c
15
history.c
|
@ -169,7 +169,7 @@ monitor_t *history_get_monitor(monitor_t *m)
|
|||
|
||||
bool history_find_node(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, client_select_t sel)
|
||||
{
|
||||
if (history_needle == NULL)
|
||||
if (history_needle == NULL || record_history)
|
||||
history_needle = history_tail;
|
||||
|
||||
history_t *h;
|
||||
|
@ -180,7 +180,8 @@ bool history_find_node(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst
|
|||
|| !is_visible(h->loc.desktop, h->loc.node)
|
||||
|| !node_matches(&h->loc, ref, sel))
|
||||
continue;
|
||||
history_needle = h;
|
||||
if (!record_history)
|
||||
history_needle = h;
|
||||
*dst = h->loc;
|
||||
return true;
|
||||
}
|
||||
|
@ -189,7 +190,7 @@ bool history_find_node(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst
|
|||
|
||||
bool history_find_desktop(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, desktop_select_t sel)
|
||||
{
|
||||
if (history_needle == NULL)
|
||||
if (history_needle == NULL || record_history)
|
||||
history_needle = history_tail;
|
||||
|
||||
history_t *h;
|
||||
|
@ -199,7 +200,8 @@ bool history_find_desktop(history_dir_t hdi, coordinates_t *ref, coordinates_t *
|
|||
|| (h->loc.desktop == ref->desktop)
|
||||
|| !desktop_matches(&h->loc, ref, sel))
|
||||
continue;
|
||||
history_needle = h;
|
||||
if (!record_history)
|
||||
history_needle = h;
|
||||
*dst = h->loc;
|
||||
return true;
|
||||
}
|
||||
|
@ -208,7 +210,7 @@ bool history_find_desktop(history_dir_t hdi, coordinates_t *ref, coordinates_t *
|
|||
|
||||
bool history_find_monitor(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, desktop_select_t sel)
|
||||
{
|
||||
if (history_needle == NULL)
|
||||
if (history_needle == NULL || record_history)
|
||||
history_needle = history_tail;
|
||||
|
||||
history_t *h;
|
||||
|
@ -218,7 +220,8 @@ bool history_find_monitor(history_dir_t hdi, coordinates_t *ref, coordinates_t *
|
|||
|| (h->loc.monitor == ref->monitor)
|
||||
|| !desktop_matches(&h->loc, ref, sel))
|
||||
continue;
|
||||
history_needle = h;
|
||||
if (!record_history)
|
||||
history_needle = h;
|
||||
*dst = h->loc;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue