Simon Ser
65b1a6964c
desktop/output: fix damage bitfield in wlr_output_state
2023-06-09 11:41:41 +02:00
Simon Ser
f3b8c9feee
desktop/output: use detached output state for page-flips
...
This avoids relying on the implicit wlr_output.pending state.
2023-06-08 14:33:23 -07:00
Simon Ser
b1b3563d54
Handle gamma-control-v1 set_gamma events
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
2023-06-08 22:11:50 +02:00
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.
2023-06-06 09:07:05 +02:00
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(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-06-05 23:12:20 +02:00
Kirill Primak
b5cb49bce9
xwayland: fix mapped state check in OR handlers
2023-06-03 09:12:12 +02:00
Kirill Primak
c9e1dab318
chore: chase wlroots map logic unification
2023-06-02 20:11:42 +02:00
Kirill Primak
72881b5d12
xwayland: don't rely on event source being data
...
This pattern is being slowly removed from wlroots.
2023-06-02 20:11:42 +02:00
Erik Reider
48d6eda3cb
Fix layer old damage not being offset by the monitor layout coords
2023-05-20 16:56:25 +02:00
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
2023-05-09 18:12:06 +02:00
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
2023-05-09 15:55:31 +02:00
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
2023-05-09 15:55:31 +02:00
Alexander Orzechowski
db7638a0e5
Don't crash if there is no damage during render
2023-05-02 23:25:50 +02:00
Alexander Orzechowski
029b99b482
render: Use wlr_render_pass
2023-05-02 18:31:55 +02:00
Alexander Orzechowski
07cdf6ccd0
render: Don't pass matrix into render_texture
2023-05-02 18:31:55 +02:00
Alexander Orzechowski
d5cc474aef
render: pass rendering state together in a struct
...
This lets us easily add rendering state that we need in the future
2023-05-02 18:31:55 +02:00
Alexander Orzechowski
33cfdbe886
xdg_shell: Fix crash if popup generates while toplevel is in the scratchpad
2023-04-16 19:55:00 +02:00
Simon Ser
fcec581748
Use output_match_name_or_id() in apply_output_config_to_outputs()
2023-04-14 18:34:54 +02:00
Simon Ser
8d95638df6
Introduce output_match_name_or_id()
...
Reduces code duplication.
2023-04-14 18:34:54 +02:00
Elyes Haouas
63f9bdf001
Fix old style function definitions
...
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-04-14 18:21:43 +02:00
Simon Ser
ab4f460597
Set output damage during direct scan-out
...
During direct scan-out, pass the damaged region to the wlroots
backend.
2023-04-14 17:43:37 +02:00
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.
2023-04-14 17:43:37 +02:00
Alexander Orzechowski
dadf3e9b78
Chase wlroots!4067
2023-04-06 22:03:52 +02:00
Simon Ser
e8fb7f53b8
Remove duplicate wlr_damage_ring_set_bounds() call
...
We already do this in handle_commit().
2023-04-06 16:35:21 +02:00
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
2023-04-06 10:40:49 +02:00
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 :)
2023-03-26 23:00:08 +02:00
novenary
b28e1b0d3c
Disable direct scanout for surfaces with popups
2023-02-28 15:38:05 +01:00
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().
2023-02-22 13:37:44 -05:00
Simon Ser
c2ccc0c9d4
Move output commit out of output_render()
...
That way output_render() only does what it says on the tin.
2023-02-22 13:37:44 -05:00
Simon Ser
d6cb4fa8de
Constify pixman_region32_t for rendering functions
2023-02-22 13:37:44 -05:00
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.
2023-02-20 12:20:42 +01:00
Simon Ser
7a6c7d60d5
Update surface fractional scale on output change
...
Closes: https://github.com/swaywm/sway/issues/7464
2023-02-20 12:11:07 +01:00
Simon Ser
9162b536f6
Add support for fractional-scale-v1
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3511
2023-02-10 20:36:15 +01:00
Simon Ser
1cab17ada2
Introduce surface_{enter,leave}_output()
...
We can centralize all output-related surface events from there.
2023-02-10 20:36:15 +01:00
Ronan Pigott
dbc1eec850
launcher: make launcher context seat aware
2023-02-05 00:53:47 -07:00
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.
2023-02-05 00:53:47 -07:00
Simon Ser
40eb29e7c5
ipc: add support for output event
...
For compatibility with i3 [1].
[1]: https://i3wm.org/docs/ipc.html#_output_event
2023-02-01 11:32:57 -05:00
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.
2023-01-23 14:17:52 +01:00
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
2023-01-21 14:16:21 +01:00
Carl Smedstad
9425ce2fba
Replace math functions that promote float to double
2023-01-03 21:50:56 +01:00
Simon Zeni
aa03a8fcb5
sway/desktop/output: listen to output mode in commit handle
2022-12-01 23:27:22 +01:00
Simon Ser
e795ea6a0c
Make DRM backend optional
2022-11-28 13:28:15 -05:00
Simon Ser
5b64e2fc31
Make GLES2 optional
2022-11-28 13:28:15 -05:00
Ronan Pigott
28fda4c0d3
launcher: export X startup ids and use them for workspace matching
2022-11-26 09:48:58 +01:00
Ronan Pigott
30ad4dc4a5
launcher: export xdga tokens and use them for workspace matching
2022-11-26 09:48:58 +01:00
Ronan Pigott
bdeb9f9565
launcher: fudge the interface a bit
...
We want to create a context before knowing the pid it will match with.
2022-11-26 09:48:58 +01:00
Ronan Pigott
66568508c0
launcher: initialize launcher_ctxs once on startup
2022-11-26 09:48:58 +01:00
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.
2022-11-26 09:48:58 +01:00
Ronan Pigott
d75c9f9722
launcher: rename pid_workspace to launcher_ctx
...
Soon we will match views with more than just a pid.
2022-11-26 09:48:58 +01:00
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.
2022-11-26 09:48:58 +01:00