]> git.pld-linux.org Git - packages/sway.git/commitdiff
up to 1.6 auto/th/sway-1.6-1
authorJan Palus <atler@pld-linux.org>
Wed, 7 Apr 2021 21:23:02 +0000 (23:23 +0200)
committerJan Palus <atler@pld-linux.org>
Wed, 7 Apr 2021 21:23:02 +0000 (23:23 +0200)
sway-i3_ipc_compat.patch [deleted file]
sway.spec

diff --git a/sway-i3_ipc_compat.patch b/sway-i3_ipc_compat.patch
deleted file mode 100644 (file)
index cff03a4..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-From 37da1dcbcaf38bd0ae5dbfa330414d6468b82d4c Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus@fastmail.com>
-Date: Thu, 4 Feb 2021 00:50:27 +0100
-Subject: [PATCH] Align ordering of core node properties with i3
-
-Try to better mimic JSON node structure produced by i3 which might be
-relied on by already existing tools. In particular having "type" right
-after "id" is quite handy for streaming high-performance JSON parsers
-such as simdjson (which are handy for maintaining responsiveness on
-resource constrained systems).
-
-refer https://github.com/i3/i3/blob/ab2a22a78b25ad12fed2c177a34c44950795cf33/src/ipc.c#L338
----
- sway/ipc-json.c | 72 ++++++++++++++++++++++++++-----------------------
- 1 file changed, 39 insertions(+), 33 deletions(-)
-
-diff --git a/sway/ipc-json.c b/sway/ipc-json.c
-index fceee84d..11802ba6 100644
---- a/sway/ipc-json.c
-+++ b/sway/ipc-json.c
-@@ -23,6 +23,20 @@
- static const int i3_output_id = INT32_MAX;
- static const int i3_scratch_id = INT32_MAX - 1;
-+static const char *ipc_json_node_type_description(enum sway_node_type l) {
-+      switch (l) {
-+      case N_ROOT:
-+              return "root";
-+      case N_OUTPUT:
-+              return "output";
-+      case N_WORKSPACE:
-+              return "workspace";
-+      case N_CONTAINER:
-+              return "con";
-+      }
-+      return "none";
-+}
-+
- static const char *ipc_json_layout_description(enum sway_container_layout l) {
-       switch (l) {
-       case L_VERT:
-@@ -189,16 +203,22 @@ static json_object *ipc_json_create_empty_rect(void) {
-       return ipc_json_create_rect(&empty);
- }
--static json_object *ipc_json_create_node(int id, char *name,
-+static json_object *ipc_json_create_node(int id, const char* type, char *name,
-               bool focused, json_object *focus, struct wlr_box *box) {
-       json_object *object = json_object_new_object();
-       json_object_object_add(object, "id", json_object_new_int(id));
--      json_object_object_add(object, "name",
--                      name ? json_object_new_string(name) : NULL);
--      json_object_object_add(object, "rect", ipc_json_create_rect(box));
-+      json_object_object_add(object, "type", json_object_new_string(type));
-+      json_object_object_add(object, "orientation",
-+                      json_object_new_string(
-+                              ipc_json_orientation_description(L_HORIZ)));
-+      json_object_object_add(object, "percent", NULL);
-+      json_object_object_add(object, "urgent", json_object_new_boolean(false));
-+      json_object_object_add(object, "marks", json_object_new_array());
-       json_object_object_add(object, "focused", json_object_new_boolean(focused));
--      json_object_object_add(object, "focus", focus);
-+      json_object_object_add(object, "layout",
-+                      json_object_new_string(
-+                              ipc_json_layout_description(L_HORIZ)));
-       // set default values to be compatible with i3
-       json_object_object_add(object, "border",
-@@ -206,35 +226,25 @@ static json_object *ipc_json_create_node(int id, char *name,
-                               ipc_json_border_description(B_NONE)));
-       json_object_object_add(object, "current_border_width",
-                       json_object_new_int(0));
--      json_object_object_add(object, "layout",
--                      json_object_new_string(
--                              ipc_json_layout_description(L_HORIZ)));
--      json_object_object_add(object, "orientation",
--                      json_object_new_string(
--                              ipc_json_orientation_description(L_HORIZ)));
--      json_object_object_add(object, "percent", NULL);
--      json_object_object_add(object, "window_rect", ipc_json_create_empty_rect());
-+      json_object_object_add(object, "rect", ipc_json_create_rect(box));
-       json_object_object_add(object, "deco_rect", ipc_json_create_empty_rect());
-+      json_object_object_add(object, "window_rect", ipc_json_create_empty_rect());
-       json_object_object_add(object, "geometry", ipc_json_create_empty_rect());
-+      json_object_object_add(object, "name",
-+                      name ? json_object_new_string(name) : NULL);
-       json_object_object_add(object, "window", NULL);
--      json_object_object_add(object, "urgent", json_object_new_boolean(false));
--      json_object_object_add(object, "marks", json_object_new_array());
--      json_object_object_add(object, "fullscreen_mode", json_object_new_int(0));
-       json_object_object_add(object, "nodes", json_object_new_array());
-       json_object_object_add(object, "floating_nodes", json_object_new_array());
-+      json_object_object_add(object, "focus", focus);
-+      json_object_object_add(object, "fullscreen_mode", json_object_new_int(0));
-       json_object_object_add(object, "sticky", json_object_new_boolean(false));
-       return object;
- }
--static void ipc_json_describe_root(struct sway_root *root, json_object *object) {
--      json_object_object_add(object, "type", json_object_new_string("root"));
--}
--
- static void ipc_json_describe_output(struct sway_output *output,
-               json_object *object) {
-       struct wlr_output *wlr_output = output->wlr_output;
--      json_object_object_add(object, "type", json_object_new_string("output"));
-       json_object_object_add(object, "active", json_object_new_boolean(true));
-       json_object_object_add(object, "dpms",
-                       json_object_new_boolean(wlr_output->enabled));
-@@ -369,11 +379,9 @@ static json_object *ipc_json_describe_scratchpad_output(void) {
-                               json_object_new_int(container->node.id));
-       }
--      json_object *workspace = ipc_json_create_node(i3_scratch_id,
-+      json_object *workspace = ipc_json_create_node(i3_scratch_id, "workspace",
-                               "__i3_scratch", false, workspace_focus, &box);
-       json_object_object_add(workspace, "fullscreen_mode", json_object_new_int(1));
--      json_object_object_add(workspace, "type",
--                      json_object_new_string("workspace"));
-       // List all hidden scratchpad containers as floating nodes
-       json_object *floating_array = json_object_new_array();
-@@ -390,10 +398,8 @@ static json_object *ipc_json_describe_scratchpad_output(void) {
-       json_object *output_focus = json_object_new_array();
-       json_object_array_add(output_focus, json_object_new_int(i3_scratch_id));
--      json_object *output = ipc_json_create_node(i3_output_id,
-+      json_object *output = ipc_json_create_node(i3_output_id, "output",
-                                       "__i3", false, output_focus, &box);
--      json_object_object_add(output, "type",
--                      json_object_new_string("output"));
-       json_object_object_add(output, "layout",
-                       json_object_new_string("output"));
-@@ -423,7 +429,6 @@ static void ipc_json_describe_workspace(struct sway_workspace *workspace,
-       json_object_object_add(object, "fullscreen_mode", json_object_new_int(1));
-       json_object_object_add(object, "output", workspace->output ?
-                       json_object_new_string(workspace->output->wlr_output->name) : NULL);
--      json_object_object_add(object, "type", json_object_new_string("workspace"));
-       json_object_object_add(object, "urgent",
-                       json_object_new_boolean(workspace->urgent));
-       json_object_object_add(object, "representation", workspace->representation ?
-@@ -583,8 +588,10 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
- static void ipc_json_describe_container(struct sway_container *c, json_object *object) {
-       json_object_object_add(object, "name",
-                       c->title ? json_object_new_string(c->title) : NULL);
--      json_object_object_add(object, "type",
--                      json_object_new_string(container_is_floating(c) ? "floating_con" : "con"));
-+      if (container_is_floating(c)) {
-+              json_object_object_add(object, "type",
-+                              json_object_new_string("floating_con"));
-+      }
-       json_object_object_add(object, "layout",
-                       json_object_new_string(
-@@ -692,12 +699,11 @@ json_object *ipc_json_describe_node(struct sway_node *node) {
-       };
-       seat_for_each_node(seat, focus_inactive_children_iterator, &data);
--      json_object *object = ipc_json_create_node(
--                              (int)node->id, name, focused, focus, &box);
-+      json_object *object = ipc_json_create_node((int)node->id,
-+                              ipc_json_node_type_description(node->type), name, focused, focus, &box);
-       switch (node->type) {
-       case N_ROOT:
--              ipc_json_describe_root(root, object);
-               break;
-       case N_OUTPUT:
-               ipc_json_describe_output(node->sway_output, object);
--- 
-2.30.1
-
index 0e5777f3277beaea8c93fd8db37f51a6272610f4..735bc8e2661dae70ea0857920ce2d83ed2eda2d6 100644 (file)
--- a/sway.spec
+++ b/sway.spec
@@ -1,19 +1,19 @@
 Summary:       i3-compatible Wayland compositor
 Name:          sway
-Version:       1.5.1
+Version:       1.6
 Release:       1
 License:       MIT
 Group:         Applications
 Source0:       https://github.com/swaywm/sway/releases/download/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 9a7edc89abfc3f36d47546457e0bc901
+# Source0-md5: a44921207cd8faaf7c80f97518bb2492
 Patch0:                x32.patch
-Patch1:                %{name}-i3_ipc_compat.patch
 URL:           https://swaywm.org/
 BuildRequires: OpenGLESv2-devel
 BuildRequires: bash-completion
 BuildRequires: cairo-devel
 BuildRequires: gdk-pixbuf2-devel
 BuildRequires: json-c-devel >= 0.13
+BuildRequires: libdrm-devel
 BuildRequires: libevdev-devel
 BuildRequires: libinput-devel >= 1.6.0
 BuildRequires: libxcb-devel
@@ -25,14 +25,15 @@ BuildRequires:      pixman-devel
 BuildRequires: rpmbuild(macros) >= 1.752
 BuildRequires: scdoc >= 1.9.2
 BuildRequires: systemd-devel >= 239
+BuildRequires: udev-devel
 BuildRequires: wayland-devel
 BuildRequires: wayland-protocols >= 1.14
-BuildRequires: wlroots-devel >= 0.12.0
+BuildRequires: wlroots-devel >= 0.13.0
 BuildRequires: xorg-lib-libxkbcommon-devel
 Requires:      json-c >= 0.13
 Requires:      libinput >= 1.6.0
 Requires:      systemd-libs >= 239
-Requires:      wlroots >= 0.12.0
+Requires:      wlroots >= 0.13.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -87,7 +88,6 @@ ZSH completion for sway.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %meson build
This page took 0.190239 seconds and 4 git commands to generate.