After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 536765 - GtkComboBox should set COMBO type hint for its menu
GtkComboBox should set COMBO type hint for its menu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.13.x
Other All
: Normal trivial
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-05 09:20 UTC by Danny Baumann
Modified: 2008-06-11 03:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set Combo type hint for menu (401 bytes, patch)
2008-06-05 09:21 UTC, Danny Baumann
none Details | Review
Set com (1000 bytes, patch)
2008-06-05 12:31 UTC, Danny Baumann
none Details | Review
Set Combo type hint for menu (1000 bytes, patch)
2008-06-05 12:33 UTC, Danny Baumann
committed Details | Review

Description Danny Baumann 2008-06-05 09:20:23 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:
Comment 1 Danny Baumann 2008-06-05 09:21:02 UTC
Created attachment 112199 [details] [review]
Set Combo type hint for menu

This patch adds the window type hint setting for the menu.
Comment 2 Danny Baumann 2008-06-05 12:31:11 UTC
Created attachment 112208 [details] [review]
Set com
Comment 3 Danny Baumann 2008-06-05 12:33:29 UTC
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.
Comment 4 Matthias Clasen 2008-06-08 04:53:15 UTC
I believe GtkComboBox already sets the hint, see line 1369.
The GtkOptionMenu part of the patch looks fine, feel free to commit that.
Comment 5 Danny Baumann 2008-06-08 06:56:30 UTC
(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.
Comment 6 Matthias Clasen 2008-06-09 01:29:05 UTC
ok then, go ahead and commit.
Comment 7 Matthias Clasen 2008-06-11 03:36:49 UTC
        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