summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Remove offset argument to container_add_siblingLibravatar Ryan Dwyer2018-09-05
| | | | I added this thinking that it might come in useful. Turns out it didn't.
* Fix crash when focus hits edge of rootLibravatar Ryan Dwyer2018-09-05
|
* Don't use wlr_output propertiesLibravatar Ryan Dwyer2018-09-05
| | | | These properties are before rotation.
* Implement type safe arguments and demote sway_containerLibravatar Ryan Dwyer2018-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the meaning of sway_container so that it only refers to layout containers and view containers. Workspaces, outputs and the root are no longer known as containers. Instead, root, outputs, workspaces and containers are all a type of node, and containers come in two types: layout containers and view containers. In addition to the above, this implements type safe variables. This means we use specific types such as sway_output and sway_workspace instead of generic containers or nodes. However, it's worth noting that in a few places places (eg. seat focus and transactions) referring to them in a generic way is unavoidable which is why we still use nodes in some places. If you want a TL;DR, look at node.h, as well as the struct definitions for root, output, workspace and container. Note that sway_output now contains a workspaces list, and workspaces now contain a tiling and floating list, and containers now contain a pointer back to the workspace. There are now functions for seat_get_focused_workspace and seat_get_focused_container. The latter will return NULL if a workspace itself is focused. Most other seat functions like seat_get_focus and seat_set_focus now accept and return nodes. In the config->handler_context struct, current_container has been replaced with three pointers: node, container and workspace. node is the same as what current_container was, while workspace is the workspace that the node resides on and container is the actual container, which may be NULL if a workspace itself is focused. The global root_container variable has been replaced with one simply called root, which is a pointer to the sway_root instance. The way outputs are created, enabled, disabled and destroyed has changed. Previously we'd wrap the sway_output in a container when it is enabled, but as we don't have containers any more it needs a different approach. The output_create and output_destroy functions previously created/destroyed the container, but now they create/destroy the sway_output. There is a new function output_disable to disable an output without destroying it. Containers have a new view property. If this is populated then the container is a view container, otherwise it's a layout container. Like before, this property is immutable for the life of the container. Containers have both a `sway_container *parent` and `sway_workspace *workspace`. As we use specific types now, parent cannot point to a workspace so it'll be NULL for containers which are direct children of the workspace. The workspace property is set for all containers, except those which are hidden in the scratchpad as they have no workspace. In some cases we need to refer to workspaces in a container-like way. For example, workspaces have layout and children, but when using specific types this makes it difficult. Likewise, it's difficult for a container to get its parent's layout when the parent could be another container or a workspace. To make it easier, some helper functions have been created: container_parent_layout and container_get_siblings. container_remove_child has been renamed to container_detach and container_replace_child has been renamed to container_replace. `container_handle_fullscreen_reparent(con, old_parent)` has had the old_parent removed. We now unfullscreen the workspace when detaching the container, so this function is simplified and only needs one argument now. container_notify_subtree_changed has been renamed to container_update_representation. This is more descriptive of its purpose. I also wanted to be able to call it with whatever container was changed rather than the container's parent, which makes bubbling up to the workspace easier. There are now state structs per node thing. ie. sway_output_state, sway_workspace_state and sway_container_state. The focus, move and layout commands have been completely refactored to work with the specific types. I considered making these a separate PR, but I'd be backporting my changes only to replace them again, and it's easier just to test everything at once.
* Merge pull request #2569 from RyanDwyer/deny-reload-repeatLibravatar Drew DeVault2018-09-04
|\ | | | | Deny repeating reload by holding key
| * Deny repeating reload by holding keyLibravatar Ryan Dwyer2018-09-04
|/ | | | | | | | | | | | | | | Fixes #2568 The binding that gets stored in the keyboard's `repeat_binding` would get freed on reload, leaving a dangling pointer. Rather than attempt to unset the keyboard's `repeat_binding` along with the other bindings, I opted to just not set it for the reload command because there's no point in reloading repeatedly by holding the binding. This disables repeat bindings for the reload command. As we now need to detect whether it's a reload command in two places, I've added a binding flag to track whether it's a reload or not.
* Merge pull request #2561 from RyanDwyer/window-role-criteriaLibravatar Drew DeVault2018-09-03
|\ | | | | Implement window_role criteria token
| * Implement window_role criteria tokenLibravatar Ryan Dwyer2018-09-04
|/ | | | Depends on https://github.com/swaywm/wlroots/pull/1226
* Merge pull request #2564 from ppascher/masterLibravatar Drew DeVault2018-09-03
|\ | | | | Fix window_type with disabled xwayland support
| * move criteria "instance", "class" and "window_role" inside HAVE_XWAYLAND ifdefs"Libravatar Pascal Pascher2018-09-03
| |
| * fix window_type with disabled xwayland supportLibravatar Pascal Pascher2018-09-03
| |
| * Fixed window_type with disabled xwayland support.Libravatar Pascal Pascher2018-09-03
| |
* | Merge pull request #2542 from sghctoma/fix-freebsd-buildLibravatar Drew DeVault2018-09-03
|\ \ | | | | | | FreeBSD fixes
| * | Change _XOPEN_SOURCE defines to _POSIX_C_SOURCELibravatar sghctoma2018-09-03
| | |
| * | Merge remote-tracking branch 'upstream/master' into fix-freebsd-buildLibravatar sghctoma2018-09-03
| |\|
| * | Enable privilege dropping of FreeBSDLibravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | Privilege dropping works on FreeBSD too, so only the caps parts need to be Linux-only.
| * | Add missing destroy calls to server_finiLibravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rootston calls "wlr_xwayland_destroy" and "wl_display_destroy_clients" on shutdown, but these were not called by Sway. Without them, Sway crashes on exit before the display destroy event handler could be called. This causes two problems: - The TTY is not reset, and it locks up after exiting Sway. - drmDropMaster is not called, and the implicit drop (that should occur when the DRM fd is closed) seems not to be working in some scenarios (e.g. if you have a tmux session running - maybe the fd is retained somehow by tmux?). In other words, it you exit Sway, you can't start it (or any other program that wants to be DRM master) again until you close all your tmux sessions.
| * | Add FreeBSD-specific PAM configurationLibravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | | | | | | | | | | The "login" PAM configuration means somathing entirely different on FreeBSD than on Linux: if you try to authenticate as the calling user, it OKs the request without prompting for password. The "passwd" config implements the desired functionality, therefore it should be used by swaylock.
| * | Fix SYSCONFDIR to include "prefix"Libravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | | | | | | | SYSCONFDIR is used to determine the path of the default configuration file. 'sysconfdir' is set to 'prefix/sysconfdir' later (on line 139), so configuration files are installed under 'prefix', but SYSCONFDIR did not reflect it.
| * | Make libcap an optional dependencyLibravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | FreeBSD does not have libcap, so without "required: false" Sway fails to build.
| * | Fix feature macros for FreeBSDLibravatar sghctoma2018-08-30
| | | | | | | | | | | | | | | On FreeBSD, snprintf and vsnprintf are visible only if _XOPEN_SOURCE >= 600.
* | | Merge pull request #2563 from taiyu-len/fix/misaligned-pointer-accessLibravatar Drew DeVault2018-09-03
|\ \ \ | | | | | | | | fix misaligned integer stores/loads
| * | | prevent ub caused by misaligned stores/loadsLibravatar taiyu2018-09-02
| | | |
* | | | Merge pull request #2565 from ianyfan/fix-splashscreen-crashLibravatar emersion2018-09-03
|\ \ \ \ | |_|_|/ |/| | | Fix crash when a splash screen opens on an empty workspace
| * | | Fix crash when a splash screen opens on an empty workspaceLibravatar Ian Fan2018-09-03
|/ / /
* | | Merge pull request #2553 from emersion/disabled-no-modesetLibravatar Brian Ashworth2018-09-03
|\ \ \ | | | | | | | | Do not modeset disabled outputs
| * \ \ Merge branch 'master' into disabled-no-modesetLibravatar Brian Ashworth2018-09-03
| |\ \ \ | |/ / / |/| | |
* | | | Merge pull request #2562 from RyanDwyer/ld-library-pathLibravatar emersion2018-09-02
|\ \ \ \ | | | | | | | | | | Add meson option for LD_LIBRARY_PATH
| * | | | Add ld-library-path meson optionLibravatar Ryan Dwyer2018-09-02
| | | | |
| * | | | Use dashes in meson option namesLibravatar Ryan Dwyer2018-09-02
| | | | |
* | | | | Merge pull request #2560 from RyanDwyer/focus-on-window-activationLibravatar emersion2018-09-02
|\ \ \ \ \ | |/ / / / |/| | | | Implement focus_on_window_activation
| * | | | Rename fowa enum and use switch in view_request_activateLibravatar Ryan Dwyer2018-09-02
| | | | |
| * | | | Implement focus_on_window_activationLibravatar Ryan Dwyer2018-09-02
|/ / / / | | | | | | | | | | | | Depends on https://github.com/swaywm/wlroots/pull/1223
* | | | Merge pull request #2559 from RyanDwyer/xwayland-check-modalLibravatar emersion2018-09-02
|\ \ \ \ | | | | | | | | | | Check modal state when determining whether an xwayland view should float
| * | | | Check modal state when determining whether an xwayland view should floatLibravatar Ryan Dwyer2018-09-02
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depends on https://github.com/swaywm/wlroots/pull/1222. I don't know of a program that sets the state to modal without setting the window type, but I know the modal property works because logging the property shows it's true for the Firefox Open File dialog.
* | | | Merge pull request #2554 from emersion/init-dmabuf-global-in-rendererLibravatar emersion2018-09-02
|\ \ \ \ | |_|/ / |/| | | Update for swaywm/wlroots#1216
| * | | Update for swaywm/wlroots#1216Libravatar emersion2018-09-01
| | | |
* | | | Merge pull request #2544 from RyanDwyer/fix-deferred-cmd-crashLibravatar Drew DeVault2018-09-01
|\ \ \ \ | |/ / / |/| | | Fix crash when running deferred commands
| * | | Fix crash when running deferred commandsLibravatar Ryan Dwyer2018-08-31
| | |/ | |/| | | | | | | Fixes #2541
| | * Do not modeset disabled outputsLibravatar emersion2018-09-01
| |/ |/|
* | Merge pull request #2547 from RyanDwyer/fix-reload-crashLibravatar Drew DeVault2018-09-01
|\ \ | | | | | | Fix crash on reload
| * | Allow reload command to exist anywhere in the command stringLibravatar Ryan Dwyer2018-09-01
| | | | | | | | | | | | | | | This fixes a crash if you have commands where reload appears in the middle or at the end, such as `bindsym r mode default, reload`.
| * | Fix crash on reloadLibravatar Ryan Dwyer2018-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If sway is reloaded using a bindsym which has multiple commands, it failed to detect the reload command, didn't create a duplicate of the binding and would crash because the reload command frees the bindings. For example: mode system { bindsym r reload, mode default } In this example, the binding->command is "reload, mode default". Fixes #2545
* | | Merge pull request #2549 from RyanDwyer/border-improvementsLibravatar Drew DeVault2018-09-01
|\ \ \ | | | | | | | | Implement deprecated new_window and new_float commands
| * | | Implement deprecated new_window and new_float commandsLibravatar Ryan Dwyer2018-09-01
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | May as well make it as easy as possible for users who are coming from i3. This also changes the `border` command to accept a thickness when setting the border to normal. This makes it work the same way as the `default_border` command. Eg. `border normal 5`
* | | Merge pull request #2550 from RyanDwyer/window-type-criteriaLibravatar Drew DeVault2018-09-01
|\ \ \ | |/ / |/| | Implement window_type criteria token
| * | Implement window_type criteria tokenLibravatar Ryan Dwyer2018-09-01
|/ /
* | Merge pull request #2546 from RyanDwyer/fix-transaction-spammingLibravatar emersion2018-08-31
|\ \ | |/ |/| Don't send never-ending transactions when a focused layer surface commits
| * Don't send never-ending transactions when a focused layer surface commitsLibravatar Ryan Dwyer2018-08-31
|/ | | | | | | | | | | This moves the arrange_windows call into the arrange_layers function, where we know the output actually needs to be arranged. Additionally, we shouldn't set focus to the parent of an unknown container type, because the parent may be an output and this causes a crash because outputs can't have direct focus. Fixes #2543
* Merge pull request #2537 from ianyfan/commandsLibravatar Drew DeVault2018-08-29
|\ | | | | commands: fix exec quoting