aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* Abort if proprietary drivers are in useLibravatar Ryan Dwyer2018-10-21
| | | | | | The idea here is we don't want users to be blissfully unaware that they are running unsupported drivers. So we abort on startup, and force the user to add a specific argument to bypass the check.
* Merge pull request #2895 from RyanDwyer/fix-popup-damageLibravatar Drew DeVault2018-10-20
|\ | | | | Fix popup damage issues when toplevel and/or popup uses geometry
| * Fix popup damage issues when toplevel and/or popup uses geometryLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wlr_xdg_popup_get_toplevel_coords function has the following quirks: * It does not do anything with the coordinates of the passed popup. Instead, we are required to add them ourselves, which we do by passing them to the function as the surface local values. * It adds the geometry (shadows etc) of the toplevel itself, so the coordinates are surface local rather than content local. For this reason, we have to negate the toplevel's geometry (child->view->geometry). * I may be wrong, but the popup positions appear to be stored in surface local coordinates rather than content local coordinates. The geometry (shadows etc) of the popup itself must be negated (surface->geometry).
* | Merge pull request #2888 from RyanDwyer/remove-raise-floatingLibravatar Drew DeVault2018-10-20
|\ \ | |/ |/| Remove raise_floating directive
| * 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.
* | Fix crash when defaut seat is not createdLibravatar Mihai Coman2018-10-20
|/ | | | Function input_manager_get_default_seat should always return a seat.
* Merge pull request #2870 from RyanDwyer/refactor-input-managerLibravatar emersion2018-10-20
|\ | | | | Minor refactor of input manager
| * 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).
* | Merge pull request #2886 from RyanDwyer/fix-headless-unmap-crashLibravatar emersion2018-10-20
|\ \ | | | | | | Fix crash when view unmaps while no outputs connected
| * | Fix crash when view unmaps while no outputs connectedLibravatar Ryan Dwyer2018-10-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a view unmaps, we call workspace_consider_destroy. This function assumed the workspace would always have an output, but this is not the case when hotplugged down to zero. The function now handles this and allows itself to be destroyed when there is no output. This means that workspace_begin_destroy must remove the workspace from the root->saved_workspaces list to avoid an eventual dangling pointer, so it does that now. Lastly, when an output is plugged in again and it has to create a new initial workspace for it, we must emit the workspace::init IPC event otherwise swaybar shows no workspaces at all. I guess when you start sway, swaybar is started after the workspace has been created which is why this hasn't been needed earlier.
* | Merge pull request #2879 from Emantor/fix/swaybar_positionLibravatar emersion2018-10-20
|\ \ | |/ |/| swaybar: disallow left and right position and print error on default
| * commands/bar: remove left and right from allowed positionsLibravatar Rouven Czerwinski2018-10-20
| | | | | | | | "left" and "right" are not allowed positions for swaybar, remove them.
* | Merge pull request #2872 from RyanDwyer/cursor-rebaseLibravatar Drew DeVault2018-10-20
|\ \ | | | | | | Introduce cursor_rebase
| * | 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 crash when ending tiling dragLibravatar Ryan Dwyer2018-10-20
|/ | | | | | | If the container being dragged has a parent that needs to be reaped, it must be reaped after we've reinserted the dragging container into the tree. During reaping, handle_seat_node_destroy tries to refocus the dragging container which isn't possible while it's detached.
* 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>`.
* 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.
* Export XCURSOR_SIZE and XCURSOR_THEMELibravatar emersion2018-10-17
| | | | | | | | These can be used by toolkits (currently Qt, libxcursor, glfw) to choose a default cursor theme and size. This backports this rootston commit: https://github.com/swaywm/wlroots/pull/1294/commits/3a181ab430997aaf03a75cbe3b79b0fc56ec96c3
* Merge pull request #2858 from RyanDwyer/fix-move-to-floating-wsLibravatar Drew DeVault2018-10-17
|\ | | | | Fix moving tiled containers to workspaces which only have floating views
| * Fix moving tiled containers to workspaces which only have floating viewsLibravatar Ryan Dwyer2018-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make a workspace which only contains floating views * Switch to another workspace and create a tiled view * Move the tiled view to the workspace with `move container to workspace N` The container would be added as a sibling to the floating view, which makes the container floating while having the geometry of a tiled container. This changes it so it only looks for tiled containers in the workspace with a fallback to the workspace itself.
* | Merge pull request #2861 from RyanDwyer/fix-empty-workspace-crashesLibravatar Drew DeVault2018-10-17
|\ \ | | | | | | Fix crashes when running certain commands on an empty workspace
| * | Fix crashes when running certain commands on an empty workspaceLibravatar Ryan Dwyer2018-10-17
| |/ | | | | | | | | This fixes crashes when running the border, mark, unmark and title_format commands on an empty workspace.
* | Merge pull request #2820 from Emantor/fix-mouse-warping-containerLibravatar Drew DeVault2018-10-17
|\ \ | |/ |/| Fix mouse warping container
| * view: rewarp cursor during view_unmapLibravatar Rouven Czerwinski2018-10-16
| | | | | | | | | | | | If the cursor is warped during the destruction of the workspace, we end up in the wrong position. Warp the cursor after arrange_workspace() so we end up in the correct position.
| * seat: use new warping functions for cursor warping during focus warpLibravatar Rouven Czerwinski2018-10-16
| |
| * 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
* | Fix crash when using workspace back_and_forth with no previousLibravatar Ryan Dwyer2018-10-16
| |
* | Merge branch 'master' into set-set-raw-focusLibravatar Ian Fan2018-10-16
|\ \
| * | Fix crash in swap commandLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | | | | | | When swapping containers that are in the root of the workspace, parent will be NULL.
* | | 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.
* | Establish sway-output(5)Libravatar Drew DeVault2018-10-14
| |
* | Document `border csd`Libravatar Drew DeVault2018-10-14
| |
* | swaybar: add documentation for hide/hidden_state subcommandsLibravatar Ian Fan2018-10-14
| |
* | swaybar: show hidden bar on key eventLibravatar Ian Fan2018-10-14
| | | | | | | | | | | | Since wayland does not currently allow swaybar to create global keybinds, this is handled within sway and sent to the bar using a custom event, so as not to pollute existing events, called bar_state_update.
* | commands: fix sending bar mode/hidden_state updates to all barsLibravatar Ian Fan2018-10-14
| | | | | | | | | | Previously, if a change was sent to all bars, it would only actually change the first bar it encountered, due to return value handling
* | Merge pull request #2808 from RedSoxFan/bar-subcommandsLibravatar Drew DeVault2018-10-14
|\ \ | | | | | | Fix bar subcommand handler structs and selection
| * | cmd_bar: simplify logicLibravatar Brian Ashworth2018-10-13
| | |
| * | cmd_bar: fix bar id issuesLibravatar Brian Ashworth2018-10-13
| | | | | | | | | | | | | | | | | | Allows bar-subcommand to be a valid bar-ids Destroys runtime created bar if trying to use a config only subcommand Allow subcommands (except for id) to be ids
| * | bar_cmd_status_command: only reload current barLibravatar Brian Ashworth2018-10-13
| | | | | | | | | | | | | | | Ideally, this will be replaced with an IPC barconfig_update event in the near future
| * | Fix bar subcommand handler structs and selectionLibravatar Brian Ashworth2018-10-13
| | |
* | | Remove unnecessary commentLibravatar Drew DeVault2018-10-13
| | |
* | | Merge branch 'master' into fix_edge_gapsLibravatar Brian Ashworth2018-10-13
|\| |
| * | Fix crash when view maps while lockedLibravatar Ryan Dwyer2018-10-13
| | | | | | | | | | | | | | | | | | | | | | | | When locked, there is no active workspace so it must find the focus_inactive workspace instead. Additionally, this adds a check for if a view maps while there are no outputs connected and handles it gracefully.
* | | fix_edge_gaps: Allow negative values for outer gaps.Libravatar Tarmack2018-10-13
|/ / | | | | | | While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
* | Fix pixel leaks when using fractional scalingLibravatar Ryan Dwyer2018-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | The basic idea here is to apply rounding after scaling. It's not as simple as this, though, and I've detailed it in the comments for a function. In order to fix some pixel leaks in the title bar, I found it easier to change how we place rectangles to fill the area. Instead of placing two rectangles across the full width above and below the title and having shorter rectangles in the inner area, it's now pieced together in vertical chunks. This method involves drawing two less rectangles per container.