sway-patched-tray-menu/include
Ryan Dwyer 701fcafc70 Use list_find in more places and refactor/fix workspace prev_next functions
The original purpose of this commit is to replace some for loops with
list_find. But while doing this I found the workspace_prev_next_impl
functions to be difficult to read and also contained a bug, so I
refactored them and fixed the bug.

To reproduce the bug:

* Have two outputs, where the left output has workspaces 1, 2, 3 and the
right output has workspaces 4, 5, 6. Make workspace 2 focused_inactive
and workspace 4 focused.
* Run `workspace prev`.
* Previously it would visit the left output, then apply `workspace prev`
to workspace 2, which focuses workspace 1.
* Now it will focus the rightmost workspace on the left output
(workspace 3).

The refactoring I made to the workspace functions are:

* Added the static keyword.
* They now accept an int dir rather than bool, to avoid an unnecessary
conversion.
* Rather than preparing start and end variables for the purpose of
iterating, just iterate everything.
* Replace for loops with list_find.
* Don't call workspace_output_prev_next_impl (this fixes the bug).
2018-08-15 15:14:35 +10:00
..
sway Implement resizing tiled containers via cursor 2018-08-12 10:45:54 +10:00
swaybar swaybar: Fix scroll handling on workspace buttons 2018-07-19 21:15:01 +02:00
swaylock Implement swaylock customization flags 2018-07-10 21:29:15 -04:00
swaynag swaynag: address some more of sircmpwn's comments 2018-08-01 22:47:54 -04:00
background-image.h Initial swaylock port 2018-04-04 18:47:48 -04:00
cairo.h Address review comments 2018-03-28 14:43:23 -04:00
ipc-client.h swaybar: move core functionality to state.c 2016-01-24 14:22:19 +01:00
ipc.h ipc: remove extraneous values 2018-08-01 16:57:15 +01:00
list.h Use list_find in more places and refactor/fix workspace prev_next functions 2018-08-15 15:14:35 +10:00
log.h Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
meson.build Address review comments 2018-03-28 14:43:23 -04:00
pango.h Change scale from int32_t to double for pango 2018-05-16 12:01:04 -04:00
pool-buffer.h client/pool-buffer: munmap in destroy_buffer 2018-05-27 14:09:48 +01:00
readline.h Address emersion's feedback on peek_line 2018-06-02 08:07:44 -04:00
stringop.h Clean up container title functions 2018-05-25 21:07:59 +10:00
unicode.h Add password buffer, refactor rendering/surfaces 2018-04-04 18:47:48 -04:00
util.h util.h: add missing include 2018-07-30 15:21:52 +01:00