Commit graph

7011 commits

Author SHA1 Message Date
Alexander Orzechowski
d1417b8a13 output: destroy output after ensuring it is disabled
This became necessary after the removal of the wlr_output_damage object.
Before, the wlr_output_damage destroy signal fired disabling the output,
then after the handle_destroy function would be called.

Fix this to prevent hitting an assert.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
625cf6df3b transaction: Rebase cursor on transaction finish
We need to make sure that we rebase the cursor after the scene graph
is arranged otherwise the mouse will rebase on the old state instead.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
90df29dde3 scene_graph: Arrange scene graph on transaction apply 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
dc511e3ccd container: Don't track outputs
The scene graph abstraction does this for us
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
1a09cfd95d Delete old damage tracking code
The new scene graph abstraction handles this for us.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
3616f804c2 scene_graph: Port view saved buffers 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
ad01333209 xwayland: Cleanup geometry handling on commit
Instead of doing this roundabout thing where we get the surface from the
view, let's instead get it from the `wlr_surface_state` that we already
track in `handle_commit`. This makes the NULL state impossible which is
what the old `get_geometry` is checking for and generally cleans
things up a little bit.

Also don't check if the geometry x/y changed, those will always
be 0 for xwayland.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
6fcd702c97 scene_graph: Port xwayland 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
c3615a8b57 scene_graph: Port xdg_shell 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
8d6080bd5a transaction: ready signals will return success bools 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
425607608d scene_graph: Port container server side decorations 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
84168eb70c container: Remove dead location query code 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
e45e583434 scene_graph: Port layer_shell 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
4b39a8a847 input: Query scene graph for relevant surface/node intersections 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
f9fc1ff7a8 Introduce sway_text_buffer
This is a helper on top of a wlr_scene_buffer that will handle text
rendering for us.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
fdc2053bfe renderer: Remove in favor of scene_graph 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
c8398d19c3 seat: Remove dead seatop_render function 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
74d1116294 scene_graph: Port ext_session_v1 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
b6b6dd0d28 scene_graph: Port seatop_move_tiling indicators 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
a6d4f4d3b5 scene_graph: Port seat drag icons 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
4927531b37 renderer: Render scene_graph 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
8eb7ec53d4 scene_graph: Introduce sway_scene_descriptor
Across a wayland compositor, there are multiple shells: It can be
a toplevel, or a layer_shell, or even something more meta like a drag
icon or highlight indicators when dragging windows around.

This object lets us store values that represent these modes of operation
and keep track of what object is being represented.
2022-11-07 20:13:19 +03:00
Alexander Orzechowski
be54b77886 scene_graph: Wire up presentation time 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
25da7b237d scene_graph: Maintain wlr_scene_nodes for the sway tree. 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
a33ede4c43 view: init function should return a success bool 2022-11-07 20:13:19 +03:00
Alexander Orzechowski
d3ca83acb7 desktop: Rename layers to shell_layers
This code will be deleted later, but for the time being rename
it so it doesn't conflict with future properties.
2022-11-07 20:13:19 +03:00
Callum Andrew
3e19836f0e criteria: allow matching for NULL string criteria 2022-11-04 10:02:11 +01:00
Puck Meerburg
e40eb338b9 criteria: allow matching on empty (NULL) titles 2022-10-30 10:57:19 +01:00
Puck Meerburg
0fdeb4ca84 tree: support formatting null titles
Any windows that have never had a title set visually behave closer to
that of an empty title, but are unformattable, as the code bails out
early on a NULL title.
2022-10-30 10:57:19 +01:00
pudiva chip líquida
7cc8ab6d6c Support libinput's 1.21 new dwtp option
Support the new dwtp (disable while trackpointing) option introduced in
libinput 1.21, allowing users to control whether the trackpoint (like
those in Thinkpads, but not only) should be disabled while using the
keyboard/touchpad.

See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
2022-10-30 10:56:34 +01:00
Alexander Orzechowski
a61815d385 container_floating_set_default_size: Store workspace size box on the stack 2022-10-29 00:47:01 +02:00
Daniel De Graaf
8aa89dc277 Fix focus tracking when session lock is active
Remove the incorrect attempt to block focus changes when an input grab
is present and replace it with the same logic used for layer_shell-based
screen lockers: restore the focus after changing it.

This fixes a use-after-free of seat->workspace if outputs are destroyed
while a screen lock is enabled.
2022-10-28 19:41:24 +02:00
Daniel De Graaf
8f7bb145b7 Rework session lock keyboard focus handling
When removing outputs, it is possible to end up in a situation where
none of the session lock client's surfaces have keyboard focus,
resulting in it not receiving keyboard events.  Track the focused
surface and update it as needed on surface destroy.
2022-10-28 19:41:24 +02:00
Yaroslav de la Peña Smirnov
9d99bb956f Fix keymap being NULL and segfaulting on dev add
Moved `libinput_config` to the callers of
`sway_input_configure_libinput_device` so that we send the event after
the added event.
2022-10-23 11:56:29 +02:00
Tudor Brindus
5e514e6474 input: tweak focus behavior to allow focusing parent containers
Sway focuses the inactive child when focusing split containers. However,
there is currently no way to focus the parent container itself by mouse.
A user must use the keyboard to do so.

This commit maintains the current behavior, but makes it such that a
second click on the split container titlebar (i.e., after its children
are visible) focuses the split container itself.
2022-10-21 10:05:00 +02:00
Simon Ser
9400bd963c Add support for ext-idle-notify-v1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3753
2022-10-14 15:56:07 +02:00
cparm
99fd096d69 Avoid double free in criteria_destroy() 2022-10-13 14:56:10 +02:00
Simon Ser
7a6afc5199 Fix leaks in criteria_destroy() 2022-10-10 09:51:01 -04:00
Tudor Brindus
c7bced9329 input: focus container when scrolling on titlebar
Fixes #6503.
2022-10-10 08:56:51 +02:00
Tudor Brindus
09354db878 input: focus floating container when clicked on border
Fixes #7209.
2022-10-10 08:55:21 +02:00
Ferdinand Schober
99acdb4e62 Use keyboard_state.focused_surface directly 2022-10-09 10:07:51 +02:00
Ferdinand Schober
be7707874a use seat directly 2022-10-09 10:07:51 +02:00
Ferdinand Schober
e2bb5799af check for NULL 2022-10-09 10:07:51 +02:00
Ferdinand Schober
d5659948f1 allow pointer_constraints on layer_shell surfaces 2022-10-09 10:07:51 +02:00
ohno418
07c827b4be Improve Japanese translation 2022-10-08 10:12:00 +02:00
Andri Yngvason
b00b05f792 sway/commands/output: Add command for unplugging non-physical outputs 2022-10-07 19:17:39 +02:00
Simon Ser
04f8a655e7 build: simplify protocol paths
No need for arrays here.
2022-10-04 09:48:29 +02:00
Simon Ser
78b5c0a77e swaymsg: show mode picture aspect ratio 2022-10-03 13:35:52 +02:00
Simon Ser
f70d1e1b95 ipc: expose mode picture aspect ratio 2022-10-03 13:35:52 +02:00
マリウス
b0fc83485d man: Add XWayland information 2022-09-25 20:05:16 +02:00