Menu is supposed to close after releasing button 3
Mouse cursor must point at outer corners while resizing
Don't allow parallel borders to intersect
Remove obsolete options in contrib/alacritty.yml
Left and middle mouse buttons stop current action / event
Also revert 8ecffded9bf606e80ce8b2ad3d2ed929aea4f374
Move views by dragging their borders
Resize like in Rio
* remove duplicate code;
* resize views when dragging corner borders;
* width and height never become negative to avoid rendering bugs while reflecting,
also recently wlroots crashes when width/height is <= 0;
* reflection behaves like in Rio;
* minimal size is enforced on red box like in Rio;
* change cursor for New and Resize;
* New and Resize do nothing if size is less than minimal like in Rio;
* New and Resize draw a grey surface in red box like in Rio;
* it's not accurate because it assumes scale is always 1.
Fix build with latest version of wlroots
Fix typo from ec6567e899a5 found by Clang
../view.c:136:16: error: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Werror,-Wnon-literal-null-conversion]
view_area = VIEW_AREA_SURFACE;
Bug-Fix: Can no longer select borders hidden under views
This fixes the bug where clicking on a border would enable border
dragging even if the border was hidden under a view.
Letting wio_view_at() report where the given coordinates are on a view
enables us to check for views and borders of views in the same loop,
easily solving this problem.
Additionally this makes the border dragging code cleaner and enables
other functions as well to see where on a view was clicked.
Resize views by dragging their borders
This matches Rios behaviour, with the small exception that wios resizing
is smooth while Rios snaps to a grid.
Enforce minial window size for new_view()
The minimal window size of 100x100 is already enforced for reshaping
views. Also enforcing it for spawning new views makes sense, so users
will not accidentaly spawn views to small to interact with.
`Esc` stops current action / event
Different colour for selection box and move box
This is closer to rio's behavior and also improves the visibility of
the selection box, as it now clearly stands out.
Adding a flag to render_view_border is not pretty, but a reasonable
solution to change not just the colour of the selection box but also of
the move box, as "(!view)" does not catch the move box.
Remove obsolete wlroots interface
Selection when reshaping view is now representative
The view was moved to far in the x and y direction compared to the
selection outline by exactly the size of the window border.
(Ammend to this and the previous patch, because apparantly I am blind
and did not see that the variable I was substracting was simply added to
the coordinates a few lines down. Was this added on purpose? Either way,
the selection being precise should be the correct way.)
Selection when spawning new view is now representative
The new view was spawned to far in the x and y directions compared to
the selection outline by exactly the size of the window border. I decided
to move the new view instead of the selection as I think the selection
looks good placement-wise in relation to the pointer.
Use *cursor in view_begin_interative()
The variable is passed to the function but was not used. I assume it is
intended to be used.
Add simple build instructions to README.md.