aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-03docs: remove repology badge from readmeIsaac Freund1-7/+3
It's getting too big and has too much redundant information.
2023-02-03docs: fix typos in riverctl man pageIsaac Freund1-6/+6
2023-01-30wlr-output-management: fix bug due to zig miscompilationIsaac Freund1-1/+1
It looks like having the empty error capture |_| on the else branch of the if statement causes the else branch to be ignored by the compiler. This should be a compile error, as the condition of the if statement is a bool, not an error union.
2023-01-25session-lock: fix assertion failure on hot-plug while lockedIsaac Freund1-1/+5
2023-01-24wlr-output-management: leverage new wlroots APIsIsaac Freund2-45/+18
These new functions allow testing commits without messing up the pending state of the output and needing to rollback. The new apply() function also makes the code considerably more concise.
2023-01-24wlr-output-management: apply adaptive sync stateAlexander Courtis1-0/+1
2023-01-21idle-inhibit: fix use-after-freeIsaac Freund1-1/+2
A user reported a crash that only reproduces when preloading a hardened malloc implementation. From the stack trace, this use-after-free seems to be the most likely cause. Yay hardened malloc!
2023-01-18session-lock: properly handle disabled outputsIsaac Freund2-0/+17
Outputs that are part of the layout but currently disabled (e.g. due to use of wlr-output-power-management) are not correctly handled as river currently waits for them to present a new locked frame before sending the locked event. This new frame never comes however since the output is disabled. Fix this by maintaining the correct Output.lock_render_state as outputs are enabled/disabled. Additionally add missing maybeLock() calls to handle the case that all outputs in the layout are disabled.
2023-01-13View: fix pointer comparison in notifyTitle()Hugo Machet1-2/+2
Curently since the struct is semantically passed by value not reference, there is no guarantee that the `seat_node.data.focused.view == &self` comparison will work as intended. Since updating to Zig 0.10.0, it seems this latent bug has now manifested and the focused view title is no longer sent to the client when it changes. Fix this by taking the view argument by constant pointer instead.
2023-01-13Cursor: fix incorrect lock manager state assertionZakariyya Von Forslun1-1/+1
2023-01-12command/layout: fix a memory leakIsaac Freund1-0/+2
2023-01-12Seat: rework Xwayland Override Redirect focusIsaac Freund4-63/+44
Instead of stashing the active view and setting Seat.focused to the Xwayland OR surface when a child OR surface of a currently focused Xwayland view is given keyboard focus, keep Seat.focused set to the Xwayland view. Such Override Redirect surfaces are commonly used for drop down menus and the like, and river should behave as if the parent Xwayland view still has focus. This ensures that the riverctl focus-view next/prev commands continue to work as expected while a popup is open, the correct focused view title will be sent over river status, etc. It's also cleaner to centralize this logic in XwaylandOverrideRedirect and keep it out of Seat.zig.
2023-01-12Seat: keep parent Xwayland view of a focused OR surface activatedZakariyya Von Forslun2-2/+44
Xwayland OR menus may disappear if their parent view is deactivated. The heuristic and ICCCM input model implemented prior, used to determine whether an OR surface may take focus, does not cover all menus, so retaining parent view activation works as a catch-all solution for handling unwanted OR menu focus.
2023-01-09deps: update zig-wayland to fix build on aarch64Isaac Freund1-0/+0
2023-01-08flags: further cleanup after Zig 0.10Isaac Freund4-13/+6
Long live the self hosted compiler!
2023-01-08deps: update to Zig 0.10Isaac Freund30-144/+77
2023-01-08render: fix rounding for fractional scalingIsaac Freund1-2/+2
We currently scale the width/height of rectangles based on the scaled x/y instead of the unscaled x/y. This however leads to inconsistent width/height due to rounding. Fix this bug by basing width/height scaling off of the original x/y. Furthermore, fix a typo where we scaled the height off of the x coordinate instead of the y coordinate.
2023-01-07session-lock: fix assertion failure on abnormal client behaviorIsaac Freund1-2/+4
If the client commits a protocol error or otherwise crashes before the session has been fully locked, we currently try to send the locked event without checking if the client has been destroyed. This commit adds the necessary if statement.
2023-01-07session-lock: fix assertion failure due to raceIsaac Freund2-5/+12
There's currently a potential race in the implementation that can be hit during unlocking. This is not a security vulnerability, but it does cause the compositor to crash due to a failed assertion. This commit simplifies the code and fixes the race as well as tightening up the assertions around this state/control flow even further.
2023-01-06session-lock: wait for present before lockingIsaac Freund3-4/+46
Currently we send the locked event after rendering and commit of blank or lock surfaces buffers on all outputs. However, this is technically not enough to ensure that the buffers have been presented. Instead, listen to the wlr_output present event to ensure that no normal, "unlocked" content is possibly visible.
2023-01-06rivertile: fix code to disallow 0 main countIsaac Freund2-10/+10
Also document this limit
2023-01-06render: premultiply alpha for user-provided colorsMaxVerevkin2-9/+11
The wlroots rendering API expects colors to be provided with premultipled alpha but we currently do not parse them as such. This causes blending with e.g. a transparent border color to be very broken.
2023-01-06completions: add keyboard-layoutLeon Henrik Plickat3-0/+3
2023-01-06ci: Use meson setup commandHugo Machet3-6/+6
Using `meson build` without `setup` have been deprecated, fix warning message: 'WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2023-01-06river: fix bug in snap down / rightalex1-2/+2
The calculation of view.pending.box.x for snap right should be based on output_width (not output_height). The inverse applies to view.pending.box.y for snap down.
2023-01-02build: bump version to 0.3.0-devIsaac Freund1-1/+1
2023-01-02build: bump to version 0.2.0Isaac Freund1-1/+1
2023-01-02command/spawn-tagmask: apply globallyIsaac Freund5-12/+10
Currently the spawn-tagmask applies to the currently focused output. This however means that it is lost if the monitor is unplugged and makes it hard to set for all outputs. Change this to make the command apply to all outputs. This is a breaking change.
2023-01-01Rework focus-follows-cursor to work with warpshironeko1-14/+28
When focus-follows-cursor is used with cursor-warp, some windows will get focus before the cursor properly "enters" the window since they have a larger input-region than their window geometry, this causes the cursor to be yanked to the middle unexpectedly. This fix makes it so the focus is only given when the cursor enters the window geometry.
2022-12-31river-control: update zig-wayland to fix leakIsaac Freund2-2/+2
It was forgotten to destroy the callback server side object when sending the destructor event. With the new zig-wayland version, this cannot be forgotten.
2022-12-31river-control: mark callback events as destructorsMaxVerevkin1-2/+2
2022-12-31layout: fix size of CSD viewsIsaac Freund2-10/+17
Currently we subtract the border width from the size of CSD view as well as SSD ones, which is not correct.
2022-12-30touch: support drag and dropIsaac Freund5-53/+107
2022-12-30Config: use a single xkb keymap for all keyboardsIsaac Freund5-43/+36
This is nice simplification and allows us to abort startup if the default xkb configuration (perhaps influenced by XKB_DEFAULT_* environment variables) is invalid.
2022-12-29session-lock: fix potential raceIsaac Freund5-30/+150
Currently the session lock client has no 100% safe way to know when it is safe to suspend after requesting that the session be locked. For a suspend to be safe the compositor must have either blanked or rendered a lock surface on all outputs before suspending. This is because the current framebuffer on suspend appears to be saved and displayed again after suspend, at least on my Linux system. If a new "locked" frame for all outputs is not rendered before suspend, an "unlocked" frame or frames will likely be briefly displayed on resume before the lock surfaces are rendered or the screen is blanked. To fix this, wait until a lock surface has been rendered on all outputs, or if that times out until all outputs have been blanked, before sending the locked event to the client. Resolving this race on the compositor side without protocol changes is the most effective way to avoid this potential information leak, regardless of which session lock client is used.
2022-12-29river: fix resize commandLeon Henrik Plickat1-0/+10
In 489a49735 the view.move() call, which is used to keep the view centered after a resize, was accidentally removed.
2022-12-28flags: automatically prepend '-'Isaac Freund6-47/+47
This makes the usage a bit cleaner as the results of the parsing may be accessed with e.g. ret.flags.version instead of ret.flags.@"-version".
2022-12-28command/map: use flags.zig, cleanupIsaac Freund3-87/+64
2022-12-28docs: improve keyboard layout documentationIsaac Freund2-23/+9
- Remove recommendation of XKB_* environment variables in river(1) as we now have a dedicated riverctl keyboard-layout command. - Give an example of how to use and switch between multiple layouts in the riverctl(1) man page.
2022-12-28command/keyboard-layout: use flags.zig, cleanupIsaac Freund4-50/+39
2022-12-28flags: rewrite to allow [:0]const u8 argumentsIsaac Freund4-104/+99
This also cleans up the code by using @Type(), eliminating the need for the argFlag() and boolFlag() functions. Allowing [:0]const u8 arguments makes this parser useful for river-control commands as well.
2022-12-28river: add keyboard-layout commandLeon Henrik Plickat5-1/+109
This allows switching river's keyboard layout at runtime.
2022-12-24river: support wp-single-pixel-buffer-v1Andrea Feletto2-0/+1
2022-12-24idle: support ext-idle-notify-v1, drop KDE protocolIsaac Freund5-8/+6
This commit is a breaking change as it drops support for the now obsolete org_kde_kwin_idle protocol.
2022-12-24build: handle wlroots built without xwayland supportIsaac Freund3-6/+13
2022-12-24View: honor fullscreen requests before mapIsaac Freund3-13/+6
2022-12-02river-status: correctly advertise version 4MaxVerevkin3-2/+2
This should have been a compile error but slipped through due to a bug in zig-wayland. This bug has now been fixed and the submodule updated.
2022-12-02river-status: fix typo in layout_name_clear descriptionAiz1-1/+1
2022-12-01river-layout: fix version of layout_name eventsIsaac Freund1-2/+2
2022-12-01river-status: expose current layout nameLeon Henrik Plickat4-2/+60