]> git.mdlowis.com Git - proto/labwc.git/commit
cycle: remember cycled window list in server->cycle.views
authortokyo4j <hrak1529@gmail.com>
Sun, 30 Nov 2025 08:47:40 +0000 (17:47 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 30 Nov 2025 21:33:46 +0000 (21:33 +0000)
commit9f5ff391ccf37a3ad5be33a08f8ff9df161c7ba9
treeb7da2b2d4dcd322709a326c75e018df209f466ab
parentb6c1a9ea5922f6c86bc21bdaab8bc1c58edfa346
cycle: remember cycled window list in server->cycle.views

This allows changing the cycled order in the future, e.g. focused order vs
created order.

Functionally, this commit also changes the initially selected window;
before this commit, the previous/next of the topmost window was always
selected, but now the previous/next of the active window is selected first
if it is in the cycled list. This won't change behaviors for most users,
but this ensures that the user can go back to the focused window with
Alt-Tab + Alt-Shift-Tab even when it is not the topmost window.

This commit fixes the TODO in the previous commit by trying to preserve
the selected view when a view is destroyed during window cycling.
include/cycle.h
include/labwc.h
include/view.h
src/cycle/cycle.c
src/cycle/osd-classic.c
src/cycle/osd-thumbnail.c
src/server.c
src/view.c