aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* Remove readline.cLibravatar Ian Fan2019-01-01
| | | | | All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
* stringop.c: rewrite strip_whitespaceLibravatar Ian Fan2019-01-01
|
* swaybar: do not create tray if hiddenLibravatar Ian Fan2018-12-31
|
* swaybar: implement tray configLibravatar Ian Fan2018-12-31
|
* Apply implicit fallback seat configLibravatar Brian Ashworth2018-12-31
| | | | | | The implicit fallback seat config needs to be applied (if created). Otherwise, the input devices will still be removed from the implicit default seat on reload when there is any seat config.
* Set font options when computing text width.Libravatar John Chen2018-12-31
| | | | Fix #2869
* Undocument SWAY_CURSOR_THEME and SWAY_CURSOR_SIZELibravatar emersion2018-12-31
| | | | | | | | These are not yet implemented, and will be exposed as a configuration command rather than env variables when implemented. This also adds a reference to sway-input(5) in xkb env configuration. Maybe we should just un-document these instead.
* hide_cursor: change to a seat subcommandLibravatar Brian Ashworth2018-12-30
| | | | | This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
* Verify seat fallback settings on reloadLibravatar Brian Ashworth2018-12-30
| | | | | | | | | | | | | This fixes an issue where on reload, all input devices that were added via an implicit fallback to the default seat would be removed from the default seat and applications would crash due to the seat having no capabilities. On reload, there is a query for a seat config with the fallback setting set (it can either be true or false). If no such seat config exists, the default seat is created (if needed) and has the implicit fallback true applied to its seat config. This is the same procedure that occurs when a new input is detected.
* Revamp seat configsLibravatar Brian Ashworth2018-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes seat configs work like output and input configs do. This also adds support for wildcard seat configs. A seat config is still created in the main seat command handler, but instead of creating a new one in the subcommands and destroying the main seat command's instance, the seat subcommands modify the main one. The seat config is then stored, where it is merged appropriately. The seat config returned from `store_seat_config` is then applied. When attempting to apply a wildcard seat config, a seat specific config is queried for and if found, that is used. Otherwise, the wildcard config is applied directly. Additionally, instead of adding input devices to the default seat directly when there is no seat configs, a seat config for the default seat is created with only fallback set to true, which is more explicit. It also fixes an issue where running a seat command at runtime (with no seat config in the sway config), would result in all input devices being removed from the default seat and leaving sway in an unusable state. Also, instead of checking for any seat config, the search is for a seat config with a fallback option seat. This makes it so if there are only seat configs with fallback set to -1, the default seat is still created since there is no explicit notion on what to do regarding fallbacks. However, if there is even a single fallback 0, then the default seat is not used as a fallback. This will be needed for seat subcommands like hide_cursor where the user may only want to set that property without effecting anything else.
* sway-output(5): doc scaling consideration for posLibravatar Brian Ashworth2018-12-29
| | | | | This copies the information regarding positioning outputs when there is scaling involved from the wiki to sway-output(5).
* Add failure reply on IPC_SYNCLibravatar Brian Ashworth2018-12-29
| | | | | Since it was decided that sway will not support IPC_SYNC, just return `{'success': false}` as a reply
* Remove button from state on release during opLibravatar Brian Ashworth2018-12-29
| | | | | | | This fixes a bug in `dispatch_cursor_button` where if there was an operation occurring, the button would not be removed from the state on release. This resulted in the button appearing to be permanently pressed and caused mouse bindings to not match correctly.
* Merge pull request #3346 from ermo/sway-bar_focused_statusline_colour-render-fixLibravatar Drew DeVault2018-12-29
|\ | | | | swaybar: fix focused_statusline color parsing.
| * swaybar: fix focused_statusline color parsing.Libravatar Rune Morling2018-12-29
| |
* | Fix crash when scratchpad contains split containersLibravatar Ryan Dwyer2018-12-29
|/ | | | | | | | | | | | | | | | | | | | | To reproduce: * Launch two terminals in a workspace * `focus parent` to select both terminals * `move scratchpad` * `scratchpad show` to show the terminals * `scratchpad show` to hide the terminals * `scratchpad show` - crash When hiding the terminals, it should be moving focus to whatever is in the workspace, but this wasn't happening because the focus check didn't consider split containers. So the terminals were hidden in the scratchpad while still having focus. This confused the next invocation of scratchpad show, causing it to attempt to hide them instead of show them, and the hide-related code caused a crash when it tried to arrange the workspace which was NULL. This patch corrects the focus check.
* added fullscreen_mode to get_tree outputLibravatar NokiDev2018-12-25
| | | | Signed-off-by: NokiDev <noki.dev@gmail.com>
* Split image_surface handling into own functionLibravatar Brian Ashworth2018-12-25
|
* Implement hide_cursor <timeout> commandLibravatar Brian Ashworth2018-12-25
| | | | | Allows the cursor to be hidden after a specified timeout in milliseconds
* Change mouse buttons to x11 map and libevdev namesLibravatar Brian Ashworth2018-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies the way mouse bindings are parsed. Instead of adding to BTN_LEFT, which results in button numbers that may not be expected, buttons will be parsed in one of the following ways: 1. `button[1-9]` will now map to their x11 equivalents. This is already the case for bar bindings. This adds support for binding to axis events, which was not possible in the previous approach. 2. Anything that starts with `BTN_` will be parsed as an event code name using `libevdev_event_code_from_name`. This allows for any button to be mapped to instead of limiting usage to the ones near BTN_LEFT. This also adds a dependency on libevdev, but since libevdev is already a dependency of libinput, this should be fine. If needed, this option can have dependency guards added. Binding changes: - button1: BTN_LEFT -> BTN_LEFT - button2: BTN_RIGHT -> BTN_MIDDLE - button3: BTN_MIDDLE -> BTN_RIGHT - button4: BTN_SIDE -> SWAY_SCROLL_UP - button5: BTN_EXTRA -> SWAY_SCROLL_DOWN - button6: BTN_FORWARD -> SWAY_SCROLL_LEFT - button7: BTN_BACK -> SWAY_SCROLL_RIGHT - button8: BTN_TASK -> BTN_SIDE - button9: BTN_JOYSTICK -> BTN_EXTRA Since the axis events need to be mapped to an event code, this uses the following mappings to avoid any conflicts: - SWAY_SCROLL_UP: KEY_MAX + 1 - SWAY_SCROLL_DOWN: KEY_MAX + 2 - SWAY_SCROLL_LEFT: KEY_MAX + 3 - SWAY_SCROLL_RIGHT: KEY_MAX + 4
* sway(5): document tiling_dragLibravatar Brian Ashworth2018-12-24
| | | | Adds documentation in sway(5) for the tiling_drag command
* Fix wlr_box_intersection args for wlroots 1441Libravatar Brian Ashworth2018-12-22
| | | | | The fix pushed to master missed wlr_box_intersection. This just fixes those lines so sway renders properly again
* Fixes per wlroots#1441Libravatar Drew DeVault2018-12-22
|
* IPC_SUBSCRIBE ensure request object is an arrayLibravatar Aidan Harris2018-12-22
| | | | Fixes #3320
* Combine output_by_name and output_by_identifierLibravatar Brian Ashworth2018-12-20
| | | | | | | | This combines `output_by_name` and `output_by_identifier` into a single function called `output_by_name_or_id`. This allows for output identifiers to be used in all commands, simplifies the logic of the callers, and is more efficient since worst case is a single pass through the output list.
* Terminate swaybg in output_disableLibravatar Brian Ashworth2018-12-19
| | | | | | | | Moves the call to `terminate_swaybg` from inside `apply_output_config` to `output_disable`. The former was only called when an output was being disabled. The latter is called when an output is being disabled and when an output becomes disconnected. Without this, disconnecting an enabled output would result in a defunct swaybg process.
* Return success when renaming a workspace to itselfLibravatar Ryan Dwyer2018-12-18
|
* Focus node before tiling drag if on titlebarLibravatar Brian Ashworth2018-12-17
| | | | | Before attempting to drag a tiling container by its titlebar, focus it. This fixes clicking on titlebars to focus a container.
* cmd_split: add null checks in do_splitLibravatar Brian Ashworth2018-12-17
| | | | Fixes a crash when running `split` commands with the workspace focused.
* Allow output ids and wildcard for workspace outputLibravatar Brian Ashworth2018-12-17
| | | | | | | | | This allows for output identifiers and to be used in the `workspace <workspace> output <outputs...>` command. Previously, only output names would be allowed. If an output identifier was given, it would never match an output. This also allows for the wildcard character (`*`) to be specified, which can be used to generate a list of workspace names that should be used when generating new workspaces
* Allow tiling views to be dragged by the titlebarLibravatar Brian Ashworth2018-12-17
| | | | | | Enables titling views to be dragged by the titlebar. This is in addition to using the modifier and dragging them from anywhere on the container surface. Floating views already allow this behavior.
* Update for swaywm/wlroots#1377Libravatar Rostislav Pehlivanov2018-12-16
| | | | -Werror is eͫ̐ͭ҉vi͆ͦ̏ͦlͥ̀͒̊͂͛
* Fix focusing on non-visible workspaceLibravatar Brian Ashworth2018-12-14
| | | | | | My previous attempt was not quite right. Changing the focus stack on a non-visible workspace should only be blocked if the focus would be set to the workspace itself
* Rework default output configsLibravatar Brian Ashworth2018-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | Default output configs were generated on reload to reset an output to its default settings. The idea was that anything that was removed from the config or changed at runtime and not in the config should be reset on reload. Originally, they were created using the output name. Recently, they were changed to use the output identifier. It turns out that there are issues of shadowing with that solution as well. This should fix those issues. Instead of generating the default output configs on reload and storing them in the output config list to merge on top of, they are now only generated when retrieving the output config for an output during a reload. This means that the default output configs are never stored anywhere and just used as a base to merge unaltered user configs on top of during a reload. Starting with a blank output config, merges get applied in the following order: 1. Default output config (only during a reload) 2. Wildcard config (only if neither output name or output identifier exist) 3. Output name config 4. Output identifier config
* Fix criteria execution in view_mapLibravatar mwenzkowski2018-12-12
| | | | | | | | | This patch moves view_execute_criteria(view) below the fullscreen code. Previously, if a view requested to be started in fullscreen, this was done after execution of criteria and hence it was impossible to disable fullscreen via criteria. Fixes #3285
* Keep focus when destroying containers on nonvis wsLibravatar Brian Ashworth2018-12-12
| | | | | | | | | | | | | | | | Changing the focus stack when destroying a container's node on a non-visible workspace (on an non-focused output) incorrectly causes the non-visible workspace to become visible. If the workspace is empty, it will not be destroyed since it is now visible. Additionally since there was no workspace::focus event, swaybar still shows the previous workspace as focus-inactive. It also makes no sense to change visible workspaces due to a container on a non-visible workspace being destroyed. Since the focus will either be set when switching to the non-visible workspace or the workspace will be destroyed due to being empty, there is no need to change the focus stack when destroying a container on a non-visible workspace.
* Call wlr_output_enable for disabled new outputsLibravatar Brian Ashworth2018-12-10
| | | | | | When a new output is detected and it is disabled by the output config, call `wlr_output_enable(output->wlr_output, false)` to DPMS off the output.
* list.c: rename free_flat_list to list_free_items_and_destroyLibravatar Ian Fan2018-12-09
|
* Cleanup list codeLibravatar Ian Fan2018-12-09
|
* list.c: Remove list_foreachLibravatar Ian Fan2018-12-09
| | | | | Most occurrences have been replaced by `free_flat_list` which has been moved from stringop.c to list.c. The rest have been replaced by for loops.
* cmd_split: flatten when possibleLibravatar Brian Ashworth2018-12-05
|
* Fix command list executionLibravatar mwenzkowski2018-12-05
| | | | | | | | | Determine the container/workspace a command is run on, each time when a command of the command list will be run. Previously the container/workspace was determined only once at the beginning of command list execution, which led to wrong behaviour because commands wouldn't take into account when a previous command changed the focused container.
* config: do not set $XDG_CONFIG_HOME if unset or emptyLibravatar Ian Fan2018-12-03
| | | | Instead redefine the config paths to use the default $HOME/.config
* config: set $XDG_CONFIG_HOME if emptyLibravatar Ian Fan2018-12-03
| | | | | Before, it was only set if it was not set, but it should also be done when empty.
* Fix identifier output configs on reloadLibravatar Brian Ashworth2018-12-03
| | | | | | | | | | | | | | | | | | | | | | When generating default output configs to reset the outputs to their default settings on reload, the output name was being used. Additionally when determining the output config to apply, if there was an output config with the output name, that was being used without checking for an identifier config. This caused sway to completely ignore the users specified output config. To fix this issue, the following changes have been made: 1. Default output configs as created for the identifier now instead of name. This actually makes more sense anyway since you could hotplug multiple different outputs to the same port. 2. In get_output_config, which is only used to determine which output config to apply, output configs for both the name and identifier are queried. If both are found, a new output config is generated with the identifier config merged on top of the name config. If just one is found, a copy of that config is returned. This change also requires that the result from get_output_config be freed after use to prevent memory leaks, which required some minor changes to logic in apply_output_config_to_outputs.
* cmd_focus: show scratchpad if hiddenLibravatar Brian Ashworth2018-12-03
| | | | | | | If a scratchpad container is hidden, it is still focusable using criteria and should be shown. This fixes a segfault when attempting to rebase the cursor since previously the scratchpad container would not be on any output.
* Add option to bindsym/bindcode to suppress warning on overrideLibravatar Alex Maese2018-12-02
|
* fix typoLibravatar bschacht2018-12-02
| | | tranform -> transform
* Merge pull request #3227 from emersion/swap-buffers-damage-coordsLibravatar Drew DeVault2018-12-02
|\ | | | | Update for swaywm/wlroots#1403
| * Update for swaywm/wlroots#1403Libravatar emersion2018-12-01
| |