forked from kiss-community/repo
sway{-no-seat,-tiny}: drop
This commit is contained in:
parent
30107ff240
commit
55083f383c
@ -1 +0,0 @@
|
||||
../sway/README
|
@ -1,32 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
for p in *.patch; do
|
||||
patch -p1 < "$p"
|
||||
done
|
||||
|
||||
# Build fails in subprojects/seatd with clang
|
||||
# due to -Werror -> -Wsign-compare.
|
||||
export CFLAGS="-Wno-error $CFLAGS"
|
||||
|
||||
# Default background color.
|
||||
sed 's/0.25f, 0.25f, 0.25f/0.929, 0.870, 0.678/' \
|
||||
sway/desktop/render.c > _
|
||||
mv -f _ sway/desktop/render.c
|
||||
|
||||
meson \
|
||||
--prefix=/usr \
|
||||
-Ddefault-wallpaper=false \
|
||||
-Dzsh-completions=false \
|
||||
-Dbash-completions=false \
|
||||
-Dfish-completions=false \
|
||||
-Dxwayland=disabled \
|
||||
-Dwlroots:examples=false \
|
||||
-Dwlroots:xcb-errors=disabled \
|
||||
-Dwlroots:default_library=static \
|
||||
-Dseatd:libseat-builtin=enabled \
|
||||
-Dseatd:default_library=static \
|
||||
--force-fallback-for=wlroots,seatd \
|
||||
. build
|
||||
|
||||
ninja -C build
|
||||
meson install -C build --skip-subprojects
|
@ -1,6 +0,0 @@
|
||||
3a28c3656d7a8bd04c517c10f7aae62911450745db92fc95c7e085e048fa90c618
|
||||
334ad87f0ff7e33f650802d7abaf2d39540e12138165a75ce9cc91315f8e603972
|
||||
d1d2bbeda123643540e7b7c84528a5c73bbb27cc04d7fad09213750acea6055060
|
||||
fadc62bfe73cf3f32efefd0712aa060e875190538cfb1b363d628a59ec21f3a351
|
||||
8d31962d2a6a5942b93027fdbf6c0d2d3e2298d376bd371c083f6b69427e09dc76
|
||||
ec9af9ef0d75946242939ae65452a1372e5ee319ba53cecf7f5cfa2a0ca3257ae2
|
@ -1,14 +0,0 @@
|
||||
cairo
|
||||
flex make
|
||||
json-c
|
||||
libinput
|
||||
libxkbcommon
|
||||
linux-headers make
|
||||
mesa
|
||||
meson make
|
||||
pango
|
||||
pcre2
|
||||
pixman
|
||||
pkgconf make
|
||||
wayland
|
||||
wayland-protocols make
|
@ -1,119 +0,0 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 6461ff1..fa1de0b 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -49,7 +49,6 @@ pangocairo = dependency('pangocairo')
|
||||
gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
|
||||
pixman = dependency('pixman-1')
|
||||
glesv2 = dependency('glesv2')
|
||||
-libevdev = dependency('libevdev')
|
||||
libinput = dependency('libinput', version: '>=1.6.0')
|
||||
xcb = dependency('xcb', required: get_option('xwayland'))
|
||||
drm_full = dependency('libdrm') # only needed for drm_fourcc.h
|
||||
diff --git a/sway/commands/bar/bind.c b/sway/commands/bar/bind.c
|
||||
index b4b5bc4..2770312 100644
|
||||
--- a/sway/commands/bar/bind.c
|
||||
+++ b/sway/commands/bar/bind.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
|
||||
index 4c67b3c..e9c0eab 100644
|
||||
--- a/sway/commands/bind.c
|
||||
+++ b/sway/commands/bind.c
|
||||
@@ -1,5 +1,4 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
-#include <libevdev/libevdev.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c
|
||||
index 6b33141..039f533 100644
|
||||
--- a/sway/commands/input/scroll_button.c
|
||||
+++ b/sway/commands/input/scroll_button.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include "sway/config.h"
|
||||
#include "sway/commands.h"
|
||||
#include "sway/input/cursor.h"
|
||||
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
|
||||
index 95edf7b..99df15f 100644
|
||||
--- a/sway/input/cursor.c
|
||||
+++ b/sway/input/cursor.c
|
||||
@@ -1,7 +1,7 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <libinput.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
@@ -1202,7 +1202,7 @@ uint32_t get_mouse_bindsym(const char *name, char **error) {
|
||||
return buttons[number - 1];
|
||||
} else if (strncmp(name, "BTN_", strlen("BTN_")) == 0) {
|
||||
// Get event code from name
|
||||
- int code = libevdev_event_code_from_name(EV_KEY, name);
|
||||
+ int code = libinput_event_code_from_name(EV_KEY, name);
|
||||
if (code == -1) {
|
||||
size_t len = snprintf(NULL, 0, "Unknown event %s", name) + 1;
|
||||
*error = malloc(len);
|
||||
@@ -1228,7 +1228,7 @@ uint32_t get_mouse_bindcode(const char *name, char **error) {
|
||||
*error = strdup("Button event code out of range.");
|
||||
return 0;
|
||||
}
|
||||
- const char *event = libevdev_event_code_get_name(EV_KEY, code);
|
||||
+ const char *event = libinput_event_code_get_name(EV_KEY, code);
|
||||
if (!event || strncmp(event, "BTN_", strlen("BTN_")) != 0) {
|
||||
size_t len = snprintf(NULL, 0, "Event code %d (%s) is not a button",
|
||||
code, event ? event : "(null)") + 1;
|
||||
@@ -1251,7 +1251,7 @@ uint32_t get_mouse_button(const char *name, char **error) {
|
||||
}
|
||||
|
||||
const char *get_mouse_button_name(uint32_t button) {
|
||||
- const char *name = libevdev_event_code_get_name(EV_KEY, button);
|
||||
+ const char *name = libinput_event_code_get_name(EV_KEY, button);
|
||||
if (!name) {
|
||||
if (button == SWAY_SCROLL_UP) {
|
||||
name = "SWAY_SCROLL_UP";
|
||||
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
|
||||
index f9eb8c8..681ca26 100644
|
||||
--- a/sway/input/seatop_default.c
|
||||
+++ b/sway/input/seatop_default.c
|
||||
@@ -1,6 +1,6 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <float.h>
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_tablet_v2.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
|
||||
index 1b64f86..13fa7d4 100644
|
||||
--- a/sway/ipc-json.c
|
||||
+++ b/sway/ipc-json.c
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <ctype.h>
|
||||
#include <float.h>
|
||||
#include <json.h>
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <stdio.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
diff --git a/sway/meson.build b/sway/meson.build
|
||||
index 1402db1..53ed355 100644
|
||||
--- a/sway/meson.build
|
||||
+++ b/sway/meson.build
|
||||
@@ -207,7 +207,6 @@ sway_deps = [
|
||||
cairo,
|
||||
drm,
|
||||
jsonc,
|
||||
- libevdev,
|
||||
libinput,
|
||||
libudev,
|
||||
math,
|
@ -1,215 +0,0 @@
|
||||
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
|
||||
index ad8610cd..59f57f94 100644
|
||||
--- a/include/sway/criteria.h
|
||||
+++ b/include/sway/criteria.h
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef _SWAY_CRITERIA_H
|
||||
#define _SWAY_CRITERIA_H
|
||||
|
||||
-#include <pcre.h>
|
||||
+#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
+#include <pcre2.h>
|
||||
#include "config.h"
|
||||
#include "list.h"
|
||||
#include "tree/view.h"
|
||||
@@ -15,13 +16,13 @@ enum criteria_type {
|
||||
};
|
||||
|
||||
enum pattern_type {
|
||||
- PATTERN_PCRE,
|
||||
+ PATTERN_PCRE2,
|
||||
PATTERN_FOCUSED,
|
||||
};
|
||||
|
||||
struct pattern {
|
||||
enum pattern_type match_type;
|
||||
- pcre *regex;
|
||||
+ pcre2_code *regex;
|
||||
};
|
||||
|
||||
struct criteria {
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 5e4de87f..c59e4142 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -36,7 +36,7 @@ if is_freebsd
|
||||
endif
|
||||
|
||||
jsonc = dependency('json-c', version: '>=0.13')
|
||||
-pcre = dependency('libpcre')
|
||||
+pcre2 = dependency('libpcre2-8')
|
||||
wayland_server = dependency('wayland-server')
|
||||
wayland_client = dependency('wayland-client')
|
||||
wayland_cursor = dependency('wayland-cursor')
|
||||
diff --git a/sway/criteria.c b/sway/criteria.c
|
||||
index d2a5566f..94751c5f 100644
|
||||
--- a/sway/criteria.c
|
||||
+++ b/sway/criteria.c
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <strings.h>
|
||||
-#include <pcre.h>
|
||||
+#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
+#include <pcre2.h>
|
||||
#include "sway/criteria.h"
|
||||
#include "sway/tree/container.h"
|
||||
#include "sway/config.h"
|
||||
@@ -40,17 +41,19 @@ bool criteria_is_empty(struct criteria *criteria) {
|
||||
char *error = NULL;
|
||||
|
||||
// Returns error string on failure or NULL otherwise.
|
||||
-static bool generate_regex(pcre **regex, char *value) {
|
||||
- const char *reg_err;
|
||||
- int offset;
|
||||
-
|
||||
- *regex = pcre_compile(value, PCRE_UTF8 | PCRE_UCP, ®_err, &offset, NULL);
|
||||
+static bool generate_regex(pcre2_code **regex, char *value) {
|
||||
+ int errorcode;
|
||||
+ PCRE2_SIZE offset;
|
||||
|
||||
+ *regex = pcre2_compile((PCRE2_SPTR)value, PCRE2_ZERO_TERMINATED, PCRE2_UTF | PCRE2_UCP, &errorcode, &offset, NULL);
|
||||
if (!*regex) {
|
||||
+ PCRE2_UCHAR buffer[256];
|
||||
+ pcre2_get_error_message(errorcode, buffer, sizeof(buffer));
|
||||
+
|
||||
const char *fmt = "Regex compilation for '%s' failed: %s";
|
||||
- int len = strlen(fmt) + strlen(value) + strlen(reg_err) - 3;
|
||||
+ int len = strlen(fmt) + strlen(value) + strlen((char*) buffer) - 3;
|
||||
error = malloc(len);
|
||||
- snprintf(error, len, fmt, value, reg_err);
|
||||
+ snprintf(error, len, fmt, value, buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +69,7 @@ static bool pattern_create(struct pattern **pattern, char *value) {
|
||||
if (strcmp(value, "__focused__") == 0) {
|
||||
(*pattern)->match_type = PATTERN_FOCUSED;
|
||||
} else {
|
||||
- (*pattern)->match_type = PATTERN_PCRE;
|
||||
+ (*pattern)->match_type = PATTERN_PCRE2;
|
||||
if (!generate_regex(&(*pattern)->regex, value)) {
|
||||
return false;
|
||||
};
|
||||
@@ -77,7 +80,7 @@ static bool pattern_create(struct pattern **pattern, char *value) {
|
||||
static void pattern_destroy(struct pattern *pattern) {
|
||||
if (pattern) {
|
||||
if (pattern->regex) {
|
||||
- pcre_free(pattern->regex);
|
||||
+ pcre2_code_free(pattern->regex);
|
||||
}
|
||||
free(pattern);
|
||||
}
|
||||
@@ -99,8 +102,11 @@ void criteria_destroy(struct criteria *criteria) {
|
||||
free(criteria);
|
||||
}
|
||||
|
||||
-static int regex_cmp(const char *item, const pcre *regex) {
|
||||
- return pcre_exec(regex, NULL, item, strlen(item), 0, 0, NULL, 0);
|
||||
+static int regex_cmp(const char *item, const pcre2_code *regex) {
|
||||
+ pcre2_match_data *match_data = pcre2_match_data_create_from_pattern(regex, NULL);
|
||||
+ int result = pcre2_match(regex, (PCRE2_SPTR)item, strlen(item), 0, 0, match_data, NULL);
|
||||
+ pcre2_match_data_free(match_data);
|
||||
+ return result;
|
||||
}
|
||||
|
||||
#if HAVE_XWAYLAND
|
||||
@@ -155,7 +161,7 @@ static bool criteria_matches_container(struct criteria *criteria,
|
||||
bool exists = false;
|
||||
struct sway_container *con = container;
|
||||
for (int i = 0; i < con->marks->length; ++i) {
|
||||
- if (regex_cmp(con->marks->items[i], criteria->con_mark->regex) == 0) {
|
||||
+ if (regex_cmp(con->marks->items[i], criteria->con_mark->regex) >= 0) {
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
@@ -192,8 +198,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(title, criteria->title->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(title, criteria->title->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -212,8 +218,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(shell, criteria->shell->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(shell, criteria->shell->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -232,8 +238,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(app_id, criteria->app_id->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(app_id, criteria->app_id->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -264,8 +270,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(class, criteria->class->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(class, criteria->class->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -284,8 +290,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(instance, criteria->instance->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(instance, criteria->instance->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -304,8 +310,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(window_role, criteria->window_role->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(window_role, criteria->window_role->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -363,8 +369,8 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
- case PATTERN_PCRE:
|
||||
- if (regex_cmp(ws->name, criteria->workspace->regex) != 0) {
|
||||
+ case PATTERN_PCRE2:
|
||||
+ if (regex_cmp(ws->name, criteria->workspace->regex) < 0) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
diff --git a/sway/meson.build b/sway/meson.build
|
||||
index 8eab31a2..5f34ce6b 100644
|
||||
--- a/sway/meson.build
|
||||
+++ b/sway/meson.build
|
||||
@@ -213,7 +213,7 @@ sway_deps = [
|
||||
libudev,
|
||||
math,
|
||||
pango,
|
||||
- pcre,
|
||||
+ pcre2,
|
||||
glesv2,
|
||||
pixman,
|
||||
server_protos,
|
@ -1,145 +0,0 @@
|
||||
From b81ff615a01ac9dbbede66a5853dfe3fda2932be Mon Sep 17 00:00:00 2001
|
||||
From: Dylan Araps <dylan.araps@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 12:05:39 +0000
|
||||
Subject: [PATCH] rename
|
||||
|
||||
---
|
||||
include/sway/input/seat.h | 2 +-
|
||||
sway/config.c | 2 +-
|
||||
sway/input/seat.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
|
||||
index 4118df6655..f2c2d6c4b0 100644
|
||||
--- a/include/sway/input/seat.h
|
||||
+++ b/include/sway/input/seat.h
|
||||
@@ -133,7 +133,7 @@ struct sway_keyboard_shortcuts_inhibitor {
|
||||
|
||||
struct sway_seat *seat_create(const char *seat_name);
|
||||
|
||||
-void seat_destroy(struct sway_seat *seat);
|
||||
+void sway_seat_destroy(struct sway_seat *seat);
|
||||
|
||||
void seat_add_device(struct sway_seat *seat,
|
||||
struct sway_input_device *device);
|
||||
diff --git a/sway/config.c b/sway/config.c
|
||||
index 3b506254c7..36c783dcef 100644
|
||||
--- a/sway/config.c
|
||||
+++ b/sway/config.c
|
||||
@@ -184,7 +184,7 @@ static void destroy_removed_seats(struct sway_config *old_config,
|
||||
seat_name_cmp, seat_config->name) < 0) {
|
||||
seat = input_manager_get_seat(seat_config->name, false);
|
||||
if (seat) {
|
||||
- seat_destroy(seat);
|
||||
+ sway_seat_destroy(seat);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/sway/input/seat.c b/sway/input/seat.c
|
||||
index 2d714acd4c..10d3512d33 100644
|
||||
--- a/sway/input/seat.c
|
||||
+++ b/sway/input/seat.c
|
||||
@@ -54,7 +54,7 @@ static void seat_node_destroy(struct sway_seat_node *seat_node) {
|
||||
free(seat_node);
|
||||
}
|
||||
|
||||
-void seat_destroy(struct sway_seat *seat) {
|
||||
+void sway_seat_destroy(struct sway_seat *seat) {
|
||||
if (seat == config->handler_context.seat) {
|
||||
config->handler_context.seat = input_manager_get_default_seat();
|
||||
}
|
||||
From bb9e3415b519d392a7bfa95e9571e77959653e72 Mon Sep 17 00:00:00 2001
|
||||
From: Dylan Araps <dylan.araps@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 12:08:16 +0000
|
||||
Subject: [PATCH] rename
|
||||
|
||||
---
|
||||
include/sway/server.h | 2 +-
|
||||
sway/main.c | 2 +-
|
||||
sway/server.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/sway/server.h b/include/sway/server.h
|
||||
index 3a5670d928..94dd23c7d4 100644
|
||||
--- a/include/sway/server.h
|
||||
+++ b/include/sway/server.h
|
||||
@@ -127,7 +127,7 @@ 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);
|
||||
-bool server_init(struct sway_server *server);
|
||||
+bool sway_server_init(struct sway_server *server);
|
||||
void server_fini(struct sway_server *server);
|
||||
bool server_start(struct sway_server *server);
|
||||
void server_run(struct sway_server *server);
|
||||
diff --git a/sway/main.c b/sway/main.c
|
||||
index ca37b79e92..570ac49089 100644
|
||||
--- a/sway/main.c
|
||||
+++ b/sway/main.c
|
||||
@@ -361,7 +361,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
root = root_create();
|
||||
|
||||
- if (!server_init(&server)) {
|
||||
+ if (!sway_server_init(&server)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/sway/server.c b/sway/server.c
|
||||
index 2e5ab10453..1de9124fdd 100644
|
||||
--- a/sway/server.c
|
||||
+++ b/sway/server.c
|
||||
@@ -57,7 +57,7 @@ bool server_privileged_prepare(struct sway_server *server) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-bool server_init(struct sway_server *server) {
|
||||
+bool sway_server_init(struct sway_server *server) {
|
||||
sway_log(SWAY_DEBUG, "Initializing Wayland server");
|
||||
|
||||
struct wlr_renderer *renderer = wlr_backend_get_renderer(server->backend);
|
||||
---
|
||||
include/sway/input/seat.h | 2 +-
|
||||
sway/input/input-manager.c | 2 +-
|
||||
sway/input/seat.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
|
||||
index f2c2d6c4b0..599b1e6f32 100644
|
||||
--- a/include/sway/input/seat.h
|
||||
+++ b/include/sway/input/seat.h
|
||||
@@ -131,7 +131,7 @@ struct sway_keyboard_shortcuts_inhibitor {
|
||||
struct wl_list link; // sway_seat::keyboard_shortcuts_inhibitors
|
||||
};
|
||||
|
||||
-struct sway_seat *seat_create(const char *seat_name);
|
||||
+struct sway_seat *sway_seat_create(const char *seat_name);
|
||||
|
||||
void sway_seat_destroy(struct sway_seat *seat);
|
||||
|
||||
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
|
||||
index f04a8ce09a..504a9f7ed7 100644
|
||||
--- a/sway/input/input-manager.c
|
||||
+++ b/sway/input/input-manager.c
|
||||
@@ -47,7 +47,7 @@ struct sway_seat *input_manager_get_seat(const char *seat_name, bool create) {
|
||||
}
|
||||
}
|
||||
|
||||
- return create ? seat_create(seat_name) : NULL;
|
||||
+ return create ? sway_seat_create(seat_name) : NULL;
|
||||
}
|
||||
|
||||
struct sway_seat *input_manager_sway_seat_from_wlr_seat(struct wlr_seat *wlr_seat) {
|
||||
diff --git a/sway/input/seat.c b/sway/input/seat.c
|
||||
index 10d3512d33..899ae14217 100644
|
||||
--- a/sway/input/seat.c
|
||||
+++ b/sway/input/seat.c
|
||||
@@ -543,7 +543,7 @@ static void collect_focus_container_iter(struct sway_container *container,
|
||||
collect_focus_iter(&container->node, data);
|
||||
}
|
||||
|
||||
-struct sway_seat *seat_create(const char *seat_name) {
|
||||
+struct sway_seat *sway_seat_create(const char *seat_name) {
|
||||
struct sway_seat *seat = calloc(1, sizeof(struct sway_seat));
|
||||
if (!seat) {
|
||||
return NULL;
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
chown root:input "$KISS_ROOT/usr/bin/sway"
|
||||
chmod g+s "$KISS_ROOT/usr/bin/sway"
|
||||
|
||||
cat <<EOF
|
||||
|
||||
NOTE: You must be in the 'video', 'audio', and 'tty'
|
||||
groups. There is no 'input' group requirement
|
||||
as this sway binary is setgid input.
|
||||
|
||||
NOTE: You must set XDG_RUNTIME_DIR in your shellrc
|
||||
or .profile for things to work. This directory
|
||||
must exist and must be writable by your user.
|
||||
|
||||
export XDG_RUNTIME_DIR=/run/user/\$(id -u)
|
||||
|
||||
NOTE: You must be the first to call DRMSetMaster.
|
||||
|
||||
If you cannot fulfil this requirement, you must
|
||||
use the 'sway' package and run the 'seatd' daemon.
|
||||
|
||||
Another option is to setuid root the sway binary.
|
||||
|
||||
EOF
|
@ -1,6 +0,0 @@
|
||||
https://github.com/swaywm/sway/archive/VERSION.tar.gz
|
||||
https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/e5063ef3a3b12d4384595cb0554cf1f84d5be6f8.tar.gz subprojects/wlroots
|
||||
https://git.sr.ht/~kennylevinsen/seatd/archive/0.7.0.tar.gz subprojects/seatd
|
||||
patches/no-evdev.patch
|
||||
patches/pcre2.patch
|
||||
patches/sway-static.patch
|
@ -1 +0,0 @@
|
||||
6ffa4b1f7000cd90d63213820039ee432803e66a 3
|
@ -1 +0,0 @@
|
||||
../sway/README
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
patch -p1 < no-evdev.patch
|
||||
|
||||
# Default background color.
|
||||
sed 's/0.25f, 0.25f, 0.25f/0.929, 0.870, 0.678/' \
|
||||
sway/desktop/render.c > _
|
||||
mv -f _ sway/desktop/render.c
|
||||
|
||||
# Build fails with clang due to -Werror.
|
||||
export CFLAGS="$CFLAGS -Wno-unused-function -Wno-error"
|
||||
|
||||
meson \
|
||||
-Dprefix=/usr \
|
||||
-Dswaybar=false \
|
||||
-Dswaynag=false \
|
||||
-Ddefault-wallpaper=false \
|
||||
-Dzsh-completions=false \
|
||||
-Dbash-completions=false \
|
||||
-Dfish-completions=false \
|
||||
-Dxwayland=disabled \
|
||||
-Dwlroots:examples=false \
|
||||
-Dwlroots:xcb-errors=disabled \
|
||||
-Dwlroots:default_library=static \
|
||||
-Dseatd:libseat-builtin=enabled \
|
||||
-Dseatd:default_library=static \
|
||||
--force-fallback-for=wlroots,seatd \
|
||||
. output
|
||||
|
||||
ninja -C output
|
||||
|
||||
mkdir -p \
|
||||
"$1/usr/bin" \
|
||||
"$1/etc/sway"
|
||||
|
||||
cp -f output/sway/sway "$1/usr/bin"
|
||||
cp -f config.in "$1/etc/sway/config"
|
@ -1,4 +0,0 @@
|
||||
60a59534a5d7012a2acc8e4973bd3fe75d0a255af7a2417bfd08f74b9fa2ba1cac
|
||||
b5d4ee20f5abe6f7da0899063fecbb8009f1f65dc037849d4b5115ebb2f92397d9
|
||||
d1d2bbeda123643540e7b7c84528a5c73bbb27cc04d7fad09213750acea6055060
|
||||
b8cacc58990110bfc859dffcf1b616b72617428f6372bda54e04ced5dae3f73ba4
|
@ -1,10 +0,0 @@
|
||||
flex make
|
||||
libinput
|
||||
libxkbcommon
|
||||
linux-headers make
|
||||
mesa
|
||||
meson make
|
||||
pixman
|
||||
pkgconf make
|
||||
wayland
|
||||
wayland-protocols make
|
@ -1,119 +0,0 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 596faf95..4cc59df0 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -45,7 +45,6 @@ pango = dependency('pango')
|
||||
gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
|
||||
pixman = dependency('pixman-1')
|
||||
glesv2 = dependency('glesv2')
|
||||
-libevdev = dependency('libevdev')
|
||||
libinput = dependency('libinput', version: '>=1.6.0')
|
||||
xcb = dependency('xcb', required: get_option('xwayland'))
|
||||
drm_full = dependency('libdrm') # only needed for drm_fourcc.h
|
||||
diff --git a/sway/commands/bar/bind.c b/sway/commands/bar/bind.c
|
||||
index b4b5bc45..27703128 100644
|
||||
--- a/sway/commands/bar/bind.c
|
||||
+++ b/sway/commands/bar/bind.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
|
||||
index 4c67b3ce..e9c0eab4 100644
|
||||
--- a/sway/commands/bind.c
|
||||
+++ b/sway/commands/bind.c
|
||||
@@ -1,5 +1,4 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
-#include <libevdev/libevdev.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c
|
||||
index 6b331419..039f5335 100644
|
||||
--- a/sway/commands/input/scroll_button.c
|
||||
+++ b/sway/commands/input/scroll_button.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include "sway/config.h"
|
||||
#include "sway/commands.h"
|
||||
#include "sway/input/cursor.h"
|
||||
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
|
||||
index 95edf7be..99df15f9 100644
|
||||
--- a/sway/input/cursor.c
|
||||
+++ b/sway/input/cursor.c
|
||||
@@ -1,7 +1,7 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <libinput.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
@@ -1202,7 +1202,7 @@ uint32_t get_mouse_bindsym(const char *name, char **error) {
|
||||
return buttons[number - 1];
|
||||
} else if (strncmp(name, "BTN_", strlen("BTN_")) == 0) {
|
||||
// Get event code from name
|
||||
- int code = libevdev_event_code_from_name(EV_KEY, name);
|
||||
+ int code = libinput_event_code_from_name(EV_KEY, name);
|
||||
if (code == -1) {
|
||||
size_t len = snprintf(NULL, 0, "Unknown event %s", name) + 1;
|
||||
*error = malloc(len);
|
||||
@@ -1228,7 +1228,7 @@ uint32_t get_mouse_bindcode(const char *name, char **error) {
|
||||
*error = strdup("Button event code out of range.");
|
||||
return 0;
|
||||
}
|
||||
- const char *event = libevdev_event_code_get_name(EV_KEY, code);
|
||||
+ const char *event = libinput_event_code_get_name(EV_KEY, code);
|
||||
if (!event || strncmp(event, "BTN_", strlen("BTN_")) != 0) {
|
||||
size_t len = snprintf(NULL, 0, "Event code %d (%s) is not a button",
|
||||
code, event ? event : "(null)") + 1;
|
||||
@@ -1251,7 +1251,7 @@ uint32_t get_mouse_button(const char *name, char **error) {
|
||||
}
|
||||
|
||||
const char *get_mouse_button_name(uint32_t button) {
|
||||
- const char *name = libevdev_event_code_get_name(EV_KEY, button);
|
||||
+ const char *name = libinput_event_code_get_name(EV_KEY, button);
|
||||
if (!name) {
|
||||
if (button == SWAY_SCROLL_UP) {
|
||||
name = "SWAY_SCROLL_UP";
|
||||
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
|
||||
index f9eb8c8a..681ca263 100644
|
||||
--- a/sway/input/seatop_default.c
|
||||
+++ b/sway/input/seatop_default.c
|
||||
@@ -1,6 +1,6 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <float.h>
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_tablet_v2.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
|
||||
index 2c0cf3e2..839e6ae0 100644
|
||||
--- a/sway/ipc-json.c
|
||||
+++ b/sway/ipc-json.c
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifdef HAVE_JSON
|
||||
#include <json.h>
|
||||
#endif
|
||||
-#include <libevdev/libevdev.h>
|
||||
+#include <linux/input.h>
|
||||
#include <stdio.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
diff --git a/sway/meson.build b/sway/meson.build
|
||||
index 4b1894ad..b1529156 100644
|
||||
--- a/sway/meson.build
|
||||
+++ b/sway/meson.build
|
||||
@@ -205,7 +205,6 @@ sway_sources = files(
|
||||
|
||||
sway_deps = [
|
||||
drm,
|
||||
- libevdev,
|
||||
libinput,
|
||||
libudev,
|
||||
math,
|
@ -1,40 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
chown root:input "$KISS_ROOT/usr/bin/sway"
|
||||
chmod g+s "$KISS_ROOT/usr/bin/sway"
|
||||
|
||||
cat <<EOF
|
||||
|
||||
NOTE: You must be in the 'video', 'audio', and 'tty'
|
||||
groups. There is no 'input' group requirement
|
||||
as this sway binary is setgid input.
|
||||
|
||||
NOTE: You must set XDG_RUNTIME_DIR in your shellrc
|
||||
or .profile for things to work. This directory
|
||||
must exist and must be writable by your user.
|
||||
|
||||
export XDG_RUNTIME_DIR=/run/user/\$(id -u)
|
||||
|
||||
NOTE: You must be the first to call DRMSetMaster.
|
||||
|
||||
If you cannot fulfil this requirement, you must
|
||||
use the 'sway' package and run the 'seatd' daemon.
|
||||
|
||||
Another option is to setuid root the sway binary.
|
||||
|
||||
See: https://github.com/torvalds/linux/commit/45bc3d26c95a8fc63a7d8668ca9e57ef0883351c
|
||||
|
||||
NOTE: sway-tiny does not spawn a subshell for exec
|
||||
commands, it executes them directly. Use the full
|
||||
path to the program you would like to execute.
|
||||
|
||||
# Will not work.
|
||||
bindsym \$mod+t exec foot
|
||||
|
||||
# Works.
|
||||
bindsym \$mod+t exec /bin/foot
|
||||
|
||||
NOTE: This is a fork of sway for KISS Linux. Send all
|
||||
bugs/issues to kisslinux/repo and NOT upstream.
|
||||
|
||||
EOF
|
@ -1,4 +0,0 @@
|
||||
https://github.com/DCVIII/sway/archive/VERSION.tar.gz
|
||||
https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/5f645598d8122b1b0c964baf4754f2e37fe71807.tar.gz subprojects/wlroots
|
||||
https://git.sr.ht/~kennylevinsen/seatd/archive/0.7.0.tar.gz subprojects/seatd
|
||||
patches/no-evdev.patch
|
@ -1 +0,0 @@
|
||||
c34a4ca6d234177416dc931efd3035f3b803315b 3
|
Loading…
Reference in New Issue
Block a user