From: Masahiro Yamada Date: Sun, 29 Jun 2025 18:43:28 +0000 (+0900) Subject: kconfig: gconf: use configure-event handler to adjust pane separator X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06ba76dc825703fa61cee72c2ae66508ef5f10ec;p=thirdparty%2Fkernel%2Flinux.git kconfig: gconf: use configure-event handler to adjust pane separator The size-request event handler is currently used to adjust the position of the horizontal separator in the right pane. However, the size-request signal is not available in GTK 3. Use the configure-event signal instead. Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap --- diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 7397a51641a7..37eec7a6bf54 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -606,23 +606,12 @@ static void on_window1_destroy(GtkObject *object, gpointer user_data) gtk_main_quit(); } -static void on_window1_size_request(GtkWidget *widget, - GtkRequisition *requisition, - gpointer user_data) +static gboolean on_window1_configure(GtkWidget *self, + GdkEventConfigure *event, + gpointer user_data) { - static gint old_h; - gint w, 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; - - gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3); + gtk_paned_set_position(GTK_PANED(vpaned), 2 * event->height / 3); + return FALSE; } static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event, @@ -1023,8 +1012,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, "configure-event", + G_CALLBACK(on_window1_configure), NULL); g_signal_connect(main_wnd, "delete_event", G_CALLBACK(on_window1_delete_event), NULL);