aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* Use #if instead of #ifdef for WLR_HAS_*Libravatar emersion2018-11-12
|
* Allow multiple outputs for workspace outputLibravatar Brian Ashworth2018-11-11
| | | | | | | | | | | | `i3 4.16` allows users to list multiple outputs for a workspace and the first available will be used. The syntax is as follows: `workspace <workspace> output <outputs...>` Additionally when the workspace is created, the outputs get added to the output priority list in the order specified. This ensures that if a higher output gets connected, the workspace will move to the higher output. This works the same way as if the user had a workspace on an output, disconnected the output, and then later reconnected the output.
* Merge pull request #3087 from RedSoxFan/side-gapsLibravatar Ryan Dwyer2018-11-08
|\ | | | | Implement per side and per direction outer gaps
| * Implement per side and per direction outer gapsLibravatar Brian Ashworth2018-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the following command extensions from `i3-gaps`: * `gaps horizontal|vertical|top|right|bottom|left <amount>` * `gaps horizontal|vertical|top|right|bottom|left all|current set|plus|minus <amount>` * `workspace <ws> gaps horizontal|vertical|top|right|bottom|left <amount>` `inner` and `outer` are also still available as options for all three of the above commands. `outer` now acts as a shorthand to set/alter all sides. Additionally, this fixes two bugs with the prevention of invalid gap configurations for workspace configs: 1. If outer gaps were not set and inner gaps were, the outer gaps would be snapped to the negation of the inner gaps due to `INT_MIN` being less than the negation. This took precedence over the default outer gaps. 2. Similarly, if inner gaps were not set and outer gaps were, inner gaps would be set to zero, which would take precedence over the default inner gaps. Fixing both of the above items also requires checking the gaps again when creating a workspace since the default outer gaps can be smaller than the negation of the workspace specific inner gaps.
* | gaps: remove duplicate inner gapsLibravatar Brian Ashworth2018-11-07
|/
* Add focus_follows_mouse always. (#3081)Libravatar Connor E2018-11-06
| | | | | | | | * Add focus_follows_mouse_mode. * Fail if focus_follows_mouse is invalid. * Fix indentation.
* Merge pull request #3021 from Snaipe/singlekey-binding-triggerLibravatar Drew DeVault2018-11-03
|\ | | | | binding: match single-key bindings if no multi-key binding matched
| * binding: match single-key bindings if no multi-key binding matchedLibravatar Franklin "Snaipe" Mathieu2018-10-29
| | | | | | | | | | | | | | This makes bindings more snappy when the user is typing faster than his keycaps are releasing. Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
* | Move view marks properties to container structLibravatar Ryan Dwyer2018-11-01
| | | | | | | | | | Like border properties, this will be needed to implement layout saving and restoring.
* | Merge pull request #3040 from RyanDwyer/border-props-to-containerLibravatar Drew DeVault2018-11-01
|\ \ | | | | | | Move view border properties to container struct
| * | Move view border properties to container structLibravatar Ryan Dwyer2018-10-31
| | | | | | | | | | | | | | | | | | This will be needed to implement layout saving and restoring, as we need to be able to configure borders on a placeholder container which has no view.
* | | Wrap to fartherest output when running focus outputLibravatar Ryan Dwyer2018-11-01
|/ / | | | | | | | | Also moves the `opposite_direction` function into `util.c` as it's used in two places now.
* | Revert "Add resolve_path() to utils"Libravatar madblobfish2018-10-31
| | | | | | | | This reverts commit c9694ee63d451da62dc50b234b3080a35a40e844.
* | Remove enum movement_directionLibravatar Ryan Dwyer2018-10-30
| | | | | | | | | | | | | | | | | | There's no point having both movement_direction and wlr_direction. This replaces the former with the latter. As movement_direction also contained MOVE_PARENT and MOVE_CHILD items, these are now checked specifically in the focus command and handled in separate functions, just like the other focus variants.
* | Use output identifier for workspace configLibravatar Robinhuett2018-10-27
|/
* Rebase the cursor after applying transactionsLibravatar Ryan Dwyer2018-10-25
| | | | | | | | | | | | This approaches cursor rebasing from a different angle. Rather than littering the codebase with cursor_rebase calls and using transaction callbacks, this just runs cursor_rebase after applying every transaction - but only if there's outputs connected, because otherwise it causes a crash during shutdown. There is one known case where we still need to call cursor_rebase directly, and that's when running `seat seat0 cursor move ...`. This command doesn't set anything as dirty so no transaction occurs.
* Merge pull request #2950 from emersion/presentation-timeLibravatar Drew DeVault2018-10-25
|\ | | | | Implement the presentation-time protocol
| * Implement the presentation-time protocolLibravatar emersion2018-10-23
| |
* | Merge pull request #2957 from RyanDwyer/rebase-cursor-after-mapLibravatar Drew DeVault2018-10-24
|\ \ | | | | | | Rebase the cursor after mapping a view
| * | Rebase the cursor after mapping a viewLibravatar Ryan Dwyer2018-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally put the rebase at the end of view_map, but at this point the view is still at its native size and will ignore the motion event if it falls outside of its native size. The only way to do this properly is to rebase the cursor later - either after sending the configure, after the view commits with the new size, or after applying the transaction. I chose to do it after applying the transaction for simplicity. I then attempted to just call cursor_rebase after applying every transaction, but this causes crashes when exiting sway (and possibly other places) because cursor_rebase assumes the tree is in a valid state. So my chosen solution introduces transaction_commit_dirty_with_callback which allows handle_map to register a callback which will run when the transaction is applied.
* | | Add multiseat support to swaylockLibravatar Ryan Dwyer2018-10-24
|/ /
* | Merge pull request #2933 from Snaipe/xwayland-window-propertiesLibravatar Drew DeVault2018-10-24
|\ \ | |/ |/| xwayland: populate window_properties in json for views
| * xwayland: populate window_properties in json for viewsLibravatar Franklin "Snaipe" Mathieu2018-10-23
| | | | | | | | | | | | | | | | | | | | | | window_properties is documented to contain a subset of the X11 properties of a window (its title, class, instance, role, and transient ID). This commit adds the missing json object from the get_tree output for xwayland windows only. This is a follow-up of #2911. Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
* | commands: replace EXPECTED_LESS_THAN with EXPECTED_AT_MOSTLibravatar Ian Fan2018-10-23
| | | | | | | | This makes it a bit more obvious what the expected number of arguments is.
* | commands: remove EXPECTED_MORE_THANLibravatar Ian Fan2018-10-23
| | | | | | | | Its uses have been replaced with EXPECTED_AT_LEAST.
* | Fix crash when quitting a QT app on the wayland backend using menuLibravatar Ryan Dwyer2018-10-22
|/ | | | | | | | | | | QT unmaps the view before destroying the popup. We destroyed the popup in response to the view unmapping, but then we'd attempt to destroy it a second time which caused a crash. The patch removes the listener. I tested it with GTK as well, and can confirm the popup is still being destroyed.
* Parse missing i3 window typesLibravatar Christian2018-10-21
| | | | fixes the parsing part of #2906
* Make workspace back_and_forth seat-specificLibravatar Ryan Dwyer2018-10-21
| | | | | | | | * When using multiple seats, each seat has its own prev_workspace_name for the purpose of workspace back_and_forth. * Removes prev_workspace_name global variable. * Removes unused next_name_map function in tree/workspace.c. * Fixes memory leak in seat_destroy (seat was not freed).
* Remove raise_floating directiveLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | The directive controlled whether floating views should raise to the top when the cursor is moved over it while using focus_follows_mouse. The default was enabled, which is undesirable. For example, if you have two floating views where one completely covers the other, the smaller one would be inaccessible because moving the mouse over the bigger one would raise it above the smaller one. There is no known use case for having raise_floating enabled, so this patch removes the directive and implements the raise_floating disabled behaviour instead.
* Minor refactor of input managerLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | | | | | | | | | The input manager is a singleton object. Passing the sway_input_manager argument to each of its functions is unnecessary, while removing the argument makes it obvious to the caller that it's a singleton. This patch removes the argument and makes the input manager use server.input instead. On a similar note: * sway_input_manager.server is removed in favour of using the server global. * seat.input is removed because it can get it from server.input. Due to a circular dependency, creating seat0 is now done directly in server_init rather than in input_manager_create. This is because creating seats must be done after server.input is set. Lastly, it now stores the default seat name using a constant and removes a second reference to seat0 (in input_manager_get_default_seat).
* Introduce cursor_rebaseLibravatar Ryan Dwyer2018-10-19
| | | | | This function "rebases" the cursor on top of whatever is underneath it, without triggering any focus changes.
* Fix logic used for mouse_warping outputLibravatar Ryan Dwyer2018-10-19
| | | | | Turns out we don't need to store the previous focus, and it should be based on which output the cursor was in.
* Merge pull request #2875 from RedSoxFan/input-device-bindingsLibravatar Drew DeVault2018-10-19
|\ | | | | cmd_bind{sym,code}: Implement per-device bindings
| * cmd_bind{sym,code}: Implement per-device bindingsLibravatar Brian Ashworth2018-10-18
| | | | | | | | | | bindsym --input-device=<identifier> ... bindcode --input-device=<identifier> ...
* | Consider cursor warp when switching workspacesLibravatar Ryan Dwyer2018-10-19
|/ | | | | | | | | Fixes a regression introduced in 24a90e5d86441fc345356eb3767e5a6880dcedbd. consider_warp_to_focus has been renamed to seat_consider_warp_to_focus, moved to seat.c and made public. It is now called when switching workspaces via `workspace <ws>`.
* swaybar: separate input code to new fileLibravatar Ian Fan2018-10-18
|
* Remove cursor warping from seat_set_focusLibravatar Ryan Dwyer2018-10-18
| | | | | | | | | | | | Because cursor warping was the default behaviour in seat_set_focus, there may be cases where we may have been warping the cursor unintentionally. This patch removes cursor warping from seat_set_focus and only does it in the focus command. This is managed by a static function in focus.c. To know whether to warp or not, we need to know which node had focus previously. To keep track of this easily, seat->prev_focus has been introduced and is set to the previous in seat_set_focus.
* Merge pull request #2820 from Emantor/fix-mouse-warping-containerLibravatar Drew DeVault2018-10-17
|\ | | | | Fix mouse warping container
| * cursor: functions to warp cursor to container and workspaceLibravatar Rouven Czerwinski2018-10-16
| | | | | | | | | | | | The new functions allow a cursor to be warped without changing the focus. This is a preparation commit to handle cursor warping not only in seat_set_focus_warp.
| * view: move arrange_workspace into view_mapLibravatar Rouven Czerwinski2018-10-16
| | | | | | | | | | | | | | | | | | | | For mouse_warping cursor to correctly work on newly spawned containers, the workspace needs to be arranged before the cursor is warped. The shell functions each implement their own fullscreen and arrange checks, move them into the view_map function and pass their states via boolean arguments. Fixes #2819
* | Prevent duplicate workspace::focus eventsLibravatar Ryan Dwyer2018-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Previously we would compare the last focus's workspace with the new focus's workspace to determine if we need to emit an IPC workspace::focus event. This doesn't work when moving the focused container to a new workspace. This adds a workspace property to the seat which stores the last emitted workspace::focus workspace. Using this method, after moving the container, refocusing it will trigger exactly one workspace::focus event: from the old workspace to the new workspace.
* | Introduce seat_set_raw_focus and remove notify argument from seat_set_focus_warpLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces seat_set_raw_focus: a function that manipulates the focus stack without doing any other behaviour whatsoever. There are a few places where this is useful, such as where we set focus_inactive followed by another call to set the real focus again. With this change, the notify argument to seat_set_focus_warp is also removed as these cases now use the raw function instead. A bonus of this is we are no longer emitting window::focus IPC events when setting focus_inactive, nor are we sending focus/unfocus events to the surface. This also fixes the following: * When running `move workspace to output <name>` and moving the last workspace from the source output, the workspace::focus IPC event is no longer emitted for the newly created workspace. * When splitting the currently focused container, unfocus/focus events will not be sent to the surface when giving focus_inactive to the newly created parent, and window::focus events will not be emitted.
* | Event loop: Fix memmove and remove extraneous declarationLibravatar Ryan Dwyer2018-10-15
| |
* | Remove timerfd from loop implementationLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | timerfd doesn't work on the BSDs, so this replaces it with a timespec for the expiry and uses a poll timeout to check the timers when needed.
* | swaylock: Don't wait too long for surface damage before verifyingLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: clear password after 10 secondsLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: Remove indicator after 3 secondsLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: Use common event loopLibravatar Ryan Dwyer2018-10-15
| |
* | Move swaybar's event loop to common directory and refactorLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | | | | | * The loop functions are now prefixed with `loop_`. * It is now easy to add timers to the loop. * Timers are implemented using pollfd and timerfd, rather than manually checking them when any other event happens to arrive.
* | swaybar: send signal to status when hiding or showing barLibravatar Ian Fan2018-10-14
| |