#9 sway 1.5
Merged 3 years ago by alebastr. Opened 3 years ago by alebastr.
rpms/ alebastr/sway master  into  master

file modified
+2 -24
@@ -1,24 +1,2 @@ 

- /0.9.tar.gz

- /0.10-rc1.tar.gz

- /0.10-rc2.tar.gz

- /0.10-rc3.tar.gz

- /0.10.tar.gz

- /0.11-rc2.tar.gz

- /0.11-rc3.tar.gz

- /0.11.tar.gz

- /sway-b3c0aa3.tar.gz

- /sway-0.12-rc1.tar.gz

- /sway-0.12-rc2.tar.gz

- /sway-0.12.tar.gz

- /sway-0.12.1.tar.gz

- /sway-0.12.2.tar.gz

- /sway-0.13.0.tar.gz

- /sway-0.14.0.tar.gz

- /sway-0.15-rc1.tar.gz

- /sway-0.15.0.tar.gz

- /sway-0.15.1.tar.gz

- /sway-0.15.2.tar.gz

- /sway-1.0.tar.gz

- /sway-1.1.1.tar.gz

- /sway-1.2.tar.gz

- /sway-1.4.tar.gz

+ /sway-*.tar.gz

+ /sway-*.tar.gz.sig

empty or binary file added
@@ -1,44 +0,0 @@ 

- From 29a5ce5f65d04b046271fbe53850836c77bbee80 Mon Sep 17 00:00:00 2001

- From: thermitegod <thermitethegod@gmail.com>

- Date: Thu, 23 Jan 2020 18:12:00 -0700

- Subject: [PATCH] Fix compiling with -fno-common

- 

- ---

-  include/sway/server.h | 4 ++--

-  sway/main.c           | 1 +

-  2 files changed, 3 insertions(+), 2 deletions(-)

- 

- diff --git a/include/sway/server.h b/include/sway/server.h

- index 5b34852ca..2e8e46339 100644

- --- a/include/sway/server.h

- +++ b/include/sway/server.h

- @@ -78,7 +78,7 @@ struct sway_server {

-  	list_t *dirty_nodes;

-  };

-  

- -struct sway_server server;

- +extern struct sway_server server;

-  

-  struct sway_debug {

-  	bool noatomic;         // Ignore atomic layout updates

- @@ -92,7 +92,7 @@ struct sway_debug {

-  	} damage;

-  };

-  

- -struct sway_debug debug;

- +extern struct sway_debug debug;

-  

-  /* Prepares an unprivileged server_init by performing all privileged operations in advance */

-  bool server_privileged_prepare(struct sway_server *server);

- diff --git a/sway/main.c b/sway/main.c

- index 2cc69dfb5..e0af4a799 100644

- --- a/sway/main.c

- +++ b/sway/main.c

- @@ -27,6 +27,7 @@

-  static bool terminate_request = false;

-  static int exit_value = 0;

-  struct sway_server server = {0};

- +struct sway_debug debug = {0};

-  

