[hafqa] [hafqa] [Bug 3501] New: hildon_window_update_topmost() does not check for invisible windows

From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.org
Date: Sat Jul 26 14:16:54 EEST 2008
https://bugs.maemo.org/show_bug.cgi?id=3501

           Summary: hildon_window_update_topmost() does not check for
                    invisible windows
           Product: System software
           Version: 4.1
          Platform: All
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Low
         Component: hildon-libs
        AssignedTo: nobody at maemo.org
        ReportedBy: anpaza at mail.ru
         QAContact: hildon-libs-bugs at maemo.org


I've hit a small problem with the hildon library.

The application I'm debugging creates two top-level windows. However, only one
of them is initially visible, the second is created invisible and made visible
later when needed.

I've replaced gtk_window_new() calls with hildon_window_new() calls, and added
hildon_program_add_window() calls right after creating the window. However,
when I run the application, I always get the following warning during startup:

GLIB WARNING ** Gdk - gdkdrawable-x11.c:878 drawable is not a pixmap or window

I've debugged the problem down to hildon-window.c, function
hildon_window_update_topmost. It contains a line:

my_window = GDK_WINDOW_XID (GTK_WIDGET(self)->window);

Problem is, when it's called for the window that wasn't yet mapped
(hildon_window_realize() was not called), the 'window' field in GtkWidget is
zero, this GDK_WINDOW_XID call will emit a warning.

To work around this problem I have either to delay the
hildon_program_add_window() call until the window is actually made visible, or
after adding the window to HildonProgram call immediately gtk_widget_show()
followed by a gtk_widget_hide().

I think hildon_window_update_topmost() should ignore invisible widgets at all.


-- 
Configure bugmail: https://bugs.maemo.org/userprefs.cgi?tab=email
Replies to this email are NOT read, instead please add comments at
https://bugs.maemo.org/show_bug.cgi?id=3501
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the hafqa mailing list