aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* Update for swaywm/wlroots#1517Libravatar emersion2019-02-25
|
* Remove refs to unimplemented debuglog commandLibravatar Drew DeVault2019-02-18
| | | | Closes #3695
* Disconnect swaybg instead of killing itLibravatar emersion2019-02-18
| | | | | This is much more reliable. This also fixes race conditions when killing swaybg while it's doing a wl_display_roundtrip.
* Remove unused header include/sway/tree/output.hLibravatar emersion2019-02-18
|
* Fix reload freeze when not modsetting current modeLibravatar Brian Ashworth2019-02-18
| | | | | | | | | | | | | | | | | | | | | | This fixes the issue of the display freezing on reload with wlroots#1545. On master, all output configs are applied on reload. This may cause an output to have its config applied up to three times, instead of just once. The three cases are: output name, output identifier, and wildcard. Not only is this inefficient, but it can cause swaybg to be spawned and immediately killed. However, swaybg requires two roundtrips of wl_display (to obtain needed globals) before it enters its normal event loop. Modesetting will roundtrip the wl_display. Without modesetting, waitpid for killing swaybg could block infinitely due to swaybg being blocked by wl_display_roundtrip. This only configured an output once. It either uses the wildcard config or creates an empty wildcard config and applies that. This also fixes a bug where an output would not be reset when there is no output config to apply to it.
* swaybar: prevent signal handler from firing during terminationLibravatar Ian Fan2019-02-18
| | | | This prevents a heap-use-after-free crash when sway terminates.
* Rebase cursor when a layer surface mapsLibravatar emersion2019-02-18
| | | | | | | Also removes an extraneous arrange_outputs call, it's already called if necessary in arrange_layers. Updates https://github.com/swaywm/sway/issues/3080
* seat_cmd_cursor: do not create non-existing seatLibravatar Brian Ashworth2019-02-11
| | | | | | | | If a seat does not exist in seat_cmd_cursor, do not create it. A seat without any attachments is useless since it will have no capabilities. This changes `input_manager_get_seat` to have an additional argument that dictates whether or not to create the seat if it does not exist.
* pointer_constraint: change to a seat subcommandLibravatar Brian Ashworth2019-01-31
| | | | | | | | | | | | This changes the `pointer_constraint` command to be a subcommand of seat to allow for per-seat settings. The current implementation that is not a seat subcommand will only operate on the current seat and will segfault in the config due to `config->handler_context.seat` only being set at runtime. This also allows for the wildcard identifier to be used to alter the pointer constraint settings on all seats and allows for the setting to be merged with the rest of the seat config.
* Rebase #1636 against current masterLibravatar v44r2019-01-31
|
* Add pointer_constraint commandLibravatar Drew DeVault2019-01-30
|
* Add relative pointerLibravatar absrd2019-01-30
|
* Implement pointer-constraints-unstable-v1Libravatar Las2019-01-30
|
* Cleanup config reading failure error logsLibravatar Brian Ashworth2019-01-29
| | | | | | | | | | | | | | This cleans up the log when sway fails to read a config file. The following changes have been made: - A missing error message has been added to the log when the config file is a directory instead of a regular file - In main, `goto` statements have been added after the `sway_terminate` calls instead of wrapping every block in `if (!terminate_request)` - Unnecessary NULL-checks around calls to free in `main` have been removed - Deferred command execution has been extracted to a separate function and the `Running deferred commands` log message will not be shown when there are no deferred commands.
* Introduce container_is_scratchpad_hiddenLibravatar Ryan Dwyer2019-01-28
| | | | | | | | | | | | Just a convenience function that improves readability of the code. Other things worth noting: * container_get_siblings and container_sibling_index no longer use the const keyword * container_handle_fullscreen_reparent is only ever called after attaching the container to a workspace, so its con->workspace check has been changed to an assertion
* Center surface inside container when it's too smallLibravatar Ryan Dwyer2019-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | The goal here is to center fullscreen views when they are both too small for the output and refuse to resize to the output's dimensions. It has the side effect of also centering the view when it's too small for its container. Example clients that have this behaviour are emersion's hello-wayland and weston. It works by introducing surface_{x,y,width,height} properties to the container struct. The x and y represent layout-local coordinates where the surface will be rendered. The width and height are only used to track the surface's previous dimensions so we can detect when the client has resized it and recenter and apply damage accordingly. The new surface properties are calculated when a transaction is applied, as well as when a view resizes itself unexpectedly. The latter is done in view_update_size. This function was previously restricted to views which are floating, but can now be called for any views. For views which refuse to resize *smaller* than a particular size, such as gnome-calculator, the surface is still anchored to the top left as per the current behaviour.
* Merge pull request #3423 from RyanDwyer/fullscreen-globalLibravatar Drew DeVault2019-01-27
|\ | | | | Implement fullscreen global
| * Implement fullscreen globalLibravatar Ryan Dwyer2019-01-25
| |
* | Update for swaywm/wlroots#1503Libravatar emersion2019-01-27
|/
* Update for swaywm/wlroots#1402Libravatar emersion2019-01-24
|
* Make json-c include respect pkg-config --cflagsLibravatar Jan Beich2019-01-23
| | | | | json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>` won't be found unless the parent directory is searched by default.
* util.c: remove numlen functionLibravatar Ian Fan2019-01-22
| | | | Its uses have been replaced by snprintf, which is more in line with its usage.
* Use noop output when there's no outputs connectedLibravatar Ryan Dwyer2019-01-22
| | | | | Instead of having NULL workspace->output pointers, use a noop output. This should be safer.
* Removed unused wlroots dependency for sway(bg|bar|msg|nag)Libravatar M Stoeckl2019-01-21
| | | | Also remove direct libm dependency where unused.
* Move sway-specific functions in common/util.c into sway/Libravatar M Stoeckl2019-01-21
| | | | | | Modifier handling functions were moved into sway/input/keyboard.c; opposite_direction for enum wlr_direction into sway/tree/output.c; and get_parent_pid into sway/tree/root.c .
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
* Better handle outputs without CRTCLibravatar emersion2019-01-18
| | | | | | | This happens if you plug in more outputs than supported by your GPU. This patch makes it so outputs without CRTCs appear as disabled. As soon as they get a CRTC (signalled via the mode event), we can enable them.
* output: remove output_add_listenersLibravatar emersion2019-01-18
| | | | | Simplify the code by registering signals when outputs are created and removing signals when they are destroyed.
* Remove unicode.cLibravatar emersion2019-01-17
|
* Remove swaylock headersLibravatar emersion2019-01-17
|
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
* Resize only current and immediate siblings rather than all siblingsLibravatar Ryan Dwyer2019-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | For example, create layout V[view view view] and resize the leftmost view using mod+rightclick. Previously, the edge between view 2 and 3 would be adjusted as well. Now this edge will remain constant, which matches the behaviour of i3. To do this operation correctly, the resize tiling seatop now keeps track of two containers, as the container that resizes horizontally will be a different container to the one which resizes vertically (one will be an ancestor). The tiling resize seatop now figures out these containers during the start of the operation and keeps references to them in the event. A new function container_find_resize_parent has been introduced to do this. This function is also used by the resize command. During cursor motion, the seatop logic is similar to before, but now has to choose the correct container to resize. In resize.c, container_resize_tiled and resize_tiled have been merged into one. One of them originally did nothing except pass the values through to the other. container_resize_tiled now takes a simplified approach where it just finds the immediate siblings on either side and resizes them without worrying about the others. The parellel_coord and parallel_size functions are no longer needed and have been removed.
* Disarm key repeat on reloadLibravatar Brian Ashworth2019-01-14
| | | | | | When resetting the keyboard during reload, disarm the key repeat on all keyboards since the bindings (and possibly keyboard) will be freed before the key repeat can go off.
* Remove now-unused "input" argument of cmd_results_newLibravatar M Stoeckl2019-01-14
| | | | | | | | | Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))` applied to `cmd_results_new`. String usage constants have been converted from pointers to arrays when encountered. General handler format strings were sometimes modified to include the old input string, especially for unknown command errors.
* Remove 'input' field of IPC command return jsonLibravatar M Stoeckl2019-01-14
| | | | | | | | This field is not in i3 and provides imprecise and redundant information. (Specifically, when swaymsg is given a list of commands, the IPC return array already indicates precisely which number command failed; knowing the name of the command is not useful when multiple commands of the same type are provided.)
* Merge pull request #3144 from emersion/cmd-xwaylandLibravatar Drew DeVault2019-01-13
|\ | | | | Add xwayland command
| * Add xwayland commandLibravatar emersion2018-11-19
| |
* | Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedLibravatar Drew DeVault2019-01-13
|\ \ | | | | | | Improve mouse button parsing: bar mouse bindings
| * | bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* | | Merge pull request #3343 from RedSoxFan/seat-cursor-buttons-improvedLibravatar Drew DeVault2019-01-13
|\ \ \ | | | | | | | | Improve mouse button parsing: seat cursor buttons
| * | | seat_cmd_cursor: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `seat_cmd_cursor` to utilize `get_mouse_button` when parsing mouse buttons for the `press` and `release` operations. All x11 buttons, button event names, and button event codes are supported. For x11 axis buttons, `dispatch_cursor_axis` is used instead of `dispatch_cursor_button`. However the `press`/`release` state is ignored and the either axis event is processed. This also removes support for `left` and `right` in favor of `BTN_LEFT` and `BTN_RIGHT`.
* | | Merge pull request #3402 from RyanDwyer/refactor-seatopsLibravatar Drew DeVault2019-01-13
|\ \ \ | | | | | | | | Refactor seat operations to use an interface
| * | | Refactor seat operations to use an interfaceLibravatar Ryan Dwyer2019-01-10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits each seat operation (drag/move tiling/floating etc) into a separate file and introduces a struct sway_seatop_impl to abstract the operation. The move_tiling_threshold operation has been merged into move_tiling. The main logic for each operation is untouched aside from variable renames. The following previously-static functions have been made public: * node_at_coords * container_raise_floating * render_rect * premultiply_alpha * scale_box
* | | Merge pull request #3388 from RedSoxFan/reset-inputs-on-reloadLibravatar Drew DeVault2019-01-13
|\ \ \ | | | | | | | | reload: reset input configs
| * | | reload: reset input configsLibravatar Brian Ashworth2019-01-09
| | | | | | | | | | | | | | | | | | | | This resets all input options to their defaults on reload. This also fixes some debug log typos in `input_manager_libinput_config_pointer`.
* | | | Merge pull request #3408 from RedSoxFan/bar-paddingLibravatar Drew DeVault2019-01-13
|\ \ \ \ | | | | | | | | | | swaybar: adjustable status padding
| * | | | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
| * | | | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
* | | | | swaybar: allow identifiers for output and trayLibravatar Brian Ashworth2019-01-13
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows `bar output` and `bar tray_output` to specify an output identifier. Output names should still work as well. This parses the output identifier from the xdg_output description, which wlroots currently sets to `make model serial (name)`. Since this could change in the future, all identifier comparisons are guarded by NULL-checks in case the description cannot be parsed to an identifier.
* | / / swaylock: Add caps lock state to indicatorLibravatar Robinhuett2019-01-10
| |/ / |/| | | | | | | | | | | Implements customization for the indicator as proposed in #2788 with comments from #3367 in mind. The default behaviour does not change exept for the caps lock text color.