aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* workspace_split: focus middle if workspace focusedLibravatar Brian Ashworth2019-08-20
| | | | | In workspace_split, the middle container that wraps the workspace's children should be focused for any seat that is focusing the workspace
* container_replace: copy {width,height}_fractionLibravatar Brian Ashworth2019-08-20
| | | | | | | | This copies the width and height fractions from the container to the container replacing it. Without setting these values, the container is treated as a new container and throws off the existing sizing. Since one container is replacing the other, it makes sense for the sizing to remain the same.
* workspace: do not destroy if any seat is focusingLibravatar Brian Ashworth2019-08-20
| | | | | | | Since each seat has its own focus, do not destroy a workspace until it is no longer focused by any seat. This prevents seats from being forced to evacuate the workspace just because another seat switched focus away from it
* handle_seat_node_destroy: do not focus own nodeLibravatar Brian Ashworth2019-08-20
| | | | | | | | | | In handle_seat_node_destroy, it was possible to focus the node attached to the seat node that is being destroyed when an empty workspace was being destroyed in a multiple seat environment. This resulted in infinite recursion when attempting to destroy the workspace. This just moves the seat node destruction higher so it cannot be the focus inactive for the seat. This is the same ordering that is applied to destruction of seat nodes for containers
* Remove redundant checksLibravatar Antonin Décimo2019-08-20
|
* Fix memory leaksLibravatar Antonin Décimo2019-08-20
|
* view_update_size: fix surface_width/height mismatchLibravatar Antonin Décimo2019-08-20
|
* input: check pointer against nullptrLibravatar Antonin Décimo2019-08-20
|
* layer_shell: Guard against negative exclusive zoneLibravatar Sebastian Krzyszkowiak2019-08-20
| | | | This can happen with surfaces that set negative margins.
* Revert "Add support for wlr_output's atomic API"Libravatar Rouven Czerwinski2019-08-07
| | | | | | This reverts commit 6e0565e9de4247bbf0ca662565c58e0a54258d6e. This is required for the revert on swaywm/wlroots#1781
* sway.5: explain how to enable pango markup in fontLibravatar Brian Ashworth2019-08-07
| | | | | This clarifies the syntax to use for the font command to enable pango markup support.
* config/output: rebase cursors after config appliedLibravatar Brian Ashworth2019-08-07
| | | | | | | When applying an output config, an output may transform or be altered in some way that effects the cursor. In order for the cursor images to be updated properly, all cursors need to be rebased after applying output configs.
* cmd_mode: make modes case sensitiveLibravatar Brian Ashworth2019-08-06
| | | | | This mirrors a change in i3 4.17 that makes binding modes case sensitive
* input/cursor: do not hide when buttons are pressedLibravatar Brian Ashworth2019-08-06
| | | | | | This just adds a small quality of life improvement to the cursor hiding functionality. The cursor will no longer be hidden unless all buttons are released.
* cmd_swap: add floating supportLibravatar Brian Ashworth2019-08-06
| | | | | For feature parity with i3 4.17, this just adds floating container support to the swap command
* cmd_opacity: add relative opacity changesLibravatar Jeff Peeler2019-08-05
| | | | | | | | | | | | | | | | | | | This enhances the opacity command to support relative assignment as well as the currently implemented absolute assignment. The syntax is copied from the same format that gaps uses for relative and absolute setting. An example usage in a sway config looks like: // relative change (this feature) bindsym button4 opacity plus .1 bindsym button5 opacity minus .1 // absolute change (this feature) bindsym button4 opacity set 1 bindsym button5 opacity set .3 // old way, still supported bindsym button4 opacity 1 bindsym button5 opacity .3
* input/libinput: typo fixes (get -> get_default)Libravatar Brian Ashworth2019-08-03
| | | | | This just fixes some typos in the reset functions that were using the get calls instead of get_default
* Allocator sizeof operand mismatchLibravatar Antonin Décimo2019-08-02
| | | | | Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **'
* Add support for wlr_output's atomic APILibravatar Simon Ser2019-08-02
| | | | See https://github.com/swaywm/wlroots/pull/1762
* bindsym/code: add group supportLibravatar Brian Ashworth2019-08-01
| | | | | | | | | | | This adds support for specifying a binding for a specific group. Any binding without a group listed will be available in all groups. The priority for matching bindings is as follows: input device, group, and locked state. For full compatibility with i3, this also adds Mode_switch as an alias for Group2. Since i3 only supports this for backwards compatibility with older versions of i3, it is implemented here, but not documented.
* input/keyboard: don't reset layout for same keymapLibravatar Brian Ashworth2019-08-01
| | | | | | | In sway_keyboard_config, do not change the keymap when the new keymap is unchanged, unless this is during a config reload. The reasoning for this is to prevent the effective layout from being reset to index 0 for input config changes unrelated to the keymap.
* Fix typo in sway(5) manpageLibravatar Paul Ouellette2019-07-31
|
* libinput: fix set_send_eventsLibravatar Brian Ashworth2019-07-31
| | | | | | | This just fixes the check in set_send_events for whether the mode has changed. LIBINPUT_CONFIG_SEND_EVENTS_ENABLED is 0 so the bitmask check cannot be fixed, but Sway doesn't allow multiple modes to be set anyway (not really sure why you would need to) so a basic equality check works
* input/libinput: fix typo in set_middle_emulationLibravatar Brian Ashworth2019-07-28
| | | | | This fixes a typo in set_middle_emulation where it would set left handed instead of middle emulation.
* Fix resize sibling amount calculationsLibravatar Pedro Côrte-Real2019-07-27
| | | | | | | | | | | | Sibling amounts were being calculated after the original fraction had been altered. This led to broken resize amounts. Fix that by calculating things upfront before adjusting values which also makes the code cleaner. For sanity checks also calculate the sibling amount with the ceiling so we never go below the sanity check even by one pixel. Fixes #4386
* Remove all wayland-server.h includesLibravatar Simon Ser2019-07-27
| | | | | | | | | | | | | | | The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration. This commit si similar to wlroots' ca45f4490ccc ("Remove all wayland-server.h includes").
* Avoid adding duplicate criteria for no_focus and commandLibravatar Ashkan Kiani2019-07-27
|
* arrange: remove gaps for workspace location deltasLibravatar Brian Ashworth2019-07-26
| | | | | | | | | When arranging the workspace, prev_x and prev_y should be ignoring the current gaps otherwise the workspace diff_x and diff_y location deltas will be off. When the deltas are off, each arrangement of the workspace would incorrectly move floaters an extra -workspace->current_gaps.left along the x-axis and an extra -workspace->current_gaps.top along the y-axis.
* ipc: add input::libinput_config eventLibravatar Brian Ashworth2019-07-23
| | | | | | | | | This adds a libinput_config change type to the input event for when the libinput config for a device changes In order for this to be possible to track, the libinput config code had to be refactored. It is now extracted into a separate file to isolate it from the rest of the input management code.
* ipc: add an input eventLibravatar Brian Ashworth2019-07-23
| | | | | | | | | This adds an ipc event related to input devices. Currently the following changes are supported: - added: when an input device becomes available - removed: when an input device is no longer available - xkb_keymap_changed: (keyboards only) the keymap changed - xkb_layout_changed: (keyboards only) the effective layout changed
* input_cmd_xkb_switch_layout: support input typesLibravatar Brian Ashworth2019-07-18
| | | | | This just adds input type config support to input_cmd_xkb_switch_layout so that `input type:keyboard xkb_switch_layout <idx>` will work
* cmd_output: support current output aliasLibravatar Brian Ashworth2019-07-17
| | | | | | | | Similar to seat command, this provides an alias for the current output. Instead of the output name or identifier, `-` can be used to operate on the focused output by name and `--` can be used to operate on the focused output by its identifier. This will prevent operating on the no-op output when using either alias.
* input_cmd_xkb_*: cleanup includesLibravatar Ed Younis2019-07-17
|
* Implement input_cmd_xkb_file (#3999)Libravatar Ed Younis2019-07-17
| | | | | | | Adds a new commend "xkb_file", which constructs the internal xkb_keymap from a xkb file rather than an RMLVO configuration. This allows greater flexibility when specifying xkb configurations. An xkb file can be dumped with the xkbcomp program.
* Add missing description for focus_on_window_activation command in docs.Libravatar rpigott2019-07-17
|
* Update output manager on layout changeLibravatar Josef Gajdusek2019-07-17
| | | | | The output manager config was not properly updated if the position of the output got changed.
* Make fullscreen check for fullscreen parentsLibravatar Sauyon Lee2019-07-17
| | | | | This ensures that a child of a fullscreen container cannot be fullscreened.
* Sanity check gaps on the outside of the workspaceLibravatar Pedro Côrte-Real2019-07-15
| | | | | | | Avoid gaps that are too large around the workspace that you end up without any usable space for children. Fixes #4308
* Avoid negative outer gapsLibravatar Pedro Côrte-Real2019-07-15
| | | | | | Make sure we never let the gaps around the workspace go negative. Fixes #4304
* Sanity check gaps between tiled containersLibravatar Pedro Côrte-Real2019-07-15
| | | | | | | When the gaps become too large for the space available gracefully reduced them all the way to 0 if needed. Fixes #4294
* Rework gaps code to be simpler and correctLibravatar Pedro Côrte-Real2019-07-15
| | | | | | | | | | | | | Instead of tracking gaps per child apply gaps in two logical places: 1. In tiled containers use the layout code to add the gaps between windows. This is much simpler and guarantees that the sizing of children is correct. 2. In the workspace itself apply all the gaps around the edge. Here we're in the correct position to size inner and outer gaps correctly and decide on smart gaps in a single location. Fixes #4296
* Layout tiled using a width/height fractionLibravatar Pedro Côrte-Real2019-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using container->width/height as both the input and output of the layout calculation have container->width_fraction/height_fraction as the share of the parent this container occupies and calculate the layout based on that. That way the container arrangement can always be recalculated even if width/height have been altered by things like fullscreen. To do this several parts are reworked: - The vertical and horizontal arrangement code is ajusted to work with fractions instead of directly with width/height - The resize code is then changed to manipulate the fractions when working on tiled containers. - Finally the places that manipulated width/height are adjusted to match. The adjusted parts are container split, swap, and the input seat code. It's possible that some parts of the code are now adjusting width and height only for those to be immediately recalculated. That's harmless and since non-tiled containers are still sized with width/height directly it may avoid breaking other corner cases. Fixes #3547 Fixes #4297
* Layout correctly with several new windowsLibravatar Pedro Côrte-Real2019-07-14
| | | | | | | | | | | | | If there is more than one new window layout correctly by calculating the default size of the new windows using the information of how many of them there are in total. This helps with issue #3547 but doesn't fix it in all situations. Things now work correctly if the first layout of new windows happens after leaving fullscreen. But if for some reason an arrange_container() gets called while we are fullscreen the windows will still be incorrectly sized after saved_width/saved_height get used to restore the first window's size before going fullscreen.
* cmd_split: fix toggle split for non-split layoutsLibravatar Brian Ashworth2019-07-11
| | | | | | | | | | Previously, `layout toggle` and `layout toggle split` would set L_VERT when layout was L_HORIZ, otherwise it would set L_HORIZ. This meant that when the layout was L_TABBED or L_STACKED, it would always be L_HORIZ. This extends #4315 (which corrects the handling when multiple layouts are given) to try prev_split_layout, config->default_orientation, and then falling back to L_VERT when the output is taller than wide and L_HORIZ when wider than tall.
* cmd_layout: toggle split for tabbed/stack defaultLibravatar Brian Ashworth2019-07-10
| | | | | | | | | | | This fixes the logic of split for layout toggle when the default layout is L_TABBED or L_STACKED. When the default layout is L_TABBED or L_STACKED, the container/workspace may not have a prev_split_layout. This was causing L_NONE to be returned by get_layout_toggle, which was being handled as a syntax error. This adds logic to try config->default_orientation when prev_split_layout is L_NONE. If that is also L_NONE, then L_VERT is used when the output is taller than wide, otherwise, L_HORIZ is used.
* config/output: correctly set width/height in applyLibravatar Brian Ashworth2019-07-10
| | | | | | | | | | | | In apply_output_config, this sets output->{width,height} using the values in the output box. Previously, they were being set using wlr_output_transformed_resolution, which takes the width and height from the wlr_output and just checks whether they should be swapped based on the transform. This did not take into account the output's scale. wlr_output_effective_resolution could be used instead, which handles both transform and scale. However, the values in the output box have already been processed by wlr_output_effective_resolution so they can just be used directly
* input/libinput: only reset supported optionsLibravatar Brian Ashworth2019-07-09
| | | | | | | | This adds checks to the input_manager_libinput_reset_* functions to only attempt resetting supported options on reload. This should have no functional difference to the user, but will remove several `Failed to apply libinput config: Unsupported configuration option` lines from the log that can be noisy and potential red herrings.
* cmd_bindswitch: add option to execute on reloadLibravatar Brian Ashworth2019-07-09
| | | | | | | This adds a --reload flag to cmd_bindswitch that allows for the binding to be executed on reload. One possible use case for this is to allow users to disable outputs when the lid closes and enable them when the lid opens without having to open and re-close the lid after a reload.
* Make mouse drag in tiled mode swap containers if no edge is selectedLibravatar Sebastian Parborg2019-07-09
| | | | | Now the highlighted center area of containers triggers a swap action instead of moving around the containers.
* calibration_matrix: expect 6 individual valuesLibravatar Sergei Dolgov2019-07-05
| | | | | | Example usage from command line: swaymsg input type:touch calibration_matrix -- -1 0 1 0 -1 1