Bug 724 - submenu disappears immediately when popped up
: submenu disappears immediately when popped up
Status: CLOSED FIXED
Product: Desktop platform
gtk
: 2.0
: All Maemo
: Medium normal (vote)
: ---
Assigned To: Tommi Komulainen
: HAF QA mailing list
:
:
:
:
  Show dependency tree
 
Reported: 2006-07-27 09:16 UTC by Pengcheng Zou
Modified: 2007-12-04 14:24 UTC (History)
1 user (show)

See Also:


Attachments
fix the submenu disappear problem (482 bytes, patch)
2006-07-27 09:17 UTC, Pengcheng Zou
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Pengcheng Zou (reporter) 2006-07-27 09:16:02 UTC
once the submenu of home menu popped up, it will disappear at once. 

i traced the program, and find out that the
gtk_menu_window_visibility_notify_event (defined in gtk/gtkmenu.c) is triggered
when the submenu shows (which is correct), however, when it calls (indirectly)
gdk_window_get_type_hint() (defined in gdk/x11/gdkwindow-x11.c) to know if the
window above is of type MENU of not, it gets the wrong answer.

it seems to be a bug, and here is a patch to fix it:

--- gtk+.orig/gdk/x11/gdkwindow-x11.c   2006-07-27 13:47:51.787949368 -0400
+++ gtk+/gdk/x11/gdkwindow-x11.c        2006-07-27 13:49:37.431889048 -0400
@@ -2261,7 +2261,7 @@
   if ((type_return == XA_ATOM) && (format_return == 32) &&
       (data) && (nitems_return == 1))
     {
-      Atom atom = (Atom) *data;
+      Atom atom = *(Atom*)data;

       if (atom == gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_WINDOW_TYPE_DIALOG"))
         type = GDK_WINDOW_TYPE_HINT_DIALOG;
Comment 1 Pengcheng Zou (reporter) 2006-07-27 09:17:54 UTC
Created an attachment (id=99) [details]
fix the submenu disappear problem
Comment 2 Tommi Komulainen nokia 2006-07-27 18:17:11 UTC
It would probably be a good idea to double-check all the written-from-scratch
code for similar bugs...
Comment 3 Tommi Komulainen nokia 2006-08-21 16:06:05 UTC
gtk bug, mine
Comment 4 Tommi Komulainen nokia 2006-08-21 18:00:34 UTC
Fixed in gtk+2.0 (2:2.6.10-2.osso9)

The patch has also been committed upstream. Thanks for the patch.
Comment 5 Jake Kunnari 2007-12-04 14:24:33 UTC
Closing RESOLVED and FIXED bug. No one has not touched or commented in last 180
days. If error/problem still occurs please reopen bug with comments.