From 0dcb2da70547d85175df951d3d443e8640a1c244 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 1 Jun 2021 01:55:15 -0300 Subject: [PATCH] wio: unstable-2020-11-02 -> 0.0.0+unstable=2021-06-01 wio was forked to a brand new repository. --- .../window-managers/wio/default.nix | 31 ++- .../window-managers/wio/wlroots-0.13.patch | 254 ------------------ 2 files changed, 17 insertions(+), 268 deletions(-) delete mode 100644 pkgs/applications/window-managers/wio/wlroots-0.13.patch diff --git a/pkgs/applications/window-managers/wio/default.nix b/pkgs/applications/window-managers/wio/default.nix index 72fa23de9dd..485fd0b8a62 100644 --- a/pkgs/applications/window-managers/wio/default.nix +++ b/pkgs/applications/window-managers/wio/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchgit +{ lib +, stdenv +, fetchFromBitbucket , meson , ninja , pkg-config @@ -17,28 +19,29 @@ stdenv.mkDerivation rec { pname = "wio"; - version = "unstable-2020-11-02"; + version = "0.0.0+unstable=2021-06-01"; - src = fetchgit { - url = "https://git.sr.ht/~sircmpwn/wio"; - rev = "31b742e473b15a2087be740d1de28bc2afd47a4d"; - sha256 = "1vpvlahv6dmr7vfb11p5cc5ds2y2vfvcb877nkqx18yin6pg357l"; + src = fetchFromBitbucket { + owner = "anderson_torres"; + repo = pname; + rev = "ad57eb45ba0459cd0b16ba486cb6e01626079c29"; + sha256 = "sha256-mCggAscQ+Ej3SNwhA6QxecV1nH6Rw8RDf8yAsbadqjE="; }; - patches = [ - # To fix the build with wlroots 0.13: - ./wlroots-0.13.patch + nativeBuildInputs = [ + meson + ninja + pkg-config + makeWrapper ]; - - nativeBuildInputs = [ meson ninja pkg-config makeWrapper ]; buildInputs = [ cairo libxkbcommon + mesa # for libEGL udev wayland wayland-protocols wlroots - mesa # for libEGL xwayland ]; @@ -48,15 +51,15 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + homepage = "https://wio-project.org/"; description = "That Plan 9 feel, for Wayland"; longDescription = '' Wio is a Wayland compositor for Linux and FreeBSD which has a similar look and feel to plan9's rio. ''; - homepage = "https://wio-project.org/"; license = licenses.mit; - platforms = with platforms; linux; maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; linux; }; passthru.providedSessions = [ "wio" ]; diff --git a/pkgs/applications/window-managers/wio/wlroots-0.13.patch b/pkgs/applications/window-managers/wio/wlroots-0.13.patch deleted file mode 100644 index 989e812bb53..00000000000 --- a/pkgs/applications/window-managers/wio/wlroots-0.13.patch +++ /dev/null @@ -1,254 +0,0 @@ -commit 8a3f903b20d646ebb2472c4f094ca1bf225a96c7 -Author: Michael Weiss -Date: Fri May 14 19:19:05 2021 +0200 - - Fix the build with wlroots 0.13 - -diff --git a/main.c b/main.c -index 5d7dcda..870fdb0 100644 ---- a/main.c -+++ b/main.c -@@ -1,6 +1,7 @@ - #define _POSIX_C_SOURCE 200809L - #include - #include -+#include - #include - #include - #include -@@ -49,7 +50,7 @@ static void gen_menu_textures(struct wio_server *server) { - cairo_surface_flush(surf); - unsigned char *data = cairo_image_surface_get_data(surf); - server->menu.inactive_textures[i] = wlr_texture_from_pixels(renderer, -- WL_SHM_FORMAT_ARGB8888, -+ DRM_FORMAT_ARGB8888, - cairo_image_surface_get_stride(surf), - extents.width + 2, extents.height + 2, data); - } -@@ -66,7 +67,7 @@ static void gen_menu_textures(struct wio_server *server) { - cairo_surface_flush(surf); - unsigned char *data = cairo_image_surface_get_data(surf); - server->menu.active_textures[i] = wlr_texture_from_pixels(renderer, -- WL_SHM_FORMAT_ARGB8888, -+ DRM_FORMAT_ARGB8888, - cairo_image_surface_get_stride(surf), - extents.width + 2, extents.height + 2, data); - } -@@ -152,7 +153,7 @@ int main(int argc, char **argv) { - } - - server.wl_display = wl_display_create(); -- server.backend = wlr_backend_autocreate(server.wl_display, NULL); -+ server.backend = wlr_backend_autocreate(server.wl_display); - server.renderer = wlr_backend_get_renderer(server.backend); - wlr_renderer_init_wl_display(server.renderer, server.wl_display); - -diff --git a/protocols/wlr-layer-shell-unstable-v1.xml b/protocols/wlr-layer-shell-unstable-v1.xml -index 90b8bc8..d62fd51 100644 ---- a/protocols/wlr-layer-shell-unstable-v1.xml -+++ b/protocols/wlr-layer-shell-unstable-v1.xml -@@ -25,7 +25,7 @@ - THIS SOFTWARE. - - -- -+ - - Clients can use this interface to assign the surface_layer role to - wl_surfaces. Such surfaces are assigned to a "layer" of the output and -@@ -47,6 +47,12 @@ - or manipulate a buffer prior to the first layer_surface.configure call - must also be treated as errors. - -+ After creating a layer_surface object and setting it up, the client -+ must perform an initial commit without any buffer attached. -+ The compositor will reply with a layer_surface.configure event. -+ The client must acknowledge it and is then allowed to attach a buffer -+ to map the surface. -+ - You may pass NULL for output to allow the compositor to decide which - output to use. Generally this will be the one that the user most - recently interacted with. -@@ -82,17 +88,35 @@ - - - -+ -+ -+ -+ -+ -+ This request indicates that the client will not use the layer_shell -+ object any more. Objects that have been created through this instance -+ are not affected. -+ -+ - - -- -+ - - An interface that may be implemented by a wl_surface, for surfaces that - are designed to be rendered as a layer of a stacked desktop-like - environment. - -- Layer surface state (size, anchor, exclusive zone, margin, interactivity) -- is double-buffered, and will be applied at the time wl_surface.commit of -- the corresponding wl_surface is called. -+ Layer surface state (layer, size, anchor, exclusive zone, -+ margin, interactivity) is double-buffered, and will be applied at the -+ time wl_surface.commit of the corresponding wl_surface is called. -+ -+ Attaching a null buffer to a layer surface unmaps it. -+ -+ Unmapping a layer_surface means that the surface cannot be shown by the -+ compositor until it is explicitly mapped again. The layer_surface -+ returns to the state it had right after layer_shell.get_layer_surface. -+ The client can re-map the surface by performing a commit without any -+ buffer attached, waiting for a configure event and handling it as usual. - - - -@@ -127,14 +151,19 @@ - - - -- Requests that the compositor avoids occluding an area of the surface -- with other surfaces. The compositor's use of this information is -+ Requests that the compositor avoids occluding an area with other -+ surfaces. The compositor's use of this information is - implementation-dependent - do not assume that this region will not - actually be occluded. - -- A positive value is only meaningful if the surface is anchored to an -- edge, rather than a corner. The zone is the number of surface-local -- coordinates from the edge that is considered exclusive. -+ A positive value is only meaningful if the surface is anchored to one -+ edge or an edge and both perpendicular edges. If the surface is not -+ anchored, anchored to only two perpendicular edges (a corner), anchored -+ to only two parallel edges or anchored to all edges, a positive value -+ will be treated the same as zero. -+ -+ A positive zone is the distance from the edge in surface-local -+ coordinates to consider exclusive. - - Surfaces that do not wish to have an exclusive zone may instead specify - how they should interact with surfaces that do. If set to zero, the -@@ -174,21 +203,85 @@ - - - -+ -+ -+ Types of keyboard interaction possible for layer shell surfaces. The -+ rationale for this is twofold: (1) some applications are not interested -+ in keyboard events and not allowing them to be focused can improve the -+ desktop experience; (2) some applications will want to take exclusive -+ keyboard focus. -+ -+ -+ -+ -+ This value indicates that this surface is not interested in keyboard -+ events and the compositor should never assign it the keyboard focus. -+ -+ This is the default value, set for newly created layer shell surfaces. -+ -+ This is useful for e.g. desktop widgets that display information or -+ only have interaction with non-keyboard input devices. -+ -+ -+ -+ -+ Request exclusive keyboard focus if this surface is above the shell surface layer. -+ -+ For the top and overlay layers, the seat will always give -+ exclusive keyboard focus to the top-most layer which has keyboard -+ interactivity set to exclusive. If this layer contains multiple -+ surfaces with keyboard interactivity set to exclusive, the compositor -+ determines the one receiving keyboard events in an implementation- -+ defined manner. In this case, no guarantee is made when this surface -+ will receive keyboard focus (if ever). -+ -+ For the bottom and background layers, the compositor is allowed to use -+ normal focus semantics. -+ -+ This setting is mainly intended for applications that need to ensure -+ they receive all keyboard events, such as a lock screen or a password -+ prompt. -+ -+ -+ -+ -+ This requests the compositor to allow this surface to be focused and -+ unfocused by the user in an implementation-defined manner. The user -+ should be able to unfocus this surface even regardless of the layer -+ it is on. -+ -+ Typically, the compositor will want to use its normal mechanism to -+ manage keyboard focus between layer shell surfaces with this setting -+ and regular toplevels on the desktop layer (e.g. click to focus). -+ Nevertheless, it is possible for a compositor to require a special -+ interaction to focus or unfocus layer shell surfaces (e.g. requiring -+ a click even if focus follows the mouse normally, or providing a -+ keybinding to switch focus between layers). -+ -+ This setting is mainly intended for desktop shell components (e.g. -+ panels) that allow keyboard interaction. Using this option can allow -+ implementing a desktop shell that can be fully usable without the -+ mouse. -+ -+ -+ -+ - - -- Set to 1 to request that the seat send keyboard events to this layer -- surface. For layers below the shell surface layer, the seat will use -- normal focus semantics. For layers above the shell surface layers, the -- seat will always give exclusive keyboard focus to the top-most layer -- which has keyboard interactivity set to true. -+ Set how keyboard events are delivered to this surface. By default, -+ layer shell surfaces do not receive keyboard events; this request can -+ be used to change this. -+ -+ This setting is inherited by child surfaces set by the get_popup -+ request. - - Layer surfaces receive pointer, touch, and tablet events normally. If - you do not want to receive them, set the input region on your surface - to an empty region. - -- Events is double-buffered, see wl_surface.commit. -+ Keyboard interactivity is double-buffered, see wl_surface.commit. - -- -+ - - - -@@ -273,6 +366,7 @@ - - - -+ - - - -@@ -281,5 +375,16 @@ - - - -+ -+ -+ -+ -+ -+ Change the layer that the surface is rendered on. -+ -+ Layer is double-buffered, see wl_surface.commit. -+ -+ -+ - -