From 4ca98f9b98c93dd1e63a2f6fcea14b909a110f54 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Fri, 21 Jun 2024 11:03:45 +0200 Subject: desktop-wayland: Migrate to gui-wm/sway Sadly it seems that gui-wm/hikari is no longer under active development and stuck on an old wlroots version. Programs based on gtk4 have never worked correctly [1], even when patched [2], mouse grabbing doesn't work reliably [3], and tools like mpv have begun making assumptions on what kind of features are available in compositors [4]. gui-wm/sway seems to be the best alternative for now. [1] https://hub.darcs.net/raichoo/hikari/issue/26 [2] https://cgit.freebsd.org/ports/commit/?id=5d9c5b9cac42a22716f292fca5717c9842fdf464 [3] https://hub.darcs.net/raichoo/hikari/issue/49 [4] https://github.com/mpv-player/mpv/commit/e32554cd570d984efb712a7214a40237233a3cea --- .../package.accept_keywords/09-desktop-wayland | 4 -- desktop-wayland/package.use/09-desktop-wayland | 4 +- ...est-refresh-rate-for-preferred-resolution.patch | 45 ---------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 desktop-wayland/package.accept_keywords/09-desktop-wayland delete mode 100644 desktop-wayland/patches/gui-wm/hikari/0001-Pick-highest-refresh-rate-for-preferred-resolution.patch (limited to 'desktop-wayland') diff --git a/desktop-wayland/package.accept_keywords/09-desktop-wayland b/desktop-wayland/package.accept_keywords/09-desktop-wayland deleted file mode 100644 index d74dac1..0000000 --- a/desktop-wayland/package.accept_keywords/09-desktop-wayland +++ /dev/null @@ -1,4 +0,0 @@ -gui-wm/hikari - -# needed for gui-wm/hikari -dev-libs/libucl diff --git a/desktop-wayland/package.use/09-desktop-wayland b/desktop-wayland/package.use/09-desktop-wayland index 940e031..bc24211 100644 --- a/desktop-wayland/package.use/09-desktop-wayland +++ b/desktop-wayland/package.use/09-desktop-wayland @@ -5,6 +5,7 @@ */* -X dev-qt/qtgui eglfs +gui-wm/sway -swaybar media-libs/libepoxy X x11-libs/gtk+ X @@ -22,9 +23,6 @@ x11-libs/cairo X media-libs/mesa X media-libs/libglvnd X -# needed for gui-wm/hikari -dev-libs/libucl LUA_SINGLE_TARGET: lua5-1 - # needed for net-misc/remmina net-misc/freerdp X diff --git a/desktop-wayland/patches/gui-wm/hikari/0001-Pick-highest-refresh-rate-for-preferred-resolution.patch b/desktop-wayland/patches/gui-wm/hikari/0001-Pick-highest-refresh-rate-for-preferred-resolution.patch deleted file mode 100644 index ab707ea..0000000 --- a/desktop-wayland/patches/gui-wm/hikari/0001-Pick-highest-refresh-rate-for-preferred-resolution.patch +++ /dev/null @@ -1,45 +0,0 @@ -From b15060d4191fde43e599e1fdf1beaf4a1d238075 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= -Date: Sun, 15 May 2022 18:20:38 +0200 -Subject: [PATCH] Pick highest refresh rate for preferred resolution - -When configuring an output, hikari uses the first mode it finds. This -means that we may not end up with the highest refresh rate for a given -resolution. Since we usually want to make use of higher refresh rates, -find the monitor's preferred resolution and pick a corresponding mode -with the highest refresh rate. ---- - src/output.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/src/output.c b/src/output.c -index 5b0fd56..b2a7dc6 100644 ---- a/src/output.c -+++ b/src/output.c -@@ -254,10 +254,19 @@ hikari_output_init(struct hikari_output *output, struct wlr_output *wlr_output) - output->damage_destroy.notify = damage_destroy_handler; - wl_signal_add(&output->damage->events.destroy, &output->damage_destroy); - -- if (!wl_list_empty(&wlr_output->modes)) { -- struct wlr_output_mode *mode = -- wl_container_of(wlr_output->modes.next, mode, link); -- wlr_output_set_mode(wlr_output, mode); -+ struct wlr_output_mode *preferred = wlr_output_preferred_mode(wlr_output); -+ -+ if (preferred) { -+ struct wlr_output_mode *mode, *best = preferred; -+ -+ wl_list_for_each(mode, &wlr_output->modes, link) { -+ if (mode->width == preferred->width && -+ mode->height == preferred->height && -+ mode->refresh > best->refresh) -+ best = mode; -+ } -+ -+ wlr_output_set_mode(wlr_output, best); - } - - wl_list_init(&output->damage_frame.link); --- -2.35.1 - -- cgit v1.2.3-2-gb3c3