aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-04-14commands: add printf attribute to cmd_results_new()Simon Ser
And fix the resulting build failures.
2023-04-14pango: add printf attributeSimon Ser
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-14Add format_str() and vformat_str()Simon Ser
Simple helpers to allocate and format a string.
2023-04-14Use output_match_name_or_id() in apply_output_config_to_outputs()Simon Ser
2023-03-14root: Try to preserve relative positions of floating containersAnkit Pandey
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-02-22Move output commit out of output_render()Simon Ser
That way output_render() only does what it says on the tin.
2023-02-22Constify pixman_region32_t for rendering functionsSimon Ser
2023-02-20Implement seatop_touchStacy Harper
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-20Update surface fractional scale on output changeSimon Ser
Closes: https://github.com/swaywm/sway/issues/7464
2023-02-10Introduce surface_{enter,leave}_output()Simon Ser
We can centralize all output-related surface events from there.
2023-02-05launcher: support external launcher tokensRonan Pigott
2023-02-05launcher: make launcher context seat awareRonan Pigott
2023-02-05view: make request_activate take a seatRonan Pigott
This way we can move focus on the same seat an activation token originates from.
2023-02-01ipc: add support for output eventSimon Ser
For compatibility with i3 [1]. [1]: https://i3wm.org/docs/ipc.html#_output_event
2023-01-16input/tablet: handle focusing NULL surfaceKirill Primak
Additionally, rename the function responsible for switching focus to match its behavior better.
2023-01-16swaynag: call swaynag_destroy on clean exitManuel Stoeckl
And fix the fallout of the swaynag_destroy having evolved without being tested: * wl_display_disconnect was called too early * `button_close` and `swaynag.details.button_details` needed to be heap allocated, since they are added to swaynag.buttons, and all entries of swaynag.buttons are freed in swaynag_destroy * To keep things simpler, disconnect the lifetime of the 'Toggle details' button text config setting from the button itself.
2023-01-07Improve tablet tool button handling.John Chadwick
This change allows the tablet tool button to be used for floating mod resize. In addition, it attempts to ensure that tablet tool events are consistent such that tablet v2 events and pointer events will never be interleaved, and such that the tool buttons count will never fall out of sync and cause tool button emulation to break. Some of this logic is similar to what is done for tablet tool tip, but not quite identical, because of the complication that we have to deal with multiple inputs that can overlap eachother. Fixes #7036.
2023-01-03Make cmd_handler.command constCarl Smedstad
2023-01-03Add missing includes & remove duplicatesCarl Smedstad
2023-01-03Remove duplicate declarationsCarl Smedstad
2022-12-22swaynag: drop swaynag_type.fontSimon Ser
It's too easy to have this go out of sync with font_description.
2022-12-09Add libinput RotationAngleLucas Zampieri
This patch adds the libinput option RotationAngle to sway. Signoff-by: Lucas Zampieri <lzampier@redhat.com>
2022-12-05Add `primary_selection` config optionAidan Dang
See: https://github.com/swaywm/sway/issues/4511 Adds a bool config option `primary_selection`, which explicitly enables/disables the primary selection clipboard. Defaults to enabled. This is implemented as a launch-only option which enables or disables the creation of the `zwp_primary_selection_device_manager_v1` global. Co-authored-by: Tilde Rose <t1lde@protonmail.com>
2022-12-01sway/desktop/output: listen to output mode in commit handleSimon Zeni
2022-11-28Make session optionalSimon Ser
2022-11-26swaybar: Make hotspots block bar release bindingsJoan Bruguera
The previous commit prioritized hotspots before bar bindings for press events, which matches i3's behaviour. However, since hotspots don't need to do any processing on release events, those were not handled, and simply fell through to `bindsym --release` bar bindings (if any). This is counter-intuitive, and doesn't match i3's behaviour. Instead in case a hotspot handles the press event, it should also handle the release event, doing nothing, but blocking the event from triggering a --release bar binding. E.g., in Sway, without this commit, this config. shows a text on tray clicks: bar { # ... bindsym --release button1 exec swaynag -m I_got_the_release_event. } But the same configuration in i3 (with i3-nagbar) doesn't show the text. Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-11-26launcher: export X startup ids and use them for workspace matchingRonan Pigott
2022-11-26launcher: export xdga tokens and use them for workspace matchingRonan Pigott
2022-11-26launcher: fudge the interface a bitRonan Pigott
We want to create a context before knowing the pid it will match with.
2022-11-26launcher: initialize launcher_ctxs once on startupRonan Pigott
2022-11-26view: associate launch contexts with viewsRonan Pigott
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-26launcher: rename pid_workspace to launcher_ctxRonan Pigott
Soon we will match views with more than just a pid.
2022-11-26launcher: track workspaces by nodeRonan Pigott
This removes the need to rename the pid_workspaces when a workspace is renamed. It also opens the possibility of tracking other node types. Tracking containers would allow application to be placed correctly in the container tree even if the user has moved their focus elsewhere since it was launched.
2022-11-26root: move the workspace matching code to its own fileRonan Pigott
This removes the pid_workspace bits from tree/root before it gets too interesting. No functional change.
2022-11-15Update for wlroots!3814Simon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3814
2022-11-15ipc: add view content typeSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3599
2022-11-15Listen to the output request_state eventSimon Ser
References: https://github.com/swaywm/wlroots/pull/2693
2022-11-15input/seat: locally compute drag icon offsetSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3861
2022-11-11Use wlr_damage_ringKirill Primak
wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
2022-10-30Support libinput's 1.21 new dwtp optionpudiva chip líquida
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-28Rework session lock keyboard focus handlingDaniel De Graaf
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-23Fix keymap being NULL and segfaulting on dev addYaroslav de la Peña Smirnov
Moved `libinput_config` to the callers of `sway_input_configure_libinput_device` so that we send the event after the added event.
2022-10-14Add support for ext-idle-notify-v1Simon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3753
2022-10-09Use keyboard_state.focused_surface directlyFerdinand Schober
2022-10-09allow pointer_constraints on layer_shell surfacesFerdinand Schober
2022-10-07sway/commands/output: Add command for unplugging non-physical outputsAndri Yngvason
2022-09-19sway: add non-desktop outputs to json when running `swaymsg -t get_outputs`Alex Maese
2022-09-19sway: Add non-desktop-output typeAlex Maese
Currently, when encountering a non-desktop display, sway offers the output for leasing and returns without storing it in a sway specific output type like `struct sway_output`. Additionally, running `swaymsg -t get_outputs` doesn't show non-desktop outputs. This commit stores the non-desktop outputs into a struct called `sway_output_non_desktop`, and adds them to a list on `sway_root`
2022-07-04Remove internal references to DPMSSimon Ser
While at it, use an int for the config field, just like we do for all other fields.
2022-07-01Reuse parsed PangoFontDescriptionHugo Osvaldo Barrera
Avoids parsing the configured font each time text is rendered.