aboutsummaryrefslogtreecommitdiffstats
path: root/sway/server.c
Commit message (Collapse)AuthorAge
* Remove WLR_HAS_XDG_FOREIGN checksLibravatar Simon Ser2021-04-11
| | | | References: https://github.com/swaywm/wlroots/pull/2833
* transactions: Amend pending transactionsLibravatar Kenny Levinsen2021-02-16
| | | | | | | | | | | | | | | | The transaction system contains a necessary optimization where a popped transaction is combined with later, similar transactions. This breaks the chronological order of states, and can lead to desynchronized geometries. To fix this, we replace the queue with only 2 transactions: current and pending. If a pending transaction exists, it is updated with new state instead of creating additional transactions. As we never have more than a single waiting transaction, we no longer need the queue optimization that is causing problems. Closes: https://github.com/swaywm/sway/issues/6012
* xdg-foreign: add v1 and v2 implementationsLibravatar Aleksei Bavshin2021-02-02
| | | | Co-authored-by: Jason Francis <cycl0ps@tuta.io>
* Remove create_renderer_func argumentLibravatar Simon Ser2020-12-30
| | | | | | It's removed upstream [1]. [1]: https://github.com/swaywm/wlroots/pull/2561
* Handle secondary headless backend failuresLibravatar Simon Ser2020-12-08
|
* Drop gtk-primary-selection supportLibravatar Isaac Freund2020-12-08
|
* server: Avoid using "wayland-0" as WAYLAND_DISPLAYLibravatar Geoffrey Casper2020-09-16
| | | | See https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/486
* Unset DISPLAY when wlr_xwayland failsLibravatar Simon Ser2020-07-02
| | | | | Avoids having applications connect to a leftover DISPLAY when Xwayland fails to initialize.
* Implement wlr-foreign-toplevel-management-v1Libravatar Drew DeVault2020-06-23
|
* Add support for viewporterLibravatar Simon Ser2020-06-17
| | | | | | Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2092
* Log Xwayland startup failuresLibravatar Tudor Brindus2020-05-27
| | | | | Though unlikely, this commit makes server initialization totally explicit in the logs.
* Add a secondary headless backendLibravatar Simon Ser2020-05-01
| | | | This allows the create_output command to work on DRM too.
* Port input method and text input from rootstonLibravatar xdavidwu2020-04-04
| | | | | | | This ports swaywm/wlroots#1203, swaywm/wlroots#1303, swaywm/wlroots#1308, swaywm/wlroots#1759 rootston part to sway. Co-Authored-By: Leo Chen <leo881003@gmail.com>
* Add support for wlr-output-power-management-unstable-v1Libravatar Simon Ser2020-02-26
|
* Add sway_surfaceLibravatar Ivan Molodetskikh2019-11-17
| | | | For extending wlr_surface with additional things.
* input: Add support for tablet protocol.Libravatar John Chadwick2019-09-25
| | | | | | Sway has basic support for drawing tablets, but does not expose properties such as pressure sensitivity. This implements the wlr tablet v2 protocol, providing tablet events to Wayland clients.
* cmd_xwayland: add force for immediate launchLibravatar Brian Ashworth2019-08-20
| | | | | | | This just adds a force option to cmd_xwayland that allows for xwayland to be immediately launched instead of lazily launched. This is useful for slower machines so it can be part of the startup time instead of when the user is actively trying to use it
* Remove xdg-shell v6 supportLibravatar Simon Ser2019-08-20
| | | | | | All major toolkits and apps have gained xdg-shell stable support. Closes: https://github.com/swaywm/sway/issues/3690
* Remove all wayland-server.h includesLibravatar Simon Ser2019-07-27
| | | | | | | | | | | | | | | The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration. This commit si similar to wlroots' ca45f4490ccc ("Remove all wayland-server.h includes").
* Update output manager on layout changeLibravatar Josef Gajdusek2019-07-17
| | | | | The output manager config was not properly updated if the position of the output got changed.
* add seat sub command 'xcursor_theme'Libravatar Daniel Eklöf2019-06-05
| | | | | | | | | | New 'seat <name> xcursor_theme <theme> [<size>]' command that configures the default xcursor theme. The default seat's xcursor theme is also propagated to XWayland, and exported through the XCURSOR_THEME and XCURSOR_SIZE environment variables. This is done every time the default seat's configuration is changed.
* Remove orbital gamma-control protocolLibravatar Simon Ser2019-06-02
|
* Implement wlr-output-management-v1Libravatar Josef Gajdusek2019-05-24
|
* Set DISPLAY after initializing XwaylandLibravatar emersion2019-03-04
| | | | This is necessary after https://github.com/swaywm/wlroots/pull/1596
* Add wp-primary-selection-unstable-v1Libravatar emersion2019-02-20
|
* Add relative pointerLibravatar absrd2019-01-30
|
* Implement pointer-constraints-unstable-v1Libravatar Las2019-01-30
|
* 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.
* 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.
* Merge pull request #3144 from emersion/cmd-xwaylandLibravatar Drew DeVault2019-01-13
|\ | | | | Add xwayland command
| * Add xwayland commandLibravatar emersion2018-11-19
| |
* | Add data-control-v1Libravatar emersion2019-01-07
| |
* | Update for swaywm/wlroots#1387Libravatar emersion2018-11-23
|/
* Use #if instead of #ifdefLibravatar emersion2018-11-18
|
* Implement the presentation-time protocolLibravatar emersion2018-10-23
|
* 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).
* 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
* 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.
* Merge branch 'master' into wlroots-1243Libravatar Drew DeVault2018-09-14
|\
| * Additional fix for xdg-outputLibravatar Drew DeVault2018-09-14
| |
* | Merge branch 'master' into wlroots-1243Libravatar Drew DeVault2018-09-14
|\|
| * Postfix xdg-output headersLibravatar Drew DeVault2018-09-14
| | | | | | | | "Doesn't need an update" my ass...
* | Update for swaywm/wlroots#1243Libravatar emersion2018-09-14
|/
* 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 remote-tracking branch 'upstream/master' into fix-freebsd-buildLibravatar sghctoma2018-09-03
|\
| * Update for swaywm/wlroots#1216Libravatar emersion2018-09-01
| |
* | 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.
* Remove layout.cLibravatar Ryan Dwyer2018-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | When we have type safety we'll need to have functions for workspace_add_tiling and so on. This means the existing container functions will be just for containers, so they are being moved to container.c. At this point layout.c doesn't contain much else, so I've relocated everything and removed the file. * container_swap and its static functions have been moved to the swap command and made static. * container_recursive_resize has been moved to the resize command and made static. * The following have been moved to container.c: * container_handle_fullscreen_reparent * container_insert_child * container_add_sibling * container_add_child * container_remove_child * container_replace_child * container_split * enum movement_direction and sway_dir_to_wlr have been moved to util.c. Side note: Several commands included layout.h which then included root.h. With layout.h gone, root.h has to be included by those commands.
* Standardise debug variablesLibravatar Ryan Dwyer2018-08-19
| | | | | | | | | | | | | | | | | | This makes all debug options stored in a single struct rather than in various places, changes/fixes the behaviour of existing options, and introduces some new options. * Fixes damage issues with `-Drender-tree` texture (by removing scissor) * Offsets the render tree overlay's `y` position for those who have swaybar at the top * Replaces `-Ddamage=rerender` with `-Dnodamage` * Replaces `-Ddamage=highlight` with `-Dhighlight-damage` * Replaces `-Dtxn-debug` with `-Dtxn-wait` * Introduces `-Dnoatomic` * Removes the `create_time` and `ms_arranging` figures from transactions and the log message. Transactions are created after arranging and the create time is of no significance. * Fixes `-Dtxn-debug` (now `-Dtxn-wait`) not working.
* Handle views created after decoration mode is sent for xdg-shellLibravatar emersion2018-08-06
|