aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* input/seatop_default: fix focusing floating titlesLibravatar Brian Ashworth2019-12-16
| | | | | | | | | | | When clicking on the titlebar of a floating container (or descendant of a floating container), the top-level floating container was being focused and then allowing you to move the top-level floating container. This made it so you couldn't switch to a different tab/stack within the floating container. With this patch, the focus inactive view for the container that the titlebar is associated with is focused, then the traversal to the top-level floating container is performed to use with the move floating operation.
* root_scratchpad_hide: disable fullscreen descendantsLibravatar Brian Ashworth2019-12-16
| | | | | | | Any descendant of a scratchpad container may be fullscreen so checking to see if the top-level scratchpad container is fullscreen in root_scratchpad_hide is not sufficient. This iterates through all descendants of the scratchpad container
* config/input: set type for new identifier configsLibravatar Brian Ashworth2019-12-14
| | | | | | | | | | | | | | When an input becomes available, the input type config for that device type will be merged underneath the input identifier config, provided they both exist. If an input type config gets added or modified at a later point, then those changes get merged onto the input identifier configs for that type. However there was a missing case of the input identifier config being added after the device is already available and the input type config existing. This makes it so that the first time an input identifier config gets stored, there will be a check to see if it matched any of the available devices. If it does, then there will be a search for the associated input type config, which will be merged underneath the input identifier config if found.
* input/keyboard: defer wlr_keyboard_group destroyLibravatar Brian Ashworth2019-12-13
| | | | | | | | | | This defers the destruction of wlr_keyboard_groups until idle. This is to prevent the keyboard group's keyboard from being destroyed in the middle of handling a keyboard event. This would occur when changing the keymap of the last keyboard in a group with a keyboard binding. The prevents crashing when attempting to update the xkb state of the keyboard group's keyboard. The sway_keyboard_group is still immediately destroyed so that the group is no longer used
* input/keyboard: remove group listeners on destroyLibravatar Brian Ashworth2019-12-13
| | | | | | | This adds two missing calls to wl_list_remove to remove the key and modifier listeners for the keyboard group's keyboard when destroying the keyboard group. This fixes some crashes when changing the keymap of the last keyboard in a group with a keyboard binding.
* Auto-detect output scaleLibravatar Simon Ser2019-12-12
| | | | | | | | | | | If the screen DPI is high enough, auto-enable scale=2 (if the user hasn't set the scale). Uses heuristics based on [1]. [1]: https://gitlab.gnome.org/GNOME/mutter/blob/05217066171992b0bc50882869aad6385285c878/src/backends/meta-monitor.c#L1590 Closes: https://github.com/swaywm/sway/issues/1800
* Add seat <seat> idle_{inhibit,wake} <sources...>Libravatar Drew DeVault2019-12-12
| | | | | | | | | | This adds seat configuration options which can be used to configure what events affect the idle behavior of sway. An example use-case is mobile devices: you would remove touch from the list of idle_wake events. This allows the phone to stay on while you're actively using it, but doesn't wake from idle on touch events while it's sleeping in your pocket.
* Fix lingering workspace with scratchpad showLibravatar Ronan Pigott2019-12-12
| | | | | | | Showing a window in the scratchpad can move a visible scratchpad window from another workspace to the current one. If the scratchpad window was the last visible container in that workspace, the old workspace should be destroyed.
* layer-shell: unfocus output-less layer on unmapLibravatar Brian Ashworth2019-12-10
| | | | | | | | | If a layer is focused by any seat, it needs to be unfocused on unmap. If the unmap was due to an output being disabled, there would not be a sway_output and unmap would do an early return. This results in a use-after-free if the layer was focused by any seat prior to being unmapped. This change just moves the refocusing code above the early returns.
* input/cursor: remove gesture listeners in destroyLibravatar Benjamin Cheng2019-12-07
| | | | | Part of #4794. Forgot to remove gesture listeners when the cursor is destroyed.
* input/cursor: pass gesture events to clientsLibravatar Benjamin Cheng2019-12-07
| | | | | | | | | Some wayland clients (mostly GTK3 apps) like eog or evince support gestures like pinch-to-zoom. These gestures are given to clients via the pointer_gestures_v1 protocol. This is already supported in wlroots, so we just need to hook up the events here in sway. Fixes #4724
* A Script to change sway workspace name.Libravatar Thorben Günther2019-12-06
| | | | | This script automatically changes the workspace name when an application gets closed, moved or openend.
* Improve transparency scriptLibravatar Thorben Günther2019-12-06
| | | | | | | Transparency gets reset when the script is terminated. Added command line option to set transparency strength without changing the script. Added support for multiple displays.
* config: apply input type configs on reloadLibravatar Brian Ashworth2019-12-04
| | | | | | When making the reload validation improvements, I forgot that input type configs are stored in a separate list. This makes it so input type configs are correctly applied on reload.
* Revert "fix bar_state_update/input event"Libravatar Jayce Fayne2019-12-02
| | | | This reverts commit a3da7fec32b8f18d7a70ea346618e09892c707ed.
* fix bar_state_update/input eventLibravatar Rex Hackbro2019-12-01
|
* output: Restore previous max_render_time behaviorLibravatar Kenny Levinsen2019-12-01
|
* output: Schedule idle frames if we do not renderLibravatar Kenny Levinsen2019-12-01
| | | | | | | | | | | | | | | | | | | | Repaint scheduling delays output render and frame done events from output frame events, and block idle frame events from being scheduled in between output frame done and output render in this period of time. If a surface is committed after its frame done event, but before output render, idle frame requests will be blocked, and the surface relies on the upcoming render to schedule a frame. If when the repaint timer expires, output render is deemed unnecessary, no frame will be scheduled. This can lead to surfaces never having their frame callbacks fire. To fix this, we store that a surface has requested a frame in surface_needs_frame. When the repaint expires, if no render is deemed necessary, we check this flag and schedule an idle frame. Fixes #4768
* output: Replace block_idle_frame with frame_pendingLibravatar Kenny Levinsen2019-12-01
|
* add scale_filter output config optionLibravatar Ronan Pigott2019-11-29
|
* output: Ensure that frame_done is delayed on max_render_timeLibravatar Kenny Levinsen2019-11-28
| | | | | | | | | | | | | | | | | | | max_render_time can be set on output, view, or both. However, if only applied to the output, send_frame_done_iterator would erroneously send frame_done immediately, ignoring the output max_render_time. As damage_handle_frame processed max_render_time correctly, idle frames would be blocked in anticipation of the delay that was meant to happen. Without the delay, frame events would be dispatched during the idle frame block, and some clients would never receive the frame done events they had requested, at least not until something else actively drove another render. Respecting both view and output max_render_time in send_frame_done_iterator ensures that the frame events are always correctly delayed. Fixes #4756
* Rename 'node' to 'nodes' in swayipc docLibravatar Rex Hackbro2019-11-28
|
* input/keyboard: reset seat keyboard on destroyLibravatar Brian Ashworth2019-11-28
| | | | | | | | | | | If a sway keyboard is being destroyed, then the keyboard is being removed from a seat. If the associated wlr_keyboard is the currently set keyboard for the wlr_seat, then we need to reset the wlr_seat's keyboard to NULL so it doesn't reference an invalid device for the seat. The next configured keyboard from the seat or the next keyboard from that seat that has an event will then become the seat keyboard. Similarly, this needs to be done for a wlr_keyboard_group's keyboard when the wlr_keyboard_group is being destroyed.
* config: improvements to the reload validationLibravatar Brian Ashworth2019-11-27
| | | | | | | | For the validation pass of reloading, there is no need to touch swaybg, swaynag, inputs, outputs, or seats. This drastically improves the speed of a reload by skipping over the expensive I/O configuration and handling of wayland clients. As long as the syntax is valid, the CMD_FAILURE's can be relayed during the actual reload.
* input/keyboard: check keyboard group before removeLibravatar Brian Ashworth2019-11-26
| | | | | | In sway_keyboard_destroy, only remove the keyboard from a keyboard group, if it is part of a keyboard group. If the keyboard is not part of a keyboard group, then there is nothing to remove it from
* input: seat: Fix seat device list not initialised before useLibravatar Paul Riou2019-11-24
| | | | | | | | When being created, non first seats would get through the list of devices without the list being first initialised -> segfault. Issue introduced with ab0248a54564b2f644b6fb367f9eb44fe0bf5f3c Fixes #4750: Crash when reloading Sway with multiple seats configured
* Amend typosLibravatar Jason2019-11-23
|
* Use new presentation-time helperLibravatar Simon Ser2019-11-21
| | | | | This has the advantage to (1) reduce boilerplate and (2) make us correctly handle wlr_output_event_present.commit_seq.
* Add support for wlr_keyboard_groupLibravatar Brian Ashworth2019-11-21
| | | | | | | | | | | | | | | | | A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. This is useful for keyboards that are split into multiple input devices despite appearing as one physical keyboard in the user's mind. This adds support for wlr_keyboard_groups to sway. There are two keyboard groupings currently supported, which can be set on a per-seat basis. The first keyboard grouping is none, which disables all grouping and provides no functional change. The second is keymap, which groups the keyboard devices in the seat by their keymap. With this grouping, the effective layout and repeat info is also synced across keyboard devices in the seat. Device specific bindings will still be executed as normal, but everything else related to key and modifier events will be handled by the keyboard group's keyboard.
* input_cmd_xkb_file: allow shell path expansionLibravatar Brian Ashworth2019-11-21
| | | | | This allows for shell path expansion for input_cmd_xkb_file. The logic has been extracted from output_cmd_background
* input/keyboard: cleanup xkb_file error handingLibravatar Brian Ashworth2019-11-21
| | | | | This fixes an inverted fclose return value check and simplifies the error handling and logging for xkb_file in sway_keyboard_compile_keymap
* Add note about backends to output max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* output: check wlr_output in repaint handlerLibravatar Ivan Molodetskikh2019-11-17
| | | | | | It's possible for the output to be disconnected in just the right moment for wlr_output to be NULL in the repaint handler, causing a crash. This check fixes that crash.
* Add max_render_time to view JSONLibravatar Ivan Molodetskikh2019-11-17
|
* Add max_render_time to output JSONLibravatar Ivan Molodetskikh2019-11-17
|
* view: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Add sway_surfaceLibravatar Ivan Molodetskikh2019-11-17
| | | | For extending wlr_surface with additional things.
* output: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Add -Wno-missing-bracesLibravatar Simon Ser2019-11-17
| | | | | | | -Wmissing-braces makes it annoying to zero-initialize structs with = {0} when the first field is a struct. See for instance [1]. [1]: https://builds.sr.ht/~sircmpwn/job/110425
* grimshot: fix branching on command exit statusLibravatar Manuel Mendez2019-11-17
| | | | | | | | | | | | | | | | | | The previous behavior was incorrect because `if` was checking the return status of the `[` command which was never going to be an error. `[` seems to only return an error if no args are provided. This was basically a useless use of `[` anyway since it was just meant as a straight interpretation of command exit, something that `if` can do itself. Compare: ```sh [ ]; echo ?=$? [ /bin/false ]; echo ?=$? if [ /bin/false ]; then echo this is the unintended bug; fi if /bin/false; then echo this will not be printed; fi ```
* Use an enum instead of a marker string for map_to_Libravatar Tadeo Kondrak2019-11-17
|
* Implement input map_to_region commandLibravatar Tadeo Kondrak2019-11-17
|
* xwayland: get_constraints using size hintsLibravatar Rouven Czerwinski2019-11-16
| | | | | | Previously, Xwayland windows did not have size_constraints implemented, resulting in the window being resizable. This implements the constraints through the X11 size hints supplied by the window itself.
* seatop_default: handle focus for unmanaged xwayland windows lastLibravatar Ronan Pigott2019-11-08
| | | | Fixes #4707
* Use wlr_output_preferred_mode instead of the last modeLibravatar Simon Ser2019-11-05
| | | | | Instead of relying on the order of modes, use wlr_output_preferred_mode to get the preferred mode.
* Fix segfault in set_modeLibravatar Simon Ser2019-11-05
| | | | | | | best is NULL prior to being assigned to a mode. Closes: https://github.com/swaywm/sway/issues/4705 Fixes: f33dcd4c604f ("Prefer higher refresh rate default modes")
* Prefer higher refresh rate default modesLibravatar Ronan Pigott2019-11-05
|
* smart_borders: separate smartness from edge typesLibravatar Ronan Pigott2019-11-04
|
* Add --custom to `output mode` commandLibravatar Simon Ser2019-11-04
| | | | This forces to set the mode as a custom mode.
* seatop_default: handle focus for xwayland_unmanaged viewsLibravatar Ronan Pigott2019-11-04
|