aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2022-12-11root: Try to preserve relative positions of floating containersFurkan Sahin-0/+8
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()Furkan Sahin-2/+1
That way output_render() only does what it says on the tin.
2023-02-22Constify pixman_region32_t for rendering functionsFurkan Sahin-3/+3
2021-08-21Implement seatop_touchFurkan Sahin-2/+25
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 changeFurkan Sahin-0/+1
Closes: https://github.com/swaywm/sway/issues/7464
2023-02-08Introduce surface_{enter,leave}_output()Furkan Sahin-0/+5
We can centralize all output-related surface events from there.
2022-11-30launcher: support external launcher tokensFurkan Sahin-0/+3
2022-11-30launcher: make launcher context seat awareFurkan Sahin-2/+5
2022-11-30view: make request_activate take a seatFurkan Sahin-1/+1
This way we can move focus on the same seat an activation token originates from.
2023-02-01ipc: add support for output eventFurkan Sahin-0/+1
For compatibility with i3 [1]. [1]: https://i3wm.org/docs/ipc.html#_output_event
2023-01-09input/tablet: handle focusing NULL surfaceFurkan Sahin-1/+1
Additionally, rename the function responsible for switching focus to match its behavior better.
2023-01-08swaynag: call swaynag_destroy on clean exitFurkan Sahin-1/+2
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.
2022-05-30Improve tablet tool button handling.Furkan Sahin-0/+1
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.
2022-12-30Make cmd_handler.command constFurkan Sahin-2/+2
2022-11-06Add missing includes & remove duplicatesFurkan Sahin-2/+9
2022-11-07Remove duplicate declarationsFurkan Sahin-2/+0
2022-12-21swaynag: drop swaynag_type.fontFurkan Sahin-1/+0
It's too easy to have this go out of sync with font_description.
2022-11-24Add libinput RotationAngleFurkan Sahin-0/+2
This patch adds the libinput option RotationAngle to sway. Signoff-by: Lucas Zampieri <lzampier@redhat.com>
2022-03-16Add `primary_selection` config optionFurkan Sahin-1/+3
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 handleFurkan Sahin-1/+0
2022-11-26Make session optionalFurkan Sahin-1/+0
2021-09-18swaybar: Make hotspots block bar release bindingsFurkan Sahin-2/+2
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-16launcher: export X startup ids and use them for workspace matchingFurkan Sahin-0/+1
2022-11-18launcher: export xdga tokens and use them for workspace matchingFurkan Sahin-0/+4
2022-11-16launcher: fudge the interface a bitFurkan Sahin-1/+1
We want to create a context before knowing the pid it will match with.
2022-11-16launcher: initialize launcher_ctxs once on startupFurkan Sahin-1/+3
2022-11-16view: associate launch contexts with viewsFurkan Sahin-3/+22
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-16launcher: rename pid_workspace to launcher_ctxFurkan Sahin-3/+3
Soon we will match views with more than just a pid.
2022-11-16launcher: track workspaces by nodeFurkan Sahin-2/+0
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-16root: move the workspace matching code to its own fileFurkan Sahin-8/+14
This removes the pid_workspace bits from tree/root before it gets too interesting. No functional change.
2022-11-03Update for wlroots!3814Furkan Sahin-0/+1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3814
2022-10-04ipc: add view content typeFurkan Sahin-0/+1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3599
2021-01-28Listen to the output request_state eventFurkan Sahin-0/+1
References: https://github.com/swaywm/wlroots/pull/2693
2022-11-15input/seat: locally compute drag icon offsetFurkan Sahin-0/+1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3861
2022-11-11Use wlr_damage_ringFurkan Sahin-3/+5
wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
2022-08-24Support libinput's 1.21 new dwtp optionFurkan Sahin-0/+2
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-04-29Rework session lock keyboard focus handlingFurkan Sahin-4/+1
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 addFurkan Sahin-1/+1
Moved `libinput_config` to the callers of `sway_input_configure_libinput_device` so that we send the event after the added event.
2022-10-04Add support for ext-idle-notify-v1Furkan Sahin-0/+1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3753
2022-10-08Use keyboard_state.focused_surface directlyFurkan Sahin-2/+0
2022-09-19allow pointer_constraints on layer_shell surfacesFurkan Sahin-0/+2
2022-09-29sway/commands/output: Add command for unplugging non-physical outputsFurkan Sahin-0/+1
2022-06-09sway: add non-desktop outputs to json when running `swaymsg -t get_outputs`Furkan Sahin-0/+2
2022-06-09sway: Add non-desktop-output typeFurkan Sahin-0/+9
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-06-23Remove internal references to DPMSFurkan Sahin-8/+2
While at it, use an int for the config field, just like we do for all other fields.
2022-07-01Reuse parsed PangoFontDescriptionFurkan Sahin-7/+9
Avoids parsing the configured font each time text is rendered.
2022-06-29Reject font values that are invalid for pangoFurkan Sahin-2/+4
Use pango to parse font configuration early, and reject the command as invalid if the value is invalid for pango. Since we're already parsing the font into a `PangoFontDescription`, keep that instance around and avoid re-parsing the font each time we render text. Fixes: https://github.com/swaywm/sway/issues/6805
2022-06-22Rename dpms output command to powerFurkan Sahin-0/+1
The "dpms" command refers to VESA Display Power Management Signaling, a deprecated standard. It's superseded by VESA DPM. Instead of tying out command name to a particular standard, use the neutral term "power".
2022-06-21Remove access to wlr_input_device unionFurkan Sahin-0/+3
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3626 Closes: https://github.com/swaywm/sway/issues/7077
2022-06-01Refuse to start when SUID is detectedFurkan Sahin-2/+0
This ensures that those surprised by the deprecation of SUID operation receive an error rather than accidentally having sway run as root. This detection will be removed in a future release.