Updated for PinePhone Pro
This commit is contained in:
1 parent
5e93eb11db
commit
0894eab4fb
44 files changed
+1868
-892
No files matched your search
@@ -1,3 +1,2 @@
|
||||
DIST wlroots-0.19.3.tar.gz 671529 BLAKE2B 0855eca598b956c3e3bb35a8a3eb2d1c010682a1e44294659a90c3a44df515b43a90f84d4e60396fb923619dcae17423049de1b8032e4481fc5730a9b6931375 SHA512 af1c684d3ebf4f9225bb250851d5e02160c8dfa0cb359114806245eb8f35483e749f57742260eb902c75536dac92eabc8117e4bb33741e57b7aa4d76a53a919f
|
||||
DIST wlroots-0.20.0.tar.gz 700447 BLAKE2B 3844a9dfd5168fd4484115a826d240bc685fd8d39b48fe96a686cb6463b5cf1a124ae7bbe1bb84db2513b6ab9038fb519145bb3f5f1baf9ca3757f9167070acf SHA512 c951c9f6f9d720f994ee49a937ae8ed63f733a4fa1ce71f7e6ce1513f2cd91616ce8bd8cbb844aa1e46e62f3b46b028f3004bab94eca5ef8899cbaa3134ac314
|
||||
DIST wlroots-0.20.0.tar.gz.sig 566 BLAKE2B ec1361cf826a6e7c3c584d99d6049331bc12d49745bf0dfe89ff883dbea238ba043ef0268535ea4e06ce7b9aa65ed24e5f99dc442ac249066ac645dd7bc97394 SHA512 9241568120700b7dadd92ee212ee7c78d1d1fcfe3873250d09c97b9207a7cb8687b393ce8ce9f258698c17caf924ff2c91571e235580fcd7b8618d68e87e690b
|
||||
DIST wlroots-0.20.2.tar.gz 701254 BLAKE2B 0e7ee8e6547c70e14a1fc6838350b15d3670b152f178079e8c7c3d4f6be975aa2a48b2f18d73af248ad924a2c85fcef351b52904c20e0677f06369d5b9e37f87 SHA512 634345e23d0b6c28cb501c0dd0ef9c50d529a92ae5c8455e99e876f3f37ee244ac19dd097f76416b2ae4fd7c3f02e39a92a9322cf5a0caf8da21c31cd900e508
|
||||
DIST wlroots-0.20.2.tar.gz.sig 566 BLAKE2B 9974a9d6611bd3ec2a43321fead83a50e61df6dc46b1fd0a8a58540b1ace307323a813a992c7d326d487c0ebdb261ec5bd730bd6577b45174dabb09d55d2aa83 SHA512 e74dc0abfabed7f40ba4f0e5edfc30ef92b95ebcf4a6aca3b2a605b04b5f2345a6a842cdf56819ce1f050c6181b646eae19dbef835354df7b09562cebbdaa474
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
From dddfcf3c8cd658d43df83dd9e3cd4f502c611c4f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <dddfcf3c8cd658d43df83dd9e3cd4f502c611c4f.1705668498.git.agx@sigxcpu.org>
|
||||
From 91b770c013e89e55636594051be03f6825ff04cc Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <91b770c013e89e55636594051be03f6825ff04cc.1731366381.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Fri, 19 Jan 2024 13:44:28 +0100
|
||||
Date: Fri, 1 Jan 2021 13:58:55 +0100
|
||||
Subject: [PATCH] Revert "layer-shell: error on 0 dimension without anchors"
|
||||
|
||||
This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3.
|
||||
@@ -12,25 +12,25 @@ Revert this until phosh has a fixed release.
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c
|
||||
index 3bb3b91..28cf5f3 100644
|
||||
index d4893871..bcf82a43 100644
|
||||
--- a/types/wlr_layer_shell_v1.c
|
||||
+++ b/types/wlr_layer_shell_v1.c
|
||||
@@ -331,6 +331,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) {
|
||||
@@ -366,6 +366,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
|
||||
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
|
||||
if (surface->pending.desired_width == 0 &&
|
||||
@@ -350,6 +351,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) {
|
||||
const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
|
||||
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
||||
if (surface->pending.desired_height == 0 && (anchor & vert) != vert) {
|
||||
@@ -374,6 +375,7 @@ static void layer_surface_role_client_commit(struct wlr_surface *wlr_surface) {
|
||||
"height 0 requested without setting top and bottom anchors");
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void layer_surface_role_commit(struct wlr_surface *wlr_surface) {
|
||||
if ((anchor & surface->pending.exclusive_edge) != surface->pending.exclusive_edge) {
|
||||
wlr_surface_reject_pending(wlr_surface, surface->resource,
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From 3c8b98066cc39a3c06dd9d09d3f4ad542dfa13b1 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <3c8b98066cc39a3c06dd9d09d3f4ad542dfa13b1.1737996779.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Mon, 27 Jan 2025 17:48:39 +0100
|
||||
Subject: [PATCH] seat: Don't forget to destroy touch points on touch up
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Otherwise number of touch points goes up constantly and d'n'd via touch
|
||||
can't work as validation always fails.
|
||||
|
||||
Fixes 75ecba44 ("seat: add serials to touch up events")
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
types/seat/wlr_seat_touch.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c
|
||||
index 09f33d6..cc5b7c8 100644
|
||||
--- a/types/seat/wlr_seat_touch.c
|
||||
+++ b/types/seat/wlr_seat_touch.c
|
||||
@@ -214,9 +214,10 @@ uint32_t wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time,
|
||||
return 0;
|
||||
}
|
||||
|
||||
- return grab->interface->up(grab, time, point);
|
||||
+ uint32_t serial = grab->interface->up(grab, time, point);
|
||||
|
||||
touch_point_destroy(point);
|
||||
+ return serial;
|
||||
}
|
||||
|
||||
void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time,
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
From 48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Fri, 11 Sep 2026 10:57:59 +0200
|
||||
Subject: [PATCH 1/4] text-input-v3: Introduce version
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
include/wlr/types/wlr_text_input_v3.h | 2 +-
|
||||
types/wlr_text_input_v3.c | 8 ++++++--
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/wlr/types/wlr_text_input_v3.h b/include/wlr/types/wlr_text_input_v3.h
|
||||
index 29feb7e6c..8a3e566d8 100644
|
||||
--- a/include/wlr/types/wlr_text_input_v3.h
|
||||
+++ b/include/wlr/types/wlr_text_input_v3.h
|
||||
@@ -84,7 +84,7 @@ struct wlr_text_input_manager_v3 {
|
||||
};
|
||||
|
||||
struct wlr_text_input_manager_v3 *wlr_text_input_manager_v3_create(
|
||||
- struct wl_display *wl_display);
|
||||
+ struct wl_display *wl_display, uint32_t version);
|
||||
|
||||
// Sends enter to the surface and saves it
|
||||
void wlr_text_input_v3_send_enter(struct wlr_text_input_v3 *text_input,
|
||||
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
|
||||
index bbae3a076..7a543f1a7 100644
|
||||
--- a/types/wlr_text_input_v3.c
|
||||
+++ b/types/wlr_text_input_v3.c
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <wlr/util/log.h>
|
||||
#include "text-input-unstable-v3-protocol.h"
|
||||
|
||||
+#define TEXT_INPUT_VERSION 1
|
||||
+
|
||||
static void text_input_clear_focused_surface(struct wlr_text_input_v3 *text_input) {
|
||||
wl_list_remove(&text_input->surface_destroy.link);
|
||||
wl_list_init(&text_input->surface_destroy.link);
|
||||
@@ -324,7 +326,9 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
||||
}
|
||||
|
||||
struct wlr_text_input_manager_v3 *wlr_text_input_manager_v3_create(
|
||||
- struct wl_display *display) {
|
||||
+ struct wl_display *display, uint32_t version) {
|
||||
+ assert(version <= TEXT_INPUT_VERSION);
|
||||
+
|
||||
struct wlr_text_input_manager_v3 *manager = calloc(1, sizeof(*manager));
|
||||
if (!manager) {
|
||||
return NULL;
|
||||
@@ -336,7 +340,7 @@ struct wlr_text_input_manager_v3 *wlr_text_input_manager_v3_create(
|
||||
wl_signal_init(&manager->events.destroy);
|
||||
|
||||
manager->global = wl_global_create(display,
|
||||
- &zwp_text_input_manager_v3_interface, 1, manager,
|
||||
+ &zwp_text_input_manager_v3_interface, version, manager,
|
||||
text_input_manager_bind);
|
||||
if (!manager->global) {
|
||||
free(manager);
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
From 1e7dd78cfda8ddd7c618c01973799aedcddfb72f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <1e7dd78cfda8ddd7c618c01973799aedcddfb72f.1741276434.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Tue, 4 Mar 2025 20:37:49 +0100
|
||||
Subject: [PATCH] xwm: Handle NET_WM_WINDOW_OPACITY
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Lot of clients use it (e.g. both Qt and GTK) although it never made it
|
||||
into the spec at
|
||||
|
||||
https://specifications.freedesktop.org/wm-spec/latest-single/
|
||||
|
||||
until recently
|
||||
|
||||
https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/97
|
||||
|
||||
(cherry picked from commit e752e3ec06fc7c2b83079a5980218ae359b1c869)
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
include/wlr/xwayland/xwayland.h | 2 ++
|
||||
include/xwayland/xwm.h | 1 +
|
||||
xwayland/xwm.c | 23 +++++++++++++++++++++++
|
||||
3 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h
|
||||
index 4b476a03..d0bbe993 100644
|
||||
--- a/include/wlr/xwayland/xwayland.h
|
||||
+++ b/include/wlr/xwayland/xwayland.h
|
||||
@@ -119,6 +119,7 @@ struct wlr_xwayland_surface {
|
||||
int16_t x, y;
|
||||
uint16_t width, height;
|
||||
bool override_redirect;
|
||||
+ float opacity;
|
||||
|
||||
char *title;
|
||||
char *class;
|
||||
@@ -186,6 +187,7 @@ struct wlr_xwayland_surface {
|
||||
struct wl_signal set_strut_partial;
|
||||
struct wl_signal set_override_redirect;
|
||||
struct wl_signal set_geometry;
|
||||
+ struct wl_signal set_opacity;
|
||||
/* can be used to set initial maximized/fullscreen geometry */
|
||||
struct wl_signal map_request;
|
||||
struct wl_signal ping_timeout;
|
||||
diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h
|
||||
index 4386446d..43e36328 100644
|
||||
--- a/include/xwayland/xwm.h
|
||||
+++ b/include/xwayland/xwm.h
|
||||
@@ -62,6 +62,7 @@ enum atom_name {
|
||||
NET_STARTUP_ID,
|
||||
NET_STARTUP_INFO,
|
||||
NET_STARTUP_INFO_BEGIN,
|
||||
+ NET_WM_WINDOW_OPACITY,
|
||||
NET_WM_WINDOW_TYPE_NORMAL,
|
||||
NET_WM_WINDOW_TYPE_UTILITY,
|
||||
NET_WM_WINDOW_TYPE_TOOLTIP,
|
||||
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
|
||||
index b315fa0f..91ca596a 100644
|
||||
--- a/xwayland/xwm.c
|
||||
+++ b/xwayland/xwm.c
|
||||
@@ -61,6 +61,7 @@ static const char *const atom_map[ATOM_LAST] = {
|
||||
[NET_STARTUP_ID] = "_NET_STARTUP_ID",
|
||||
[NET_STARTUP_INFO] = "_NET_STARTUP_INFO",
|
||||
[NET_STARTUP_INFO_BEGIN] = "_NET_STARTUP_INFO_BEGIN",
|
||||
+ [NET_WM_WINDOW_OPACITY] = "_NET_WM_WINDOW_OPACITY",
|
||||
[NET_WM_WINDOW_TYPE_NORMAL] = "_NET_WM_WINDOW_TYPE_NORMAL",
|
||||
[NET_WM_WINDOW_TYPE_UTILITY] = "_NET_WM_WINDOW_TYPE_UTILITY",
|
||||
[NET_WM_WINDOW_TYPE_TOOLTIP] = "_NET_WM_WINDOW_TYPE_TOOLTIP",
|
||||
@@ -194,6 +195,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
surface->override_redirect = override_redirect;
|
||||
+ surface->opacity = 1.0;
|
||||
wl_list_init(&surface->children);
|
||||
wl_list_init(&surface->stack_link);
|
||||
wl_list_init(&surface->parent_link);
|
||||
@@ -219,6 +221,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
|
||||
wl_signal_init(&surface->events.set_strut_partial);
|
||||
wl_signal_init(&surface->events.set_override_redirect);
|
||||
wl_signal_init(&surface->events.set_geometry);
|
||||
+ wl_signal_init(&surface->events.set_opacity);
|
||||
wl_signal_init(&surface->events.map_request);
|
||||
wl_signal_init(&surface->events.ping_timeout);
|
||||
|
||||
@@ -485,6 +488,8 @@ static void xwayland_surface_destroy(struct wlr_xwayland_surface *xsurface) {
|
||||
|
||||
wl_signal_emit_mutable(&xsurface->events.destroy, NULL);
|
||||
|
||||
+ assert(wl_list_empty(&xsurface->events.set_opacity.listener_list));
|
||||
+
|
||||
if (xsurface == xsurface->xwm->focus_surface) {
|
||||
xwm_surface_activate(xsurface->xwm, NULL);
|
||||
}
|
||||
@@ -568,6 +573,22 @@ static void read_surface_startup_id(struct wlr_xwm *xwm,
|
||||
wl_signal_emit_mutable(&xsurface->events.set_startup_id, NULL);
|
||||
}
|
||||
|
||||
+static void read_surface_opacity(struct wlr_xwm *xwm,
|
||||
+ struct wlr_xwayland_surface *xsurface,
|
||||
+ xcb_get_property_reply_t *reply) {
|
||||
+ if (reply->type == XCB_ATOM_CARDINAL && reply->format == 32 &&
|
||||
+ xcb_get_property_value_length(reply) ==
|
||||
+ sizeof(uint32_t)) {
|
||||
+ uint32_t *val = xcb_get_property_value(reply);
|
||||
+
|
||||
+ xsurface->opacity = (double)*val / UINT32_MAX;
|
||||
+ wl_signal_emit_mutable(&xsurface->events.set_opacity, NULL);
|
||||
+ } else if (reply->type == XCB_ATOM_NONE) {
|
||||
+ xsurface->opacity = 1.0;
|
||||
+ wl_signal_emit_mutable(&xsurface->events.set_opacity, NULL);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void read_surface_role(struct wlr_xwm *xwm,
|
||||
struct wlr_xwayland_surface *xsurface,
|
||||
xcb_get_property_reply_t *reply) {
|
||||
@@ -882,6 +903,8 @@ static void read_surface_property(struct wlr_xwm *xwm,
|
||||
read_surface_role(xwm, xsurface, reply);
|
||||
} else if (property == xwm->atoms[NET_STARTUP_ID]) {
|
||||
read_surface_startup_id(xwm, xsurface, reply);
|
||||
+ } else if (property == xwm->atoms[NET_WM_WINDOW_OPACITY]) {
|
||||
+ read_surface_opacity(xwm, xsurface, reply);
|
||||
} else if (wlr_log_get_verbosity() >= WLR_DEBUG) {
|
||||
char *prop_name = xwm_get_atom_name(xwm, property);
|
||||
wlr_log(WLR_DEBUG, "unhandled X11 property %" PRIu32 " (%s) for window %" PRIu32,
|
||||
--
|
||||
2.47.2
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From c562da78f972c8abd1521a2787d38307f1ffa6dd Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c562da78f972c8abd1521a2787d38307f1ffa6dd.1789130119.git.agx@sigxcpu.org>
|
||||
In-Reply-To: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
References: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Fri, 11 Sep 2026 12:10:43 +0200
|
||||
Subject: [PATCH 2/4] text-input: Add version 2 events
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
include/wlr/types/wlr_text_input_v3.h | 9 +++++++++
|
||||
types/wlr_text_input_v3.c | 28 +++++++++++++++++++++++++++
|
||||
2 files changed, 37 insertions(+)
|
||||
|
||||
diff --git a/include/wlr/types/wlr_text_input_v3.h b/include/wlr/types/wlr_text_input_v3.h
|
||||
index 8a3e566d8..14285688c 100644
|
||||
--- a/include/wlr/types/wlr_text_input_v3.h
|
||||
+++ b/include/wlr/types/wlr_text_input_v3.h
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
+#include "text-input-unstable-v3-protocol.h"
|
||||
+
|
||||
struct wlr_surface;
|
||||
|
||||
enum wlr_text_input_v3_features {
|
||||
@@ -99,5 +101,12 @@ void wlr_text_input_v3_send_delete_surrounding_text(
|
||||
struct wlr_text_input_v3 *text_input, uint32_t before_length,
|
||||
uint32_t after_length);
|
||||
void wlr_text_input_v3_send_done(struct wlr_text_input_v3 *text_input);
|
||||
+// v2 additions
|
||||
+void wlr_text_input_v3_action(struct wlr_text_input_v3 *text_input,
|
||||
+ enum zwp_text_input_v3_action action);
|
||||
+void wlr_text_input_v3_send_language(struct wlr_text_input_v3 *text_input,
|
||||
+ const char *language);
|
||||
+void wlr_text_input_v3_send_preedit_hint(struct wlr_text_input_v3 *text_input,
|
||||
+ uint32_t start, uint32_t end, enum zwp_text_input_v3_preedit_hint hint);
|
||||
|
||||
#endif
|
||||
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
|
||||
index 7a543f1a7..5ec84e120 100644
|
||||
--- a/types/wlr_text_input_v3.c
|
||||
+++ b/types/wlr_text_input_v3.c
|
||||
@@ -65,6 +65,34 @@ void wlr_text_input_v3_send_done(struct wlr_text_input_v3 *text_input) {
|
||||
text_input->current_serial);
|
||||
}
|
||||
|
||||
+void wlr_text_input_v3_action(struct wlr_text_input_v3 *text_input,
|
||||
+ enum zwp_text_input_v3_action action) {
|
||||
+ uint32_t serial = wl_display_next_serial(text_input->seat->display);
|
||||
+ uint32_t version = wl_resource_get_version(text_input->resource);
|
||||
+ if (version >= ZWP_TEXT_INPUT_V3_ACTION_SINCE_VERSION) {
|
||||
+ zwp_text_input_v3_send_action(text_input->resource, action,
|
||||
+ serial);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void wlr_text_input_v3_send_language(struct wlr_text_input_v3 *text_input,
|
||||
+ const char *language) {
|
||||
+ uint32_t version = wl_resource_get_version(text_input->resource);
|
||||
+ if (version >= ZWP_TEXT_INPUT_V3_LANGUAGE_SINCE_VERSION) {
|
||||
+ zwp_text_input_v3_send_language(text_input->resource, language);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void wlr_text_input_v3_send_preedit_hint(struct wlr_text_input_v3 *text_input,
|
||||
+ uint32_t start, uint32_t end,
|
||||
+ enum zwp_text_input_v3_preedit_hint hint) {
|
||||
+ uint32_t version = wl_resource_get_version(text_input->resource);
|
||||
+ if (version >= ZWP_TEXT_INPUT_V3_PREEDIT_HINT_SINCE_VERSION) {
|
||||
+ zwp_text_input_v3_send_preedit_hint(text_input->resource,
|
||||
+ start, end, hint);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void wlr_text_input_destroy(struct wlr_text_input_v3 *text_input) {
|
||||
wl_signal_emit_mutable(&text_input->events.destroy, NULL);
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
From c2e4c357708b8879ed33a3f991765358fa29102f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c2e4c357708b8879ed33a3f991765358fa29102f.1789130119.git.agx@sigxcpu.org>
|
||||
In-Reply-To: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
References: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Fri, 11 Sep 2026 12:18:31 +0200
|
||||
Subject: [PATCH 3/4] text-input-v3: Add version 2 requests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
include/wlr/types/wlr_text_input_v3.h | 4 ++
|
||||
types/wlr_text_input_v3.c | 58 +++++++++++++++++++++++++++
|
||||
2 files changed, 62 insertions(+)
|
||||
|
||||
diff --git a/include/wlr/types/wlr_text_input_v3.h b/include/wlr/types/wlr_text_input_v3.h
|
||||
index 14285688c..d176457c7 100644
|
||||
--- a/include/wlr/types/wlr_text_input_v3.h
|
||||
+++ b/include/wlr/types/wlr_text_input_v3.h
|
||||
@@ -38,6 +38,7 @@ struct wlr_text_input_v3_state {
|
||||
} content_type;
|
||||
|
||||
struct wlr_box cursor_rectangle;
|
||||
+ enum zwp_text_input_v3_action available_actions;
|
||||
|
||||
// Tracks which features were used in the current commit.
|
||||
// Useful in the enabling commit, where usage means support.
|
||||
@@ -63,6 +64,9 @@ struct wlr_text_input_v3 {
|
||||
struct wl_signal commit;
|
||||
struct wl_signal disable;
|
||||
struct wl_signal destroy;
|
||||
+ // v2 additions
|
||||
+ struct wl_signal show_input_panel;
|
||||
+ struct wl_signal hide_input_panel;
|
||||
} events;
|
||||
|
||||
struct {
|
||||
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
|
||||
index 5ec84e120..3fba5bc35 100644
|
||||
--- a/types/wlr_text_input_v3.c
|
||||
+++ b/types/wlr_text_input_v3.c
|
||||
@@ -100,6 +100,8 @@ static void wlr_text_input_destroy(struct wlr_text_input_v3 *text_input) {
|
||||
assert(wl_list_empty(&text_input->events.commit.listener_list));
|
||||
assert(wl_list_empty(&text_input->events.disable.listener_list));
|
||||
assert(wl_list_empty(&text_input->events.destroy.listener_list));
|
||||
+ assert(wl_list_empty(&text_input->events.show_input_panel.listener_list));
|
||||
+ assert(wl_list_empty(&text_input->events.hide_input_panel.listener_list));
|
||||
|
||||
text_input_clear_focused_surface(text_input);
|
||||
wl_list_remove(&text_input->seat_destroy.link);
|
||||
@@ -231,6 +233,56 @@ static void text_input_commit(struct wl_client *client,
|
||||
}
|
||||
}
|
||||
|
||||
+static void text_input_show_input_panel(struct wl_client *client,
|
||||
+ struct wl_resource *resource) {
|
||||
+ struct wlr_text_input_v3 *text_input = text_input_from_resource(resource);
|
||||
+ if (!text_input) {
|
||||
+ return;
|
||||
+ }
|
||||
+ wl_signal_emit_mutable(&text_input->events.show_input_panel, NULL);
|
||||
+}
|
||||
+
|
||||
+static void text_input_hide_input_panel(struct wl_client *client,
|
||||
+ struct wl_resource *resource) {
|
||||
+ struct wlr_text_input_v3 *text_input = text_input_from_resource(resource);
|
||||
+ if (!text_input) {
|
||||
+ return;
|
||||
+ }
|
||||
+ wl_signal_emit_mutable(&text_input->events.hide_input_panel, NULL);
|
||||
+}
|
||||
+
|
||||
+static void text_input_set_available_actions(struct wl_client *client,
|
||||
+ struct wl_resource *resource, struct wl_array *actions) {
|
||||
+ struct wlr_text_input_v3 *text_input = text_input_from_resource(resource);
|
||||
+ if (!text_input) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ enum zwp_text_input_v3_action available = ZWP_TEXT_INPUT_V3_ACTION_NONE;
|
||||
+ uint32_t *action;
|
||||
+ wl_array_for_each(action, actions) {
|
||||
+ switch (*action) {
|
||||
+ case ZWP_TEXT_INPUT_V3_ACTION_SUBMIT:
|
||||
+ if (available & ZWP_TEXT_INPUT_V3_ACTION_SUBMIT) {
|
||||
+ wl_resource_post_error(resource,
|
||||
+ ZWP_TEXT_INPUT_V3_ERROR_INVALID_ACTION,
|
||||
+ "Duplicate submit action");
|
||||
+ return;
|
||||
+ }
|
||||
+ available |= ZWP_TEXT_INPUT_V3_ACTION_SUBMIT;
|
||||
+ break;
|
||||
+ case ZWP_TEXT_INPUT_V3_ACTION_NONE:
|
||||
+ wl_resource_post_error(resource,
|
||||
+ ZWP_TEXT_INPUT_V3_ERROR_INVALID_ACTION,
|
||||
+ "Invalid none action");
|
||||
+ return;
|
||||
+ default:
|
||||
+ wlr_log(WLR_DEBUG, "Unknown action %u", *action);
|
||||
+ }
|
||||
+ }
|
||||
+ text_input->pending.available_actions = available;
|
||||
+}
|
||||
+
|
||||
static const struct zwp_text_input_v3_interface text_input_impl = {
|
||||
.destroy = text_input_destroy,
|
||||
.enable = text_input_enable,
|
||||
@@ -240,6 +292,10 @@ static const struct zwp_text_input_v3_interface text_input_impl = {
|
||||
.set_content_type = text_input_set_content_type,
|
||||
.set_cursor_rectangle = text_input_set_cursor_rectangle,
|
||||
.commit = text_input_commit,
|
||||
+ // v2 additions
|
||||
+ .show_input_panel = text_input_show_input_panel,
|
||||
+ .hide_input_panel = text_input_hide_input_panel,
|
||||
+ .set_available_actions = text_input_set_available_actions,
|
||||
};
|
||||
|
||||
static const struct zwp_text_input_manager_v3_interface text_input_manager_impl;
|
||||
@@ -299,6 +355,8 @@ static void text_input_manager_get_text_input(struct wl_client *client,
|
||||
wl_signal_init(&text_input->events.commit);
|
||||
wl_signal_init(&text_input->events.disable);
|
||||
wl_signal_init(&text_input->events.destroy);
|
||||
+ wl_signal_init(&text_input->events.show_input_panel);
|
||||
+ wl_signal_init(&text_input->events.hide_input_panel);
|
||||
|
||||
text_input->resource = text_input_resource;
|
||||
wl_resource_set_user_data(text_input_resource, text_input);
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 2049e1494b7e99d816cfb469111cb4a290e422dc Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <2049e1494b7e99d816cfb469111cb4a290e422dc.1789130119.git.agx@sigxcpu.org>
|
||||
In-Reply-To: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
References: <48f2eeff1bd020877b9c14c2b84e1a94bf79f3d8.1789130119.git.agx@sigxcpu.org>
|
||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Fri, 11 Sep 2026 13:13:02 +0200
|
||||
Subject: [PATCH 4/4] text-input-v3: Bump protocol version to 2
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
---
|
||||
types/wlr_text_input_v3.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
|
||||
index 3fba5bc35..9a6be20a2 100644
|
||||
--- a/types/wlr_text_input_v3.c
|
||||
+++ b/types/wlr_text_input_v3.c
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <wlr/util/log.h>
|
||||
#include "text-input-unstable-v3-protocol.h"
|
||||
|
||||
-#define TEXT_INPUT_VERSION 1
|
||||
+#define TEXT_INPUT_VERSION 2
|
||||
|
||||
static void text_input_clear_focused_surface(struct wlr_text_input_v3 *text_input) {
|
||||
wl_list_remove(&text_input->surface_destroy.link);
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit meson
|
||||
|
||||
DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
|
||||
HOMEPAGE="https://gitlab.freedesktop.org/wlroots/wlroots"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git"
|
||||
inherit git-r3
|
||||
SLOT="0.19"
|
||||
else
|
||||
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/releases/${PV}/downloads/${P}.tar.gz"
|
||||
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
|
||||
SLOT="$(ver_cut 1-2)"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
IUSE="liftoff +libinput +drm +session lcms vulkan x11-backend xcb-errors X +phoc-patch"
|
||||
REQUIRED_USE="
|
||||
drm? ( session )
|
||||
libinput? ( session )
|
||||
liftoff? ( drm )
|
||||
xcb-errors? ( || ( x11-backend X ) )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/wayland-1.23.1
|
||||
media-libs/libglvnd
|
||||
>=media-libs/mesa-24.1.0_rc1[opengl]
|
||||
>=x11-libs/libdrm-2.4.122
|
||||
>=x11-libs/libxkbcommon-1.8.0
|
||||
>=x11-libs/pixman-0.43.0
|
||||
drm? (
|
||||
media-libs/libdisplay-info:=
|
||||
sys-apps/hwdata
|
||||
liftoff? ( >=dev-libs/libliftoff-0.4 )
|
||||
)
|
||||
lcms? ( media-libs/lcms:2 )
|
||||
libinput? ( >=dev-libs/libinput-1.19.0:= )
|
||||
session? (
|
||||
sys-auth/seatd:=
|
||||
virtual/libudev
|
||||
)
|
||||
vulkan? (
|
||||
dev-util/glslang:=
|
||||
dev-util/vulkan-headers
|
||||
media-libs/vulkan-loader
|
||||
)
|
||||
xcb-errors? ( x11-libs/xcb-util-errors )
|
||||
x11-backend? (
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/xcb-util-renderutil
|
||||
)
|
||||
X? (
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/xcb-util-wm
|
||||
x11-base/xwayland
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-libs/wayland-protocols-1.41
|
||||
dev-util/wayland-scanner
|
||||
virtual/pkgconfig
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
# assert SLOT matches the version
|
||||
grep -q -e "version.*${SLOT}" meson.build || die "SLOT ${SLOT} does not match the version in meson.build"
|
||||
|
||||
local backends=(
|
||||
$(usev drm)
|
||||
$(usev libinput)
|
||||
$(usev x11-backend 'x11')
|
||||
)
|
||||
local meson_backends=$(IFS=','; echo "${backends[*]}")
|
||||
local emesonargs=(
|
||||
$(meson_feature xcb-errors)
|
||||
-Dexamples=false
|
||||
-Drenderers=$(usex vulkan 'gles2,vulkan' gles2)
|
||||
$(meson_feature X xwayland)
|
||||
-Dbackends=${meson_backends}
|
||||
$(meson_feature session)
|
||||
$(meson_feature lcms color-management)
|
||||
$(meson_feature liftoff libliftoff)
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
dodoc docs/*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use !session; then
|
||||
elog "You must be in the input group to allow your compositor"
|
||||
elog "to access input devices via libinput."
|
||||
fi
|
||||
}
|
||||
@@ -80,6 +80,11 @@ fi
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch
|
||||
"${FILESDIR}"/0001-text-input-v3-Introduce-version.patch
|
||||
"${FILESDIR}"/0002-text-input-Add-version-2-events.patch
|
||||
"${FILESDIR}"/0003-text-input-v3-Add-version-2-requests.patch
|
||||
"${FILESDIR}"/0004-text-input-v3-Bump-protocol-version-to-2.patch
|
||||
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
Reference in new issue
Block a user