aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* swaybar: allow null status_commandLibravatar Ryan Dwyer2018-10-08
| | | | | | | | | Sway sets a default status_command which runs date every second. This patch removes this behaviour so the user can have a NULL status bar if desired. I had to swap swaybar's event_loop_poll and wl_display_flush so that it would map the initial surface.
* Don't apply seat config when validatingLibravatar Ryan Dwyer2018-10-08
|
* Remove unneeded variableLibravatar Ryan Dwyer2018-10-08
|
* Reload config using idle eventLibravatar Ryan Dwyer2018-10-08
| | | | | | | | | | | | | | | | This patch makes it so when you run reload, the actual reloading is deferred to the next time the event loop becomes idle. This avoids several use-after-frees and removes the workarounds we have to avoid them. When you run reload, we validate the config before creating the idle event. This is so the reload command will still return an error if there are validation errors. To allow this, load_main_config has been adjusted so it doesn't apply the config if validating is true rather than applying it unconditionally. This also fixes a memory leak in the reload command where if the config failed to load, the bar_ids list would not be freed.
* Shim client.background and client.placeholderLibravatar Drew DeVault2018-10-07
| | | | | | | These are not supported by sway, but are valid i3 commands and should not cause config errors. Also includes a couple of minor touch-ups.
* ipc: set "type" of floating containers to "floating_con"Libravatar Ian Fan2018-10-06
|
* Move sticky containers when switching workspace via criteriaLibravatar Ryan Dwyer2018-10-06
| | | | | | | | | | | | | | | | | | | | | | * Create a view on workspace 1 * Switch to workspace 2 (on the same output) and create a floating sticky view * Use criteria to focus the view on workspace 1 Previously, we only moved the sticky containers when using workspace_switch, but the above method of focusing doesn't call it. This patch relocates the sticky-moving code into seat_set_focus_warp. A side effect of this patch is that if you have a sticky container focused and then switch workspaces, the sticky container will no longer be focused. It would previously retain focus. In seat_set_focus_warp, new_output_last_ws was only set when changing outputs, but now it's always set. This means new_output_last_ws and last_workspace might point to the same workspace, which means we have to make sure we don't destroy it twice. It now checks to make sure they're different, and to make this more obvious I've moved both calls to workspace_consider_destroy to be next to each other.
* Fix crash when flattening container after movingLibravatar Ryan Dwyer2018-10-05
| | | | | | | | | | container_flatten removes the container from the tree (via container_replace) before destroying it. When destroying, the recent changes to handle_seat_node_destroy incorrectly assumes that the container has a parent. This adds a check for destroying a container which is no longer in the tree. If this is the case, focus does not need to be changed.
* Remove obsolete base64.c fileLibravatar Ian Fan2018-10-04
|
* Fix #2763Libravatar Drew DeVault2018-10-04
|
* Merge pull request #2760 from RyanDwyer/swaylock-handle-output-disconnectLibravatar emersion2018-10-04
|\ | | | | Give focus to another swaylock surface when output is disconnected
| * Give focus to another swaylock surface when output is disconnectedLibravatar Ryan Dwyer2018-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Have multiple outputs * Launch swaylock * Unplug an output (possibly has to be the last "connected" one) * The swaylock surface on the remaining output would not respond to key events This was happening because when the output destroys, focus was not given to the other swaylock surface. This patch makes focus be transferred to another surface owned by the same Wayland client, but only if input was inhibited by the surface being destroyed, and only if it's in the overlay layer. I figure it's best to be overly specific and relax the requirements later if needed. This patch removes a check in seat_set_focus_surface which was preventing focus from being passed from a layer surface to any other surface. I don't know of a use case for this check, but it's possible that this change could produce issues.
* | Ignore unrelated cursor buttons while doing seat operationsLibravatar Ryan Dwyer2018-10-04
|/ | | | | | | | | | | | | | * Click and hold a scrollbar * Drag the cursor onto another surface * While still holding the original button, press and release another cursor button * Things get weird There's two ways to fix this. Either cancel the seat operation and do the other click, or continue the seat operation and ignore the other click. I opted for the latter (ignoring the click) because it's easier to implement, and I suspect a second click during a seat operation is probably unintentional anyway.
* Merge pull request #2759 from minus7/fix-view-container-nullLibravatar emersion2018-10-03
|\ | | | | Fix crash if view has no container
| * Fix crash if view has no containerLibravatar minus2018-10-03
| |
* | Reenable popup-handling for determining focusLibravatar Jonathan Buch2018-10-03
| | | | | | | | | | This reenables the popup-handling code before the floating-window focus change.
* | Use "raycasting" for determining focus for floating windowsLibravatar Jonathan Buch2018-10-03
| | | | | | | | | | Floating containers and their surfaces are ordered in "raised last". This is used to detect the topmost surface and thus the focus.
* | Fix focusing topmost floating windowsLibravatar Jonathan Buch2018-10-03
| | | | | | | | | | | | | | | | | | | | | | | | Re-focus on the container on which the cursor hovers over. A special case is, if there are menus or other subsurfaces open in the focused container. It will prefer the focused container as long as there are subsurfaces. This commit starts caching the previous node as well as the previous x/y cursor position. Re-calculating the previous focused node by looking at the current state of the cursor position does not work, if the environment changes.
* | Add manpage documentatioon for raise_floatingLibravatar Jonathan Buch2018-10-03
| |
* | Simplify raising a container in seatLibravatar Jonathan Buch2018-10-03
| | | | | | | | | | * Factor out raising a floating window into s separate function to enable reuse.
* | Add configuration for raising containers on focusLibravatar Jonathan Buch2018-10-03
|/ | | | | | | * New configuration option: raise_floating (From the discussion on https://github.com/i3/i3/issues/2990) * By default, it still raises the window on focus, otherwise it will raise the window on click.
* Add sanity check for empty focus stackLibravatar Ryan Dwyer2018-10-03
|
* Fix some missing commands in sway-input(5)Libravatar Drew DeVault2018-10-03
|
* Merge pull request #2703 from RyanDwyer/csd-borderLibravatar Drew DeVault2018-10-03
|\ | | | | Add CSD to border modes
| * Remove server-decoration assumption if view supports xdg-decorationLibravatar Ryan Dwyer2018-09-27
| |
| * Improve CSD logicLibravatar Ryan Dwyer2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does the following: * Removes the xdg-decoration surface_commit listener. I was under the impression the client could ignore the server's preference and set whatever decoration they like using this protocol, but I don't think that's right. * Adds a listener for the xdg-decoration request_mode signal. The protocol states that the server should respond to this with its preference. We'll always respond with SSD here. * Makes it so tiled views which use CSD will still have sway decorations rendered. To do this, using_csd had to be added back to the view struct, and the border is changed when floating or unfloating a view.
| * Rename view_set_csd_from_client to view_update_csd_from_clientLibravatar Ryan Dwyer2018-09-27
| |
| * Remove CSD from toggle list if client doesn't support itLibravatar Ryan Dwyer2018-09-27
| |
| * Add CSD to border modesLibravatar Ryan Dwyer2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces view.using_csd with a new border mode: B_CSD. This also removes sway_xdg_shell{_v6}_view.deco_mode and view->has_client_side_decorations as we can now get these from the border. You can use `border toggle` to cycle through the modes including CSD, or use `border csd` to set it directly. The client must support the xdg-decoration protocol, and the only client I know of that does is the example in wlroots. If the client switches from SSD to CSD without us expecting it (via the server-decoration protocol), we stash the previous border type into view.saved_border so we can restore it if the client returns to SSD. I haven't found a way to test this though.
* | Fix tiling criteriaLibravatar Ryan Dwyer2018-10-03
| |
* | Set focus_inactive on a sibling when a container closes in an inactive workspaceLibravatar Ryan Dwyer2018-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To reproduce the problem, create layout H[view V[view view view-focused]], then switch to another workspace and have the previously focused view in the vsplit close (eg. using criteria, or an mpv video finishing). Return to the workspace using `$mod+<num>` and the entire vsplit would be focused. This happens because handle_seat_node_destroy would only set a new focus if the currently focused view or a parent was being destroyed. To fix it, it needs to set a sibling of the destroying container to focus_inactive regardless of the current focus, then restore current focus if needed. This patch changes the function accordingly. Additionally: * The function now makes an early return if the node being destroyed is a workspace. * set_focus has been renamed to needs_new_focus. This variable is true if the head focus needs to be changed.
* | Handle border options for gapsLibravatar Brian Ashworth2018-10-01
| | | | | | | | | | | | | | | | | | | | | | | | Fixes `hide_edge_borders smart` when gaps are in use. Implements `hide_edge_borders smart_no_gaps` and `smart_borders on|no_gaps|off`. Since `smart_borders on` is equivalent to `hide_edge_borders smart` and `smart_borders no_gaps` is equivalent to `hide_edge_borders smart_no_gaps`, I opted to just save the last value set for `hide_edge_borders` and restore that on `smart_borders off`. This simplifies the conditions for setting the border.
* | Merge branch 'master' into fix-2653Libravatar Ryan Dwyer2018-10-02
|\ \
| * \ Merge pull request #2735 from RedSoxFan/fix-quotesLibravatar Drew DeVault2018-10-01
| |\ \ | | | | | | | | Do not strip quotes for exec or bind commands
| | * | Do not strip quotes for cmd_setLibravatar Brian Ashworth2018-09-30
| | | |
| | * | Do not strip quotes for exec or bind commandsLibravatar Brian Ashworth2018-09-30
| | | | | | | | | | | | | | | | | | | | Leave quotes intact for cmd_exec, cmd_exec_always, cmd_bindcode, and cmd_bindsym
* | | | Fix smart gapsLibravatar Brian Ashworth2018-10-01
|/ / /
* | | Merge pull request #2737 from Ragnis/criteria-floatingLibravatar Drew DeVault2018-09-30
|\ \ \ | |/ / |/| | Parse floating criteria
| * | Parse floating criteriaLibravatar Ragnis Armus2018-09-30
| | |
* | | Add support for installing binaries with DT_RPATHLibravatar Arkadiusz Hiler2018-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway.
* | | Merge pull request #2726 from RyanDwyer/overhaul-gapsLibravatar Drew DeVault2018-09-30
|\ \ \ | | | | | | | | Make gaps implementation consistent with i3-gaps
| * | | Update gaps documentationLibravatar Ryan Dwyer2018-09-29
| | | |
| * | | Don't allow negative gapsLibravatar Ryan Dwyer2018-09-29
| | | |
| * | | Make gaps implementation consistent with i3-gapsLibravatar Ryan Dwyer2018-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes our gaps implementation to behave like i3-gaps. Our previous implementation allowed you to set gaps on a per container basis. This isn't supported by i3-gaps and doesn't seem to have a practical use case. The gaps_outer and gaps_inner properties on containers are now removed as they just read the gaps_inner from the workspace. `gaps inner|outer <px>` no longer changes the gaps for all workspaces. It only sets defaults for new workspaces. `gaps inner|outer current|workspace|all set|plus|minus <px>` is now runtime only, and the workspace option is now removed. `current` now sets gaps for the current workspace as opposed to the current container. `workspace <ws> gaps inner|outer <px>` is now implemented. This sets defaults for a workspace. This also fixes a bug where changing the layout of a split container from linear to tabbed would cause gaps to not be applied to it until you switch to another workspace and back.
* | | | Merge pull request #2728 from RedSoxFan/move-sticky-on-evacLibravatar Drew DeVault2018-09-30
|\ \ \ \ | | | | | | | | | | Move sticky containers in output_evacuate
| * | | | Move sticky containers in output_evacuateLibravatar Brian Ashworth2018-09-28
| |/ / /
* | | | Merge pull request #2725 from PumbaPe/add-tap-and-dragLibravatar Drew DeVault2018-09-30
|\ \ \ \ | | | | | | | | | | Add tap and drag to sway-input
| * | | | add tap-and-drag setting to sway-inputLibravatar PP2018-09-29
| | | | |
* | | | | Turn funcs() into funcs(void)Libravatar Arkadiusz Hiler2018-09-30
| | | | | | | | | | | | | | | | | | | | If they really do not take undefined number of arguments.
* | | | | Remove libcap/prctl artifactsLibravatar Arkadiusz Hiler2018-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They seem like relics of the pasts, from when we were retaining the ptrace cap. Some translations still may need updates.