Fix transient_for endless loop
Other approaches would be: - Slow/fast pointer technique. - Using a set/associative map to save 'seen' nodes. i3 does not have such data structure. Counting the total amount of windows is the simpler to implement. I've also extracted the logic in a function and re-used it in render.c. Fixes #4404
This commit is contained in:
@ -208,6 +208,14 @@ Con *con_by_frame_id(xcb_window_t frame);
|
||||
*/
|
||||
Con *con_by_mark(const char *mark);
|
||||
|
||||
/**
|
||||
* Start from a container and traverse the transient_for linked list. Returns
|
||||
* true if target window is found in the list. Protects againsts potential
|
||||
* cycles.
|
||||
*
|
||||
*/
|
||||
bool con_find_transient_for_window(Con *start, xcb_window_t target);
|
||||
|
||||
/**
|
||||
* Returns true if and only if the given containers holds the mark.
|
||||
*
|
||||
|
Reference in New Issue
Block a user