summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* Add documentation for rename workspaceLibravatar Ashkan Kiani2019-04-16
|
* Send disabled output available modes on IPC get_outputsLibravatar Ranieri Althoff2019-04-16
| | | | | | - Also fix missing trailing newline on pretty print Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
* Add deprecation warnings for new_float, new_window, and force_focus_wrapping.Libravatar Connor E2019-04-14
|
* Implement input type configs (#3784)Libravatar Benjamin Cheng2019-04-14
| | | | | | | | | | | Add support for configurations that apply to a type of inputs (i.e. natural scrolling on all touchpads). A type config is differentiated by a `type:` prefix followed by the type it corresponds to. When new devices appear, the device config is merged on top of its type config (if it exists). New type configs are applied on top of existing configs.
* Add heuristics to differentiate touchpadsLibravatar Benjamin Cheng2019-04-14
| | | | | | | Use libinput_device_config_tap_get_finger_count to determine whether a pointer is a touchpad. swaymsg is also updated to reflect the new touchpad type.
* Spawn swaynag as a wayland clientLibravatar Brian Ashworth2019-04-14
| | | | | This spawns swaynag as a wayland client similar to how swaybar and swaybg are already done
* swaynag: fix pointer managementLibravatar Brian Ashworth2019-04-14
| | | | | | | | | | | Currently on master, swaynag will retrieve a pointer instance whenever the capabilities change and WL_SEAT_CAPBILITY_POINTER is set. The pointer instances were never being destroyed so swaynag received events multiple times due to having several instances of the pointer. This fixes it so if there is already a pointer instance, swaynag does not attempt to retrieve another. Additionally, if the pointer capability is removed, the pointer instance is destroyed.
* Fix scratchpad fullscreen behavior and crashLibravatar Brian Ashworth2019-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | When setting fullscreen on a hidden scratchpad container, there was a check to see if there was an existing fullscreen container on the workspace so it could be fullscreen disabled first. Since the workspace is NULL, it would cause a SIGSEGV. This adds a NULL check to avoid the crash. This also changes the behavior of how fullscreen is handled when adding a container to the scratchpad or changing visibility of a scratchpad container to match i3's. The behavior is as follows: - When adding a container to the scratchpad or hiding a container back into the scratchpad, there is an implicit fullscreen disable - When setting fullscreen on a container that is hidden in the scratchpad, it will be fullscreen when shown (and fullscreen disabled when hidden as stated above) - When setting fullscreen global on a container that is hidden in the scratchpad, it will be shown immediately as fullscreen global. The container is not moved to a workspace and remains in the scratchpad. The container will be visible until fullscreen disabled or killed. Since the container is in the scratchpad, running `scratchpad show` or `move container to scratchpad` will have no effect This also changes `container_replace` to transfer fullscreen and scratchpad status.
* Fix potential null accessesLibravatar Ashkan Kiani2019-04-13
|
* swaybg: add manpageLibravatar Simon Ser2019-04-13
|
* Fix scratchpad logic for floating windowsLibravatar Ashkan Kiani2019-04-12
| | | | | | | When a tiled window is sent to the scratchpad, we want to use sane defaults, which is to center it and resize it to the default. For floating windows, we want to use their existing geometry.
* sway-input.5: add xkeyboard-config(7) to "see also"Libravatar Martin Michlmayr2019-04-12
| | | | | Since xkeyboard-config(7) is mentioned in the man page, add a reference to the "see also" section.
* cmd_focus: raise floating for `<criteria> focus`Libravatar Brian Ashworth2019-04-11
| | | | | Floaters are currently raised for `focus <direction>`. This extends the same functionality to `<criteria> focus`.
* Honor output for xdg_toplevel_set_fullscreenLibravatar Brian Ashworth2019-04-11
| | | | | | | | | | | | | | This honors the fullscreen output request for `xdg_toplevel_set_fullscreen` and `zxdg_toplevel_v6_set_fullscreen`. If the request was sent before mapping, the fullscreen output request will be retrieved from the client_pending state for the toplevel. The output will be passed to `view_map` and if there is a workspace on the output, the view will be placed on that workspace. If the request comes in after being mapped, the view will be moved to the workspace on the output (if there is one) before becoming fullscreen.
* config/output: unbreak on 32-bit architecturesLibravatar Jan Beich2019-04-08
| | | | | | | | | | sway/config/output.c:624:54: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] sway_log(SWAY_DEBUG, "spawn_swaybg cmd[%ld] = %s", k, cmd[k]); ~~~ ^ %zu include/log.h:40:74: note: expanded from macro 'sway_log' _sway_log(verb, "[%s:%d] " fmt, _sway_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^~~~~~~~~~~
* Add margin to short_text handling.Libravatar Dmitri Kourennyi2019-04-04
| | | | | Add a 3xscale margin matching other spacing in swaybar as part of short text width calculations
* Ensure predicted position for short text handling doesn't overflow.Libravatar Dmitri Kourennyi2019-04-04
| | | | | | - Predicted status line can be negative, so corresponding variables should not be unsigned. Changed to double as position is actually calculated as double.
* Implement handling of short_text field of i3 input protocol.Libravatar Dmitri Kourennyi2019-04-04
| | | | | Matches i3bar behavior of setting all blocks to use the short_text if the full text width does not fit.
* swaybg: one instance for all outputsLibravatar Brian Ashworth2019-04-04
| | | | | | | | | This makes it so there will only be one swaybg instance running instead of one per output. swaybg's cli has been changed to a xrandr like interface, where you select an output and then change properties for that output and then select another output and repeat. This also makes it so swaybg is only killed and respawned when a background changes or when reloading.
* idle_inhibit: fix crash during view destructionLibravatar Brian Ashworth2019-04-03
| | | | | | | | | | | This fixes a crash for application set idle inhibitors when their associated view is being destroyed. There is a call to `view_is_visible` to determine is the view is visible and it assumes that the view has an container, but it is possible for the container to already have been destroyed at this point. There is a NULL check for the view in `check_active` and this re-adds the NULL check for the container that I accidentally dropped when refactoring during the inhibit_idle command PR
* root_scratchpad_hide: fix crash when layer focusedLibravatar Brian Ashworth2019-04-03
| | | | | | | | | | | This fixes a crash in `root_scratchpad_hide` when a layer surface is focused. Since `seat_get_focus` is NULL when a layer surface is focused, the call to `node_has_ancestor` was causing a SIGSEGV since it was attempting to access the parent of NULL. This changes the call to `seat_get_focus_inactive`, which will return a node even when a layer surface is focused and is also guaranteed to have something in the focus stack if a scratchpad container is being hidden (otherwise there would not be any containers yet).
* fix broken link to README.zh-CN.mdLibravatar Dacheng Gao2019-04-02
|
* fix typoLibravatar Dacheng Gao2019-04-02
|
* Update formatting of zh-cn link in README.mdLibravatar Drew DeVault2019-04-01
|
* add link to README-zh-CNLibravatar Dacheng Gao2019-04-01
|
* fix csLibravatar Dacheng Gao2019-04-01
|
* fix csLibravatar Dacheng Gao2019-04-01
|
* add chinese translationLibravatar Dacheng Gao2019-04-01
|
* scratchpad: set initial sizeLibravatar Brian Ashworth2019-03-31
| | | | | | This matches i3's behavior of setting scratchpad containers to 50% of the workspace's width and 75% of the workspace's height, bound by the minimum and maximum floating width/height.
* floating: fix size of non-view containersLibravatar Brian Ashworth2019-03-31
| | | | | | | | | | | | This fixes the sizing of floating non-view containers. On master, the floater will get set to the maximum width and height, which by default is the entire output layout. When setting a non-view container to floating, this will set a sane default size of 50% of the workspace width and 75% of the workspace height, or whatever the closest is that the minimum and maximum floating width/height values allow for. On all future calls to `floating_natural_resize`, the width and height will be kept unless they need to be changed to respect the min/max floating width/height values.
* Fix xwayland configure request scratchpad crashLibravatar Brian Ashworth2019-03-31
| | | | | | | | | | | | | | | | | | This fixes a crash in `container_init_floating` when a xwayland view sends a configure request while in the scratchpad. `container_init_floating` gets called so the configured minimum and maximum sizes gets respected when resizing to the requested size. Since the workspace was NULL, it would SIGSEGV when attempting to get the workspace's output for the output box retrieval. This extracts the resizing portion of `container_init_floating` into a separate function. If the container is in the scratchpad, it will just be resized and skip the centering. Additionally, `container_init_floating` has been renamed to `container_floating_resize_and_center` to more accurately describe what it does.
* Fix a crash in swaybar when an icon dir is not readableLibravatar Alex Maese2019-03-30
|
* Fix null pointer crash when doing tiling dragLibravatar Ryan Dwyer2019-03-29
| | | | | | | * Create layout S[V[view view] view] * Drag bottom view to the top * Sway would crash when the cursor hovers the V[view view] title while dragging
* bindings: fix overwrite log argument mismatchLibravatar Jan Pokorný2019-03-27
| | | | Thanks, @RedSoxFan, for the review spotting another instance.
* Fix crash for floating command on scratchpad windowLibravatar Ashkan Kiani2019-03-26
|
* Update README.uk.mdLibravatar Igor Sviatniy2019-03-26
|
* Implement inhibit_idle commandLibravatar Brian Ashworth2019-03-24
| | | | | | | | | | | | | | | | | | | | | | This implements the following command to set/unset a user idle inhibitor for a view: `inhibit_idle focus|fullscreen|open|none|visible` The modes are as follows: - focus: inhibited when the view is focused by any seat - fullscreen: inhibited when the view is fullscreen (or a descendant of a fullscreen container) and is visible on any output - open: inhibited until the view is closed or the inhibitor is unset or changed - none: unsets any user set idle inhibitors for the view - visible: inhibited when the view is visible on any output This should have no effect on idle inhibitors set by the applications themselves and those should still work as intended. Since this operates on the view in the handler context, it is possible to set it on the currently focused view, on any existing view with criteria, or for any future view with for_window.
* Fix #3924Libravatar Philipe Goulet2019-03-24
| | | | | | | | | | Removes "unescape_string(argv[i]);". Since "do_var_replacement(argv[i])" never adds escape characters, it is both wrong and unnecessary to remove escape characters on the next line. This caused characters that were meant to be escaped to not be anymore.
* Updated the french readme (#3964)Libravatar Philz692019-03-24
| | | | | | | | | | | | | | * Updated the french readme Removed the image at the start of the readme. Removed the mention of bounties. Updated the dependencies. Removed a few lines that were not present in the english readme anymore. * Fix errors. Fixed capitalisation. Changed "root" to italics.
* Add support for manually setting subpixel hinting on outputs.Libravatar Geoff Greer2019-03-24
| | | | | | Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this. Addresses https://github.com/swaywm/sway/issues/3163
* Allow for workspace renaming during exec handlingLibravatar mliszcz2019-03-23
| | | | | | | | | | | | This change adds support for renaming a workspace when `exec` command is being processed by keeping sway_workspace and pid_workspace names in sync. The change can be verified by running following command: swaymsg exec <application>; swaymsg rename workspace number 1 to 5 Fixes: #3952
* fix opening a floating view on the NOOP outputLibravatar Brian Ashworth2019-03-23
| | | | | | | | | | | | | | | | Since the NOOP output has no size, the minimum floating size is greater than the workspace size for the NOOP output. In this case, the floater gets centered in the output instead of the workspace. However, the NOOP output is not part of the output layout and thus has a NULL box. Attempting to access the properties of this box was causing a segfault. This fixes the issue by just setting the floater's box to all zeroes when mapping on the NOOP output. When the workspace gets moved from the NOOP output to a new output, any floater whose width or height is zero or has an x or y location outside of the output, gets passed to `container_init_floating` again. This will then set the appropriate size and centering. For any floater that has a valid size and location, they are preserved.
* criteria: fix __focused__ when no focus or unsetLibravatar Brian Ashworth2019-03-23
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the behavior of `__focused__` when there is no focused view to match i3's behavior of successfully matching no views instead of returning an error of a missing value. It also applies the same logic when a token is not applicable (or unset) for a view such as `app_id` for a focused xwayland view or `class` for a focused xdg-shell view. This adds an `autofail` boolean to `struct criteria`. If it is set to `true`, then `criteria_matches_view` will immediately bail out as a no match. If `autofail` is set, the criteria will also not be considered empty by `criteria_is_empty`. To set this new `autofail` property, `get_focused_prop` will now take in a boolean pointer of the same name. If `__focused__` is supported for the token and there is no focused view or the focused view does not have a value for the token, then the boolean will be set to true. In `parse_token`, the boolean value will be checked and if set to true, then `criteria->autofail` will be set to true and `parse_token` will bail successfully. Tokens will still be parsed to make sure the whole criteria is syntactically valid, which is also why `&criteria->autofail` is not passed to `get_focused_prop` and a local boolean is declared in `parse_token`.
* cmd_mode: allow cmd_set to be a subcommandLibravatar Brian Ashworth2019-03-23
| | | | This allows set to be used in mode blocks
* Support focus <direction> for floating containersLibravatar Ryan Dwyer2019-03-20
| | | | | | | | | | | | | | | | | | This kind of worked before in that focus would change, but it wasn't intentionally supported and had side effects such as not raising the container, and being unable to cycle through all floaters depending on the direction used. This commit makes it properly supported. The new focus is chosen based on the distance to the center point of each floating container in the workspace, and the container is raised. In a multi output setup, if both visible workspaces have floating containers, focus will NOT cross into the other output. It is assumed the user will use a workspace binding in this case. If two floating containers occupy the exact same center point and you try to focus in a direction, the behaviour is undefined.
* Support WLR_INPUT_DEVICE_SWITCH in swayLibravatar Ryan Walklin2019-03-19
| | | | | | | | | | | | | | | | | | | | | This commit adds support for laptop lid and tablet mode switches as provided by evdev/libinput and handled by wlroots. Adds a new bindswitch command with syntax: bindswitch <switch>:<state> <command> Where <switch> is one of: tablet for WLR_SWITCH_TYPE_TABLET_MODE lid for WLR_SWITCH_TYPE_LID <state> is one of: on for WLR_SWITCH_STATE_ON off for WLR_SWITCH_STATE_OFF toggle for WLR_SWITCH_STATE_TOGGLE (Note that WLR_SWITCH_STATE_TOGGLE doesn't map to libinput and will trigger at both on and off events)
* Clean up focus follows mouse logicLibravatar Ryan Dwyer2019-03-19
| | | | | | | | | | | | | | | | | | | | | | | Firstly, this fixes a recent regression where having `focus_follows_mouse yes` and hovering an inactive tab caused it to gain focus. The code was missing a view_is_visible check. The code is handling the logic for both focus_follows_mouse yes and focus_follows_mouse always, where the latter will apply when nudging the mouse after a workspace switch. However, the view_is_visible check didn't apply when using focus_follows_mouse always, so hovering a tab with that configuration would cause is to focus. This was a bug. When adding the view_is_visible check, it now applies to both yes and always. Note that the comment about the split container was wrong. At this point the hovered node cannot be a split container because it passed the node_is_view check. The comment has been removed. Lastly, the else condition is completely removed. This didn't appear to have any practical use. Setting focus to the result of seat_get_focus_inactive is very likely going to be a no op. There is a slim chance that this will break something, and if so I'd like to find out what so it can be properly documented in the code.
* Remove debug treeLibravatar Ryan Dwyer2019-03-18
| | | | This feature has served its purpose. It's better to use IPC now.
* Document the title_format commandLibravatar Ryan Dwyer2019-03-18
|
* config/output: handle wildcard in get_output_configLibravatar Brian Ashworth2019-03-17
| | | | | | | | | | | In #3916, I overlooked that `get_output_config` does not handle wildcards unless the config is reloading, which is a remnant of older iterations of the output config handling that went unnoticed due to `output_find_config` handling it. With the current version of the output config handling, having `get_output_config` handle wildcard configs is actually preferable. This fixes having only a wildcard output config in the config file or when connecting/enabling a new output with only a wildcard config existing.