Simon Ser
65b1a6964c
desktop/output: fix damage bitfield in wlr_output_state
1 year ago
Simon Ser
f3b8c9feee
desktop/output: use detached output state for page-flips
...
This avoids relying on the implicit wlr_output.pending state.
1 year ago
Simon Ser
b1b3563d54
Handle gamma-control-v1 set_gamma events
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
1 year ago
Erik Reider
913a7679cb
Add support for wlr-layer-shell ON_DEMAND keyboard interactivity
...
This allows for layer shell surfaces to receive focus while the surface is explicitly focused, i.e allowing
text fields to receive keyboard input just like a regular surface.
2 years ago
Artturin
7ab8cb2ee6
chase wlroots wlr_renderer_begin_buffer_pass change
...
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4159
> ../sway/desktop/output.c:618:47: error: too few arguments to function 'wlr_renderer_begin_buffer_pass'
> 618 | struct wlr_render_pass *render_pass = wlr_renderer_begin_buffer_pass(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 years ago
Kirill Primak
b5cb49bce9
xwayland: fix mapped state check in OR handlers
2 years ago
Kirill Primak
c9e1dab318
chore: chase wlroots map logic unification
2 years ago
Kirill Primak
72881b5d12
xwayland: don't rely on event source being data
...
This pattern is being slowly removed from wlroots.
2 years ago
Erik Reider
48d6eda3cb
Fix layer old damage not being offset by the monitor layout coords
2 years ago
Simon Ser
19cc36accc
render: fix titlebar texture clipping
...
We need to provide an unclipped dst_box.
Fixes: https://github.com/swaywm/sway/issues/7573
Regressed by: https://github.com/swaywm/sway/pull/7552
2 years ago
Kenny Levinsen
0a951517ae
render: Clear using wlr_output dimensions
...
Clear was done using sway_output's logical dimensions, instead of the
wlr_output physical dimensions. This meant that when output scaling was
applied, only a part of the screen would be cleared.
Use the wlr_output dimensions instead.
Regressed by: https://github.com/swaywm/sway/pull/7552
2 years ago
Kenny Levinsen
393c29fc59
render: Apply clip to rendered texture correctly
...
The new wlr_render_pass API provides src_box, dst_box and clip
parameters for texture rendition. Rather than clipping the dst_box,
which control the projection matrix and leads to compression, intersect
the damage and clip box and pass these as a clip parameter.
Fixes: https://github.com/swaywm/sway/issues/7579
Regressed by: https://github.com/swaywm/sway/pull/7552
2 years ago
Alexander Orzechowski
db7638a0e5
Don't crash if there is no damage during render
2 years ago
Alexander Orzechowski
029b99b482
render: Use wlr_render_pass
2 years ago
Alexander Orzechowski
07cdf6ccd0
render: Don't pass matrix into render_texture
2 years ago
Alexander Orzechowski
d5cc474aef
render: pass rendering state together in a struct
...
This lets us easily add rendering state that we need in the future
2 years ago
Alexander Orzechowski
33cfdbe886
xdg_shell: Fix crash if popup generates while toplevel is in the scratchpad
2 years ago
Simon Ser
fcec581748
Use output_match_name_or_id() in apply_output_config_to_outputs()
2 years ago
Simon Ser
8d95638df6
Introduce output_match_name_or_id()
...
Reduces code duplication.
2 years ago
Elyes Haouas
63f9bdf001
Fix old style function definitions
...
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2 years ago
Simon Ser
ab4f460597
Set output damage during direct scan-out
...
During direct scan-out, pass the damaged region to the wlroots
backend.
2 years ago
Simon Ser
777df22377
Skip direct scan-out commit when damage is empty
...
When there is no damage, no need to perform an output commit, even
when direct scan-out is used.
2 years ago
Alexander Orzechowski
dadf3e9b78
Chase wlroots!4067
2 years ago
Simon Ser
e8fb7f53b8
Remove duplicate wlr_damage_ring_set_bounds() call
...
We already do this in handle_commit().
2 years ago
Erik Reider
fa7b686e61
Fix damage-ring bounds not being set when unplugging -> plugging in monitor
...
#7524 was a partial fix. Seems like this is still an issue when
unplugging and plugging the monitor back in.
Closes: https://github.com/swaywm/sway/issues/7528
2 years ago
Erik Reider
ac1ed638e9
Init the damage_ring bounds on output creation
...
Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
2 years ago
novenary
b28e1b0d3c
Disable direct scanout for surfaces with popups
2 years ago
Simon Ser
16b0afd433
Check for empty damage before attaching render buffer
...
Check whether output->damage_ring.current is empty before calling
wlr_output_attach_render(). Saves us from having to un-do that
via wlr_output_rollback().
2 years ago
Simon Ser
c2ccc0c9d4
Move output commit out of output_render()
...
That way output_render() only does what it says on the tin.
2 years ago
Simon Ser
d6cb4fa8de
Constify pixman_region32_t for rendering functions
2 years ago
Simon Ser
7d2e4a5106
layer-shell: enter output before surface is mapped
...
This sends fractional-scale-v1 events before the first configure
event. That way clients have all of the metadata they need to render
the first frame.
2 years ago
Simon Ser
7a6c7d60d5
Update surface fractional scale on output change
...
Closes: https://github.com/swaywm/sway/issues/7464
2 years ago
Simon Ser
9162b536f6
Add support for fractional-scale-v1
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3511
2 years ago
Simon Ser
1cab17ada2
Introduce surface_{enter,leave}_output()
...
We can centralize all output-related surface events from there.
2 years ago
Ronan Pigott
dbc1eec850
launcher: make launcher context seat aware
2 years ago
Ronan Pigott
842609da64
view: make request_activate take a seat
...
This way we can move focus on the same seat an activation token
originates from.
2 years ago
Simon Ser
40eb29e7c5
ipc: add support for output event
...
For compatibility with i3 [1].
[1]: https://i3wm.org/docs/ipc.html#_output_event
2 years ago
Alexander Courtis
2c0f68b7c6
Apply new adaptive sync value from wlr-output-management
...
fixes #7394
Test cases:
* zwlr_output_configuration_head_v1_set_adaptive_sync 0->0, no change
* 0->1, enabled
* 1->0, disabled
* 1->1, no change
Similar tests with an incapable display resulted in `"Adaptive sync
failed, ignoring"` messages as expected.
2 years ago
Simon Ser
36f627d0fa
Check return value of wlr_renderer_begin()
...
Since [1], wlr_renderer_begin() can fail. Check its return value
and bail.
This fixes an assertion error (when begin() fails and then we try
to render something) after a GPU reset.
[1]: a541c9510a
2 years ago
Carl Smedstad
9425ce2fba
Replace math functions that promote float to double
2 years ago
Simon Zeni
aa03a8fcb5
sway/desktop/output: listen to output mode in commit handle
2 years ago
Simon Ser
e795ea6a0c
Make DRM backend optional
2 years ago
Simon Ser
5b64e2fc31
Make GLES2 optional
2 years ago
Ronan Pigott
28fda4c0d3
launcher: export X startup ids and use them for workspace matching
2 years ago
Ronan Pigott
30ad4dc4a5
launcher: export xdga tokens and use them for workspace matching
2 years ago
Ronan Pigott
bdeb9f9565
launcher: fudge the interface a bit
...
We want to create a context before knowing the pid it will match with.
2 years ago
Ronan Pigott
66568508c0
launcher: initialize launcher_ctxs once on startup
2 years ago
Ronan Pigott
864b3a9a18
view: associate launch contexts with views
...
Views now maintain a reference to a launch context which, as a last
resort, is populated at map time with a context associated with its pid.
This opens the possibility of populating it before map via another
source, e.g. xdga-tokens or configuration.
2 years ago
Ronan Pigott
d75c9f9722
launcher: rename pid_workspace to launcher_ctx
...
Soon we will match views with more than just a pid.
2 years ago
Ronan Pigott
bd66f4943d
launcher: use xdga tokens
...
This reuses wlroots token tracking for workspace matching. It doesn't
export any xdga tokens for clients yet.
2 years ago