GNOME Bugzilla – Bug 536765
GtkComboBox should set COMBO type hint for its menu
Last modified: 2008-06-11 03:36:49 UTC
Please describe the problem: GtkComboBox should set type GDK_WINDOW_TYPE_HINT_COMBO hint for its popup menu. CUrrently, that's done for the list window, but not the menu. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 112199 [details] [review] Set Combo type hint for menu This patch adds the window type hint setting for the menu.
Created attachment 112208 [details] [review] Set com
Created attachment 112209 [details] [review] Set Combo type hint for menu Sorry for half-finished previous attachment. Updated patch to also set the type hint for GtkOptionMenu. Even if that widget is declared deprecated, a number of programs, such as pidgin, still use it.
I believe GtkComboBox already sets the hint, see line 1369. The GtkOptionMenu part of the patch looks fine, feel free to commit that.
(In reply to comment #4) > I believe GtkComboBox already sets the hint, see line 1369. I initially thought that, too, and wondered why the damn thing had POPUP_MENU type ;) gtk_combo_box_set_popup_widget, the function around line 1369, can be called from gtk_combo_box_menu_setup and gtk_combo_box_list_setup, depending on the type of the combo box. Line 1369 is only executed for the list case, thus in the menu case the popup has the POPUP_MENU type, as it's essentially a menu (line 2780). gtkmenu.c:3883 says "Set the type hint here to allow custom position functions to set a different hint" before setting the type hint, which is exactly what my patch is doing, so the combo box appears with combo box type and not with menu type.
ok then, go ahead and commit.
Bug 536765 – GtkComboBox should set COMBO type hint for its menu * gtk/gtkoptionmenu.c: * gtk/gtkcombobox.c: Set the window type hint on popups. Patch by Danny Baumann