[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02fb5ced-8ff0-4bc3-9c84-c2a2594f8b25@infradead.org>
Date: Sun, 29 Jun 2025 22:23:24 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Masahiro Yamada <masahiroy@...nel.org>, linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 53/66] kconfig: gconf: use size_allocate event handler
On 6/29/25 10:56 AM, Masahiro Yamada wrote:
> On Wed, Jun 25, 2025 at 12:09 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>>
>> The size_request event is not available in GTK 3. Use the size_allocate
>> event handler instead.
>>
>> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>> ---
>
> This has a regression - with this, we cannot move
> the horizontal separator between in the right pane.
Between the menu items and the message area?
That's what I see.
>
> I will use the "configure-event" event instead.
>
>>
>> scripts/kconfig/gconf.c | 20 ++++++--------------
>> 1 file changed, 6 insertions(+), 14 deletions(-)
>>
>> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
>> index b86d54c222e3..6487d6a0dd9d 100644
>> --- a/scripts/kconfig/gconf.c
>> +++ b/scripts/kconfig/gconf.c
>> @@ -660,21 +660,13 @@ static void on_window1_destroy(GtkObject *object, gpointer user_data)
>> gtk_main_quit();
>> }
>>
>> -static void on_window1_size_request(GtkWidget *widget,
>> - GtkRequisition *requisition,
>> +static void on_window_size_allocate(GtkWidget *widget,
>> + GtkAllocation *allocation,
>> gpointer user_data)
>> {
>> - static gint old_h;
>> - gint w, h;
>> + gint h;
>>
>> - if (widget->window == NULL)
>> - gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
>> - else
>> - gdk_window_get_size(widget->window, &w, &h);
>> -
>> - if (h == old_h)
>> - return;
>> - old_h = h;
>> + h = allocation->height;
>>
>> gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
>> }
>> @@ -1000,8 +992,8 @@ static void init_main_window(const gchar *glade_file)
>> main_wnd = glade_xml_get_widget(xml, "window1");
>> g_signal_connect(main_wnd, "destroy",
>> G_CALLBACK(on_window1_destroy), NULL);
>> - g_signal_connect(main_wnd, "size_request",
>> - G_CALLBACK(on_window1_size_request), NULL);
>> + g_signal_connect(main_wnd, "size_allocate",
>> + G_CALLBACK(on_window_size_allocate), NULL);
>> g_signal_connect(main_wnd, "delete_event",
>> G_CALLBACK(on_window1_delete_event), NULL);
>>
>> --
>> 2.43.0
>>
>
>
--
~Randy
Powered by blists - more mailing lists