Commit Graph

1197 Commits

Author SHA1 Message Date
Isaac Freund
3b24e7fcd5 contrib: recommend using a venv for layout.py
This avoids needing to run pwayland's scanner with root privileges and
install the river-layout bindings to system directories.
2021-10-06 12:16:36 +02:00
Michal Siedlaczek
30da9e7221 contrib: make layout.py more pythonic 2021-10-06 12:16:36 +02:00
Leon Henrik Plickat
61d6aecb10 contrib: add python layout 2021-10-06 12:16:36 +02:00
Euro20179
102a0b7cf5
docs: change Enter to Return
xkbcommon uses `Return` to indicate this key, `Enter` isn't a valid keysym name.
Co-authored-by: Euro <no>
2021-10-04 11:10:20 +02:00
Leon Henrik Plickat
196c52885f Decrease layout demand timeout to 100ms
Layout generators are generally pretty fast. The timeout is only reached when
the generator is faulty / stuck. In that case, freezing for 1 second is simply
bad UX.
2021-10-04 11:07:59 +02:00
Isaac Freund
5b8eab569c
Server: fix use after free in deinit()
The input manager and seats must be destroyed before the display is
destroyed as they need to destroy their timer event sources used for key
repeat.
2021-10-02 14:48:23 +02:00
Isaac Freund
9270a2df08
View: fix unmap/destroy control flow
Currently the view destruction sequence is started as soon as a view
is unmapped. However, this is incorrect as a client may map the view
again instead of destroying it.

