Fabian Specht
88fb849e59
Change container_get_first_view signature
...
This will have the function stop the recusive calls as soon as
the first view is found - unlike before
2024-01-12 21:23:08 +01:00
Fabian Specht
c2eaf01767
Add the swap_workspace command
...
The added command allow the user to swap the contents of two workspaces.
Co-authored-by: Arne <ge47com@tum.de>
2024-01-12 16:02:12 +01:00
Simon Ser
95265fba59
input: reconfigure send_events on output hotplug
...
Closes: https://github.com/swaywm/sway/issues/7890
2024-01-02 14:07:35 +01:00
Billli11
0aceff7469
Remove wlr_presentation in sway_server struct
...
It is no longer in use.
2023-12-28 11:28:28 +01:00
Alexander Orzechowski
bbabb9aae8
output: Destroy when output layout is destroyed
...
Since output layout is destroyed when the wayland display is destroyed
we run into a destroy listener order problem: Either the display starts
destroying the outputs first, in which case we're good: The existing
handling will clean up. However, things go wrong if the display decides
to destroy the output layout first. In this case, sway will hold
invalid references to the output layout as part of each output so that
when it finally goes to destroy them, sway will dereference destroyed
output layout bits.
Ref: https://github.com/swaywm/sway/pull/6844#issuecomment-1843599513
2023-12-13 18:10:03 +01:00
Simon Ser
e8a0205607
input/seat: rename seat_set_exclusive_client()
2023-12-13 10:11:35 +01:00
Simon Ser
dbd70faf2e
input/seat: drop exclusive_client
...
This was a input-inhibit concept.
2023-12-13 10:11:35 +01:00
Simon Ser
ff07eab85b
Detect Nvidia proprietary driver via drmGetVersion()
...
This is less punishing for users with the Nvidia driver loaded but
not used by Sway (e.g. for CUDA).
2023-12-12 10:04:14 -05:00
Manuel Stoeckl
e633fe0b40
common: move load_image to swaybar
...
swaynag, swaymsg, and sway do not use this function and are
unlikely to in the future.
2023-11-23 20:42:04 +01:00
Manuel Stoeckl
439122e887
common: rename load_background_image to load_image
2023-11-23 20:42:04 +01:00
Manuel Stoeckl
39b9c0d6ba
common: Drop unused render_background_image
...
And the associated background_mode enum.
2023-11-23 20:42:04 +01:00
Kirill Primak
47e6a1164c
xdg-shell: chase events update
2023-11-23 19:41:57 +01:00
Simon Ser
128b6253a9
Pass wl_display to wlr_output_layout
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310
2023-11-23 16:13:19 +03:00
llyyr
a946b1aecf
Chase wlroots!4440
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4440
2023-11-22 00:42:55 +03:00
Simon Ser
072fa60cb4
Add support for security-context-v1
...
As a first step, deny access to privileged protocols to sandboxed
apps.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3589
2023-11-21 15:12:42 +01:00
Simon Ser
5c99b98805
input/input-manager: drop input_manager_configure_all_inputs
...
This is now unused.
2023-11-16 16:29:07 +01:00
Simon Ser
7036769bea
Only reconfigure input mappings on output change
...
Fully reconfiguring all input devices on output change takes a
loooong time. Let's just reconfigure what we need: only mappings
depend on outputs.
2023-11-16 16:29:07 +01:00
Simon Ser
7cf4e1d5c6
Drop support for KDE's idle protocol
...
We support the standard idle-notify protocol since Sway 1.8.
2023-10-05 00:01:54 +02:00
Johan Sköld
d952ce403e
i3 compat: Adding support for the all
criteria
...
Matches all views. i3 PR: https://github.com/i3/i3/pull/4460
Fixes #7110
2023-09-07 10:42:54 +09:00
luzpaz
d84b3832f4
Fix typo
2023-08-23 20:18:13 +02:00
Simon Ser
f8ddd97e0e
output: drop current_mode
...
This is now unused.
2023-07-31 16:25:01 +02:00
Alexander Orzechowski
df8aad9c5a
swaynag: Implement wp_cursor_shape_v1
2023-07-31 10:34:11 +02:00
Alexander Orzechowski
f436de9200
swaybar: Implement wp_cursor_shape_v1
2023-07-31 10:34:11 +02:00
Simon Ser
6bd11ad0df
Add support for cursor-shape-v1
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4106
2023-07-24 11:28:31 +02:00
Mark Bolhuis
20c91335f6
input: Move wlr_pointer_gestures_v1 to sway_input_manager
...
On multi-seat configurations a zwp_pointer_gestures_v1 global was
created for every seat.
Instead, create the global once in the input manager, to be shared
across all seats.
2023-06-26 22:57:46 +02:00
Simon Ser
b762f455d9
idle-inhibit-v1: simplify with server global
...
We only have a single running server, no need to keep track of
multiple server instances. Also no need to support multiple
idle inhibit managers.
2023-06-23 12:32:38 +02:00
Cezary Drożak
c08762901e
input/libinput: add scroll_button_lock method
...
Closes https://github.com/swaywm/sway/issues/6987
Co-authored-by: JJGadgets <git@jjgadgets.tech>
Co-authored-by: DeltaWhy <mike5713@gmail.com>
2023-06-16 15:30:04 +02: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
Kirill Primak
c9e1dab318
chore: chase wlroots map logic unification
2023-06-02 20:11:42 +02:00
hrdl
e8f7551e46
Add support for touch cancel events
2023-05-04 13:30:57 +02:00
Alexander Orzechowski
029b99b482
render: Use wlr_render_pass
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
Simon Ser
ea279f4df3
swaynag: add printf attribute to swaynag_log()
2023-04-14 18:34:54 +02:00
Simon Ser
96cebb4fe6
config: add printf attribute to config_add_swaynag_warning()
2023-04-14 18:34:54 +02:00
Simon Ser
a7b50f6c9c
commands: add printf attribute to cmd_results_new()
...
And fix the resulting build failures.
2023-04-14 18:34:54 +02:00
Simon Ser
bd58df61ef
pango: add printf attribute
...
This allows the compiler to catch mismatches between the format
string and the arguments passed in.
Need to add -Wno-format-zero-length because we pass an empty string
on purpose in swaybar/render.c.
2023-04-14 18:34:54 +02:00
Simon Ser
aab4c9da5f
Add format_str() and vformat_str()
...
Simple helpers to allocate and format a string.
2023-04-14 18:34:54 +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
Ankit Pandey
90c2d631e2
root: Try to preserve relative positions of floating containers
...
This makes the behavior of floating containers more consistent with i3.
The coordinates of the container are scaled when the size of the
workspace it is on changes or when the container is moved
between workspaces on different outputs.
For scratchpad containers, add a new state that preserves the dimensions
of the last output the window appeared on. This is necessary because
after a container is hidden in the scratchpad, we expect it to be in the
same relative position on the output when it reappears. We can't just
use the container's attached workspace because that workspace's
dimensions might have been changed or the workspace as a whole could
have been destroyed.
2023-03-14 23:26:42 -07: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
Stacy Harper
4666d1785b
Implement seatop_touch
...
Atm we got issue with the touch position sent to the clients. While
holding contact, leaving the initial container will continue to send
motion event to the client but with the new local position from the new
container.
This seatop goal is to send the position of the touch event, relatively
to the initial container layout position.
2023-02-20 10:35:10 -05: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
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
4cda9ee3a3
launcher: support external launcher tokens
2023-02-05 00:53:47 -07: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
Kirill Primak
53c9a4a643
input/tablet: handle focusing NULL surface
...
Additionally, rename the function responsible for switching focus to
match its behavior better.
2023-01-16 15:37:59 -05:00