Currently if a view is mapped while some other view is fullscreen, it
will not be added to the focus stack, which means that if the fullscreen
view is then closed the view which was not added to the focus stack will
not be focused.
To fix this, always add views to the focus stack on map.
The view.unmap() call may synchronously destroy the view, which makes
the the code removing listeners which is currently run after
view.unmap() access free'd memory.
To fix this, simply change the order of the calls to match that of
XdgToplevel.handleUnmap().
Menus, tooltips, etc. can extend beyond a view's borders. Render views
after their borders so floating content appears on top.
Unfocused floating content can still be obscured by views higher in the
stack and the focused view.
If using the on-output-change cursor warp option river currently crashes
when the last real output is disabled as the noop output used as a
fallback is not present in the output layout.
This is pretty much unusable after recent improvements to the cursor
code, and was totally broken causing a stack overflow as soon as the
cursor was moved over any surface until the previous commit.
Furthermore, none of the core contributors or people active on IRC seem
to use it.
Currently we hit a stack overflow as we do not check if the target view
already has keyboard focus before calling Seat.focus() in
Cursor.passthrough(). To fix this, simply add this check.
When an xdg toplevel, layer surface, etc is destroyed, it is not
guaranteed that all the children in the surface tree have already been
destroyed. If there are still children around, destroying the root of
the tree would leave dangling pointers.
To fix this, destroy all children when destroying any node in the tree.
The current format of #RRGGBBAA is problematic as # starts a comment
in POSIX compliant shells, requiring escaping/quoting and increasing
complexity.
This is a breaking change.
This arrange is actually required because the post_fullscreen box might
not hold the correct dimensions if the view was made fullscreen while
a transaction was already in progress.
Currently if a view is moved from layout to fullscreen while a
transaction involving that view is in progress the saved buffers are not
dropped, which causes stale state to be rendered.
This is guaranteed to already be set to the layout being committed. It
is set either when a client binds a new layout object or when the user
changes the layout namespace in use.
This makes it easier for other projects (i.e. everyone's layout
generators) to depend on the protocol xml without needing to vendor it.
The river-layout-v3 protocol should remain stable for the
forseeable future, hopefully forever. On the other hand, the current
river-control-unstable-v1 and river-status-unstable-v1 protocols
will be replaced as soon as we have time to implement better
versions. Therefore, let's not encourage usage of the protocols we
intend to remove.
This is currently unused and I don't like the approach anymore
regardless. If/when we need positional arguments (probably when
implementing the upcoming river-control protocol in rivertile)
they should be handled separately from flags.
This commit also improves the CLI error reporting to always print the
usage string if invalid arguments were passed.
The previous commit re-introduced a bug fixed by a3c65713 which caused
the pointer enter event not to be sent until moving the pointer when
switching tag focus or otherwise manipulating the window manager caused
the cursor to end up over a new surface.
If the current Cursor.maybeResetState() function is called while in
passthrough mode, it will send a pointer motion event. This is
unnecessary as we have already sent the same pointer motion event at
least once.
Also refactor the code slightly and improve naming.
Handling output destroy now requires the wlr_output_layout to still be
around, as we need it to properly handle cursor state. In order to make
sure that all outputs are destroyed before the wlr_output_layout is,
simply destroy the backend before calling Root.deinit().
Now that we properly handle state changes during cursor operations,
blocking these commands if the target view is the target of a cursor
operation is unnecessary complexity. It is also inconsistent as we
don't block changing the tags of the view.
This was slightly out of sync with Cursor.surfaceAt() which did not
fullscreen or xwayland unmanaged views properly. Also simplify things
and improve correctness by always rendering all xdg popups. A view
losing focus does not always mean that all popups will be destroyed.
A transaction may move the current target of a cursor action to a
non-visible tag, make it fullscreen, or otherwise change things such
that the current cursor state no longer makes sense.
To handle this, check if we should reset cursor state every time a
transaction is committed.
Currently the spawn command takes any number of arguments and naively
joins them together with spaces before passing them as the single
argument of `/bin/sh -c`. This however produces unexpected results as
soon as shell quoting gets involved in the arguments passed to spawn.
For example, running
riverctl spawn foo "bar baz"
will execute `/bin/sh -c "foo bar baz"`, unexpectedly splitting bar and
baz into separate arguments. To avoid this confusion, make the spawn
command take only a single argument, forcing the user to quote properly
to spawn multi-argument commands.
- Remove advertise_view and advertise_done events. Using the information
provided by these for any purpose would make the layout far less
predictable. Futhermore, in the months this has been available for use,
to my knowledge nobody has actually used it for anything useful.
- Replace the set/mod layout value events with a single user_command
event. This simplifies the protocol and is more flexible for clients.
- Add a layout_name argument to the commit request. This name is an
arbitrary, user-facing string that might, for example, be displayed by a
status bar. This was present in early drafts of the protocol, but was
removed in favor of river-options. Since river-options itself has since
been removed and this feature is nice to have, re-add it.
- Rename main factor to main ratio in rivertile. The "factor" name was
just legacy from dwm, "ratio" is much more accurate.