-  void sway_terminate(int exit_code) {

-  	if (!server.wl_display) {

@@ -1,233 +0,0 @@ 

- From 487e59ba6e6e54c309c420604685892f50d1a55f Mon Sep 17 00:00:00 2001

- From: David96 <david@hameipe.de>

- Date: Tue, 3 Dec 2019 16:03:38 +0100

- Subject: [PATCH 1/2] Render layer shell popups over the top layer

- 

- ---

-  include/sway/output.h |  8 +++++++

-  sway/desktop/output.c | 55 +++++++++++++++++++++++++++++++++++++++++++

-  sway/desktop/render.c | 31 +++++++++++++++++++-----

-  3 files changed, 88 insertions(+), 6 deletions(-)

- 

- diff --git a/include/sway/output.h b/include/sway/output.h

- index 4771b14f1..cabb4b557 100644

- --- a/include/sway/output.h

- +++ b/include/sway/output.h

- @@ -125,6 +125,14 @@ void output_layer_for_each_surface(struct sway_output *output,

-  	struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,

-  	void *user_data);

-  

- +void output_layer_for_each_surface_toplevel(struct sway_output *output,

- +	struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,

- +	void *user_data);

- +

- +void output_layer_for_each_surface_popup(struct sway_output *output,

- +	struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,

- +	void *user_data);

- +

-  #if HAVE_XWAYLAND

-  void output_unmanaged_for_each_surface(struct sway_output *output,

-  	struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,

- diff --git a/sway/desktop/output.c b/sway/desktop/output.c

- index e6ed9be0d..880d4375f 100644

- --- a/sway/desktop/output.c

- +++ b/sway/desktop/output.c

- @@ -243,6 +243,61 @@ void output_layer_for_each_surface(struct sway_output *output,

-  	}

-  }

-  

- +void output_layer_for_each_surface_toplevel(struct sway_output *output,

- +		struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,

- +		void *user_data) {

- +	struct sway_layer_surface *layer_surface;

- +	wl_list_for_each(layer_surface, layer_surfaces, link) {

- +		struct wlr_layer_surface_v1 *wlr_layer_surface_v1 =

- +			layer_surface->layer_surface;

- +		output_surface_for_each_surface(output, wlr_layer_surface_v1->surface,

- +			layer_surface->geo.x, layer_surface->geo.y, iterator,

- +			user_data);

- +	}

- +}

- +

- +

- +void output_layer_for_each_surface_popup(struct sway_output *output,

- +		struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,

- +		void *user_data) {

- +	struct sway_layer_surface *layer_surface;

- +	wl_list_for_each(layer_surface, layer_surfaces, link) {

- +		struct wlr_layer_surface_v1 *wlr_layer_surface_v1 =

- +			layer_surface->layer_surface;

- +

- +		struct wlr_xdg_popup *state;

- +		wl_list_for_each(state, &wlr_layer_surface_v1->popups, link) {

- +			struct wlr_xdg_surface *popup = state->base;

- +			if (!popup->configured) {

- +				continue;

- +			}

- +

- +			double popup_sx, popup_sy;

- +			popup_sx = layer_surface->geo.x +

- +				popup->popup->geometry.x - popup->geometry.x;

- +			popup_sy = layer_surface->geo.y +

- +				popup->popup->geometry.y - popup->geometry.y;

- +

- +			struct wlr_surface *surface = popup->surface;

- +

- +			struct surface_iterator_data data = {

- +				.user_iterator = iterator,

- +				.user_data = user_data,

- +				.output = output,

- +				.view = NULL,

- +				.ox = popup_sx,

- +				.oy = popup_sy,

- +				.width = surface->current.width,

- +				.height = surface->current.height,

- +				.rotation = 0,

- +			};

- +

- +			wlr_xdg_surface_for_each_surface(

- +					popup, output_for_each_surface_iterator, &data);

- +		}

- +	}

- +}

- +

-  #if HAVE_XWAYLAND

-  void output_unmanaged_for_each_surface(struct sway_output *output,

-  		struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,

- diff --git a/sway/desktop/render.c b/sway/desktop/render.c

- index 477034fc9..14753df24 100644

- --- a/sway/desktop/render.c

- +++ b/sway/desktop/render.c

- @@ -156,13 +156,23 @@ static void render_surface_iterator(struct sway_output *output, struct sway_view

-  		wlr_output);

-  }

-  

- -static void render_layer(struct sway_output *output,

- +static void render_layer_toplevel(struct sway_output *output,

-  		pixman_region32_t *damage, struct wl_list *layer_surfaces) {

-  	struct render_data data = {

-  		.damage = damage,

-  		.alpha = 1.0f,

-  	};

- -	output_layer_for_each_surface(output, layer_surfaces,

- +	output_layer_for_each_surface_toplevel(output, layer_surfaces,

- +		render_surface_iterator, &data);

- +}

- +

- +static void render_layer_popups(struct sway_output *output,

- +		pixman_region32_t *damage, struct wl_list *layer_surfaces) {

- +	struct render_data data = {

- +		.damage = damage,

- +		.alpha = 1.0f,

- +	};

- +	output_layer_for_each_surface_popup(output, layer_surfaces,

-  		render_surface_iterator, &data);

-  }

-  

- @@ -1041,9 +1051,9 @@ void output_render(struct sway_output *output, struct timespec *when,

-  			wlr_renderer_clear(renderer, clear_color);

-  		}

-  

- -		render_layer(output, damage,

- +		render_layer_toplevel(output, damage,

-  			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);

- -		render_layer(output, damage,

- +		render_layer_toplevel(output, damage,

-  			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);

-  

-  		render_workspace(output, damage, workspace, workspace->current.focused);

- @@ -1051,7 +1061,14 @@ void output_render(struct sway_output *output, struct timespec *when,

-  #if HAVE_XWAYLAND

-  		render_unmanaged(output, damage, &root->xwayland_unmanaged);

-  #endif

- -		render_layer(output, damage,

- +		render_layer_toplevel(output, damage,

- +			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);

- +

- +		render_layer_popups(output, damage,

- +			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);

- +		render_layer_popups(output, damage,

- +			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);

- +		render_layer_popups(output, damage,

-  			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);

-  	}

-  

- @@ -1064,7 +1081,9 @@ void output_render(struct sway_output *output, struct timespec *when,

-  	}

-  

-  render_overlay:

- -	render_layer(output, damage,

- +	render_layer_toplevel(output, damage,

- +		&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);

- +	render_layer_popups(output, damage,

-  		&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);

-  	render_drag_icons(output, damage, &root->drag_icons);

-  

- 

- From 1cec05961413212c175ec979a7b2ddbb2f50a6a0 Mon Sep 17 00:00:00 2001

- From: Aleksei Bavshin <alebastr89@gmail.com>

- Date: Thu, 27 Feb 2020 17:55:55 -0800

- Subject: [PATCH 2/2] Adjust focus order to match rendering order of layer

-  shell popups.

- 

- ---

-  sway/input/cursor.c | 39 +++++++++++++++++++++++++++++++++++++++

-  1 file changed, 39 insertions(+)

- 

- diff --git a/sway/input/cursor.c b/sway/input/cursor.c

- index 3a4a69b67..c2a58060d 100644

- --- a/sway/input/cursor.c

- +++ b/sway/input/cursor.c

- @@ -52,6 +52,30 @@ static struct wlr_surface *layer_surface_at(struct sway_output *output,

-  	return NULL;

-  }

-  

- +static bool surface_is_xdg_popup(struct wlr_surface *surface) {

- +    if (wlr_surface_is_xdg_surface(surface)) {

- +        struct wlr_xdg_surface *xdg_surface =

- +            wlr_xdg_surface_from_wlr_surface(surface);

- +        return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP;

- +    }

- +    return false;

- +}

- +

- +static struct wlr_surface *layer_surface_popup_at(struct sway_output *output,

- +		struct wl_list *layer, double ox, double oy, double *sx, double *sy) {

- +	struct sway_layer_surface *sway_layer;

- +	wl_list_for_each_reverse(sway_layer, layer, link) {

- +		double _sx = ox - sway_layer->geo.x;

- +		double _sy = oy - sway_layer->geo.y;

- +		struct wlr_surface *sub = wlr_layer_surface_v1_surface_at(

- +			sway_layer->layer_surface, _sx, _sy, sx, sy);

- +		if (sub && surface_is_xdg_popup(sub)) {

- +			return sub;

- +		}

- +	}

- +	return NULL;

- +}

- +

-  /**

-   * Returns the node at the cursor's position. If there is a surface at that

-   * location, it is stored in **surface (it may not be a view).

- @@ -132,6 +156,21 @@ struct sway_node *node_at_coords(

-  		}

-  		return NULL;

-  	}

- +	if ((*surface = layer_surface_popup_at(output,

- +				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],

- +				ox, oy, sx, sy))) {

- +		return NULL;

- +	}

- +	if ((*surface = layer_surface_popup_at(output,

- +				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],

- +				ox, oy, sx, sy))) {

- +		return NULL;

- +	}

- +	if ((*surface = layer_surface_popup_at(output,

- +				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],

- +				ox, oy, sx, sy))) {

- +		return NULL;

- +	}

-  	if ((*surface = layer_surface_at(output,

-  				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],

-  				ox, oy, sx, sy))) {

file modified
+2 -1
@@ -1,1 +1,2 @@ 

- SHA512 (sway-1.4.tar.gz) = 3b280bdfdbdae8fb9b4f555bc630c64e7c1d09f7b2c783b99413863a6b620d50cd2b6d10d63e11fdfb9c678fce9a403228ac52fa69fb52561ffbd06790505a71

+ SHA512 (sway-1.5.tar.gz) = 702e44f8923a4ca05d831dd7ed76165654f113a8b2754d332c509ee844528f47c52b7f21deca78d4a79dad465cbcd0934574fff4ad9bb7a45aec3124dea5bca4

+ SHA512 (sway-1.5.tar.gz.sig) = 05f985bf77704503ad9988cb3a95716413c77c9962b46bb0406cdb8f61f9e01b76bccb934839b4ac2923b818572660bd60066d03962392efe2db84dde3476a42

@@ -1,23 +0,0 @@ 

- commit 45ac9648bf1c1d1d9a75c5a6097c2a32e7c0392f

- Author: Till Hofmann <thofmann@fedoraproject.org>

- Date:   Sun Feb 9 13:03:52 2020 +0100

- 

-     Avoid calling strcmp on nullptr

-     

-     The function group_handler may get a nullptr as `new_group`. If that's

-     the case, return -1, as if `new_group` was the empty string.

- 

- diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c

- index 8adefda6..c383bc63 100644

- --- a/swaybar/tray/icon.c

- +++ b/swaybar/tray/icon.c

- @@ -89,6 +89,9 @@ static bool validate_icon_theme(struct icon_theme *theme) {

-  static bool group_handler(char *old_group, char *new_group,

-  		struct icon_theme *theme) {

-  	if (!old_group) { // first group must be "Icon Theme"

- +		if (!new_group) {

- +			return -1;

- +		}

-  		return strcmp(new_group, "Icon Theme");

-  	}

-  

file modified
+26 -26
@@ -1,42 +1,36 @@ 

  Name:           sway

- Version:        1.4

- Release:        7%{?dist}

+ Version:        1.5

+ Release:        1%{?dist}

  Summary:        i3-compatible window manager for Wayland

  License:        MIT

  URL:            https://github.com/swaywm/sway

  Source0:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz

- Patch1:         https://github.com/swaywm/sway/commit/29a5ce5f65d04b046271fbe53850836c77bbee80.patch#/link-with-fno-common.patch

- Patch2:         https://github.com/swaywm/sway/pull/4991.patch#/sway.fix-null-strcmp.patch

- Patch3:         %{url}/pull/4781.patch#/render-layer-shell-popups-over-the-top-layer.patch

- 

- # FIXME: wlroots require `pkgconfig(egl)`, but assumes mesa provides it

- # (and uses it's extension header `<EGL/eglmesaext.h>).

- # Upstream is working on not needing that: https://github.com/swaywm/wlroots/issues/1899

- # Until it is fixed, pull mesa-libEGL-devel manually

- BuildRequires:  pkgconfig(egl) mesa-libEGL-devel

- BuildRequires:  cmake

+ Source1:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.sig

+ # Drew DeVault (sway signing key) <sway@cmpwn.com>

+ # Imported from http://pgp.mit.edu/pks/lookup?op=vindex&search=0x52CB6609B22DA89A

+ Source2:        gpgkey-9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A.gpg

+ 

  BuildRequires:  gcc-c++

- BuildRequires:  make

- BuildRequires:  meson >= 0.48.0

- BuildRequires:  pam-devel

+ BuildRequires:  gnupg2

+ BuildRequires:  meson >= 0.53.0

  BuildRequires:  pkgconfig(cairo)

- BuildRequires:  pkgconfig(dbus-1)

  BuildRequires:  pkgconfig(gdk-pixbuf-2.0)

  BuildRequires:  pkgconfig(json-c) >= 0.13

- BuildRequires:  pkgconfig(libcap)

+ BuildRequires:  pkgconfig(libevdev)

  BuildRequires:  pkgconfig(libinput) >= 1.6.0

  BuildRequires:  pkgconfig(libpcre)

+ BuildRequires:  pkgconfig(libsystemd) >= 239

  BuildRequires:  pkgconfig(pango)

+ BuildRequires:  pkgconfig(pangocairo)

+ BuildRequires:  pkgconfig(scdoc)

  BuildRequires:  pkgconfig(wayland-client)

  BuildRequires:  pkgconfig(wayland-cursor)

  BuildRequires:  pkgconfig(wayland-egl)

  BuildRequires:  pkgconfig(wayland-server)

  BuildRequires:  pkgconfig(wayland-protocols) >= 1.14

- BuildRequires:  pkgconfig(wlroots) >= 0.10.0

- BuildRequires:  wayland-devel

- BuildRequires:  libevdev-devel

- BuildRequires:  git

- BuildRequires:  scdoc

+ BuildRequires:  pkgconfig(wlroots) >= 0.11.0

+ BuildRequires:  pkgconfig(xcb)

+ BuildRequires:  pkgconfig(xkbcommon)

  # Dmenu is the default launcher in sway

  Recommends:     dmenu

  # In addition, xargs is recommended for use in such a launcher arrangement
@@ -52,7 +46,8 @@ 

  # dmenu (as well as rxvt any many others) requires XWayland on Sway

  Requires:       xorg-x11-server-Xwayland

  # Sway binds the terminal shortcut to one specific terminal. In our case urxvtc-ml

- Recommends:     rxvt-unicode-256color-ml

+ # Use file dependency because the package rxvt-unicode-256color-ml does not exist in f32+

+ Recommends:     %{_bindir}/urxvt256c-ml

  # grim is the recommended way to take screenshots on sway 1.0+

  Recommends:     grim

  
@@ -61,7 +56,8 @@ 

  i3-compatible configuration.

  

  %prep

- %autosetup -p 1

+ %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'

+ %autosetup -p1

  

  %build

  %meson
@@ -79,8 +75,6 @@ 

  %doc README.md

  %dir %{_sysconfdir}/sway

  %config(noreplace) %{_sysconfdir}/sway/config

- %dir %{_sysconfdir}/sway/security.d

- %config(noreplace) %{_sysconfdir}/sway/security.d/00-defaults

  %{_mandir}/man1/*

  %{_mandir}/man5/*

  %{_mandir}/man7/*
@@ -101,6 +95,12 @@ 

  %{_datadir}/backgrounds/sway

  

  %changelog

+ * Wed Jul 15 2020 Aleksei Bavshin <alebastr89@gmail.com> - 1.5-1

+ - Update to 1.5

+ - Fix urxvt256c-ml dependency for f32+

+ - Add source verification

+ - Cleanup build dependencies

+ 

  * Sat May 30 2020 Jan Pokorný <jpokorny@fedoraproject.org> 1.4-7

  - Enhance greenfield readiness with optional pull of default driver set & xargs

  

Changes:

  • Fix urxvt256c-ml dependency for f32+
  • Add source verification
  • Cleanup build dependencies (adjusted to match dependencies from sway's meson.build. mesa-libEGL-devel should be a transitive dependency of wlroots-devel)
  • Update to v1.5

Build status:

  • f31 - fails; wlroots requires wayland-devel >= 1.18
  • f32 - ok with mesa-libEGL-devel
  • f33 - ok with libglvnd-devel = 1.3.2

Let's also discuss if we want to add something similar to https://git.archlinux.org/svntogit/community.git/tree/trunk/50-systemd-user.conf?h=packages/sway. Sway upstream leaves everything related to systemd and login manager integration to downstreams, so it's up to us to have a good default configuration.

4 new commits added

  • Update to v1.5-rc2
  • Cleanup build dependencies
  • Add source verification
  • Use file dependency for Recommends: rxvt-unicode-256color-ml.
3 years ago

This is still missing an update to the sources, right?

This is still missing an update to the sources, right?

Right. I didn't want to upload pre-release archives into dist-git and there's no other reason to touch sources.
If you want to build it locally, you can use spectool -g sway.spec (and wlroots from my fork on src.fp.o). And I posted copr link with all builds into rhbz#1850836

4 new commits added

  • Update to v1.5
  • Cleanup build dependencies
  • Add source verification
  • Use file dependency for Recommends: rxvt-unicode-256color-ml.
3 years ago

4 new commits added

  • Update to v1.5
  • Cleanup build dependencies
  • Add source verification
  • Use file dependency for Recommends: rxvt-unicode-256color-ml.
3 years ago

Pull-Request has been merged by alebastr

3 years ago