Instead, only start the view destruction sequence when the underlying
xdg toplevel or xwayland surface is destroyed.
2021-10-02 14:48:22 +02:00
Isaac Freund
e0784247b6
doc: update my (Isaac's) email address 2021-10-02 13:01:58 +02:00
Isaac Freund
fd70a93c67
View: add fullscreen check missing in previous commit 2021-10-02 12:05:24 +02:00
Isaac Freund
e6bb373240
View: resize if moved between outputs while fullscreen 2021-09-30 17:17:46 +02:00
Isaac Freund
8ec0e30fd7
Subsurface: remove commit listener in destroy()
Currently if destroy() is called while a subsurface is mapped a dangling
commit listener is left behind. This is obivously a problem, so check if
the subsurface is mapped in destroy() and remove the listener if needed.
2021-09-30 16:45:14 +02:00
Isaac Freund
6616d32353 ci: fix xbps invocation
This avoids errors like:

util-linux-common-2.37.2_1 in transaction breaks installed pkg `libfdisk-2.37.1_1'
util-linux-common-2.37.2_1 in transaction breaks installed pkg `libsmartcols-2.37.1_1'
libuuid-2.37.2_1 in transaction breaks installed pkg `libfdisk-2.37.1_1'
libuuid-2.37.2_1 in transaction breaks installed pkg `util-linux-2.37.1_1'
libblkid-2.37.2_1 in transaction breaks installed pkg `libfdisk-2.37.1_1'
libblkid-2.37.2_1 in transaction breaks installed pkg `util-linux-2.37.1_1'
libmount-2.37.2_1 in transaction breaks installed pkg `util-linux-2.37.1_1'
Transaction aborted due to unresolved dependencies.
2021-09-27 19:10:46 +02:00
Isaac Freund
a3fdb294b3
Cursor: implement surfaceAt() for XwaylandUnmanaged 2021-09-27 18:34:59 +02:00
Isaac Freund
b8ebbc29cf
xdg-toplevel: fix configure serial checking
Currently if another configure is in flight after the one we are
tracking the serial of and the client acks the second configure as well
(or only the second configure) before committing, we will never realize
the configure we are tracking has been acked.

Instead, listen for the ack_configure signal and set a bool that we can
check on surface commit.

This probably isn't an issue that would actually be hit by well behaved
clients as river doesn't send redundant configure events. However,
having correct code is always better even if it's slightly more complex.
2021-09-18 18:45:30 +02:00
Leon Henrik Plickat
ab55ab8fc2 command: Use std.ComptimeStringMap to get impl. function from command string 2021-09-16 11:47:44 +02:00
Peter Rice
81d103d425 river: add send-to-previous-tags command 2021-09-14 22:57:17 +02:00
Ben Fiedler
5f6428bafe river: Allow applying CSD based on window titles
This extends the `csd-filter-add` command to allow matching on window
titles as well, using a `csd-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration applies client-side decorations to
all windows with the title 'asdf with spaces'.

    riverctl csd-filter-add title 'asdf with spaces'
2021-09-07 12:30:53 +00:00
Isaac Freund
98aed8d47e
river: fix viewporter protocol implementation
It turns out that wlroots requires us to do a bit more than just create
the wlr_viewporter. Docs are being added to the wlroots header in
https://github.com/swaywm/wlroots/pull/3171
2021-09-06 19:03:17 +02:00
Ben Fiedler
7b97d519b3 river: Fix errdefer in floatFilterAdd 2021-09-06 15:19:11 +00:00
Isaac Freund
119d733bdf
docs: update example init for float fitler changes 2021-09-06 14:46:34 +02:00
Ben Fiedler
546252aecf river: Allow floating based on window titles
This extends the `float-filter-add` command to allow matching on window
titles as well, using a `float-filter-add kind pattern` syntax. The
following kinds are supported:

  * `title`, which matches window titles
  * `app-id`, which matches app ids

Only exact matches are considered.

As an example following configuration floats all windows with the title
'asdf with spaces'.

    riverctl float-filter-add title 'asdf with spaces'
2021-09-06 12:44:25 +00:00
novakane
e59c2a73d7 river: implement xdg-activation-v1
- add a new "urgent" border color
- add a new event to river-status-unstable-v1

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-19 12:58:52 +00:00
Keith Hubbard
e9bfc5251e docs: default keyboard mapping mode is "normal" 2021-08-18 20:21:50 +00:00
Keith Hubbard
2bdf9e20a5
command: support repeating keyboard mappings
Repeating mappings are created using the -repeat option to the map
command:

    % riverctl map normal $mod+Mod1 K -repeat move up 10

- repeating is only supported for key press (not -release) mappings
- unlike -release, -repeat does not create distinct mappings: mapping a
  key with -repeat will replace an existing bare mapping and vice-versa

Resolves #306
2021-08-15 14:49:11 +02:00
Isaac Freund
6e51a8fcdd
river-status: fix output status destruction
There was a use-after-free if the Output was destroyed first, and the
memory of the output status was leaked.
2021-08-12 22:38:08 +02:00
Isaac Freund
d4c249a5cb
output: simplify layer shell handling on destroy
No need for noop output hacks here, wlr.LayerSurfaceV1.close()
synchronously emits the unmap signal if the layer surface is mapped.
2021-08-12 21:58:17 +02:00
Isaac Freund
1e18ac9d74
layer-shell: ignore commits on closed layer surface 2021-08-12 21:18:26 +02:00
Isaac Freund
1baf3bf462
seat: always add view to focus stack on map
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.
2021-08-10 21:54:36 +02:00
Isaac Freund
e752555969
config: fix leak of default layout namespace 2021-08-09 16:48:51 +02:00
Isaac Freund
7013bc3b69
Xwayland: fix possible use-after-free on unmap
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().
2021-08-09 16:40:45 +02:00
Keith Hubbard
556d790694 render: draw borders before rendering views
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.
2021-08-07 10:18:52 +00:00
Isaac Freund
2fc0875a3e
river: fix crash on disabling all outputs
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.
2021-08-02 16:16:58 +02:00
Isaac Freund
295f965f91
river-layout: fix typo in protocol 2021-08-02 15:58:56 +02:00
Isaac Freund
2f3fe5019b
util: remove unused function 2021-07-31 00:57:23 +02:00
novakane
879046ef83 completions: Remove strict in focus-follows-cursor 2021-07-29 17:19:06 +00:00
Isaac Freund
00f51e00b4
cursor: remove strict focus-follows-cursor mode
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.
2021-07-29 14:05:17 +02:00
Isaac Freund
bae826ef0e
cursor: fix crash if focus-follows-cursor is set
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.
2021-07-29 13:42:36 +02:00
novakane
f56c892958 build: Use pkg-config to handle river protocols 2021-07-28 19:30:50 +00:00
Isaac Freund
863f8156f7
river: properly teardown surface tree
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.
2021-07-28 13:44:23 +02:00
Isaac Freund
9e70fb25a5
output: fix debug log on tag change 2021-07-28 13:44:23 +02:00
Rafael Escobar
90008cfa53
docs: fix typo in rivertile man page 2021-07-27 01:31:34 +02:00
Isaac Freund
8a1e96cddc
config: change color format to 0xRRGGBBAA
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.
2021-07-26 20:36:46 +02:00
Isaac Freund
ae871c2fee
docs: Wayland should always be capitalized
This matches the style used on https://wayland.freedesktop.org/
2021-07-26 12:20:48 +02:00
Isaac Freund
bbfd0c334c
view: arrange when exiting fullscreen to layout
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.
2021-07-25 22:30:47 +02:00
Isaac Freund
988a4623ab
view: ensure saved buffers are always dropped
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.
2021-07-25 22:22:46 +02:00
Isaac Freund
eab9c0901a
layout: assert output state matches layout applied
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.
2021-07-25 22:17:40 +02:00
Isaac Freund
a07e5de945
build: install river-layout-v3 to $PREFIX/share/river
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.
2021-07-25 19:31:38 +02:00
Isaac Freund
b49ea34f15
build: remove example river-status client
This is out of date and currently doesn't compile. It also doesn't
really belong in the repository IMO, except maybe in the contrib
folder.
2021-07-25 19:15:33 +02:00
Isaac Freund
4cc1167863
river: improve new layer surface log formatting 2021-07-25 17:17:45 +02:00
Isaac Freund
734521560b
river: add custom wlroots log handler
This makes river's log output more consistent and will allow
filtering by the wlroots scope in the future.
2021-07-25 01:22:36 +02:00