linuxOS_AP06/buildroot/package/weston/0082-client-desktop-shell-Set-minimum-size-for-panel-and-.patch
2025-06-03 12:28:32 +08:00

44 lines
1.5 KiB
Diff

From 6bc85d83bf6fc9f591c1ac43fca8aa8fd8d221e2 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Sun, 4 Feb 2024 15:18:21 +0800
Subject: [PATCH 82/95] client: desktop-shell: Set minimum size for panel and
background
See:
https://gitlab.freedesktop.org/wayland/weston/-/issues/782
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
clients/desktop-shell.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 30292df..b8ded46 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -773,6 +773,10 @@ panel_create(struct desktop *desktop, struct output *output)
panel->owner = output;
panel->base.configure = panel_configure;
panel->window = window_create_custom(desktop->display);
+
+ /* set minimum size */
+ window_schedule_resize(panel->window, 1, 1);
+
panel->widget = window_add_widget(panel->window, panel);
wl_list_init(&panel->launcher_list);
@@ -1864,6 +1868,10 @@ background_create(struct desktop *desktop, struct output *output)
background->owner = output;
background->base.configure = background_configure;
background->window = window_create_custom(desktop->display);
+
+ /* set minimum size */
+ window_schedule_resize(background->window, 1, 1);
+
background->widget = window_add_widget(background->window, background);
window_set_user_data(background->window, background);
widget_set_redraw_handler(background->widget, background_draw);
--
2.20.1