Using `get_active_node` might result in a locked `Node`; calling
`add_view` on that `Node` throws an error.
`get_active_node_default` always returns an unlocked `Node`.
* Send `mouseleft` event when the mouse leaves the window
* Call `View:on_mouse_left` when the mouse leaves the `View`
Previously `View:on_mouse_left` was called only when the mouse left the
window, and it was called on every visible `View`.
Now it gets also called when the mouse "changes" `View`, and only the
last `View` the mouse was on will receive the event.
Before the addition of multi-cursor support, we just returned the second
return value of the "replacer" function to the caller.
With the introduction of multi-cursors, we naively summed the second
return values for each cursor.
In some cases the "replacer" function doesn't return any second value,
so we tried to do math with `nil`, thus throwing errors.
Now the second return value is added to a table which is then returned
to the caller.
* Change to 1 click as per RFC on discord, with 100% in favour.
* Added in the ability to specify as a view name, so it doesn't modify the title, and also fixed a bug where if you clicked *over* the amount of times your config says, it wouldn't regsiter.
* Changed plugin to use keymap.
This allows `keymap.add` to map shortcuts to functions.
If the function returns `false`, the next command is executed (as if the
`predicate` of a `command` failed).
We color a 1x1 `SDL_Surface` with the desired color. This surface is
then stretched over the area we need to cover using `SDL_BlitScaled`.
This way we avoid having to do the blending ourselves.
* Update meson.build
- add logic to loop over more lua names (in the future more names might be discovered)
- disable warnings and errors on dependencies
* adding missing includes and checks, correct data types, pointer mess […]
- various functions from string.h were used but never defined
- logic was done across multiple different data types with different signedness, got all of them up to snuff
- give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit)
- add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything)
- correctly initialize structs with all data needed
All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true`
* remove undefined behavior, correct data types
* Comment manual bit manipulation to be investigated
* check for more edge cases, replace multiple cleanups with goto
* remove system specific includes