Re: [directfb-dev] GtkComboBox drop down list covered by GtkDialogs



Hello list!

With respect to the pop up window not being in the  DWSC_UPPER class the problem seems to
be that gdk_window_set_type_hint() is not fully implemented. I have added the handling for
GDK_WINDOW_TYPE_HINT_POPUP_MENU:

--- gdk/directfb/gdkwindow-directfb_orig.c	2008-02-28 16:02:53.000000000 +0100
+++ gdk/directfb/gdkwindow-directfb.c	2008-02-28 16:26:04.000000000 +0100
@@ -2255,6 +2255,8 @@
 gdk_window_set_type_hint (GdkWindow        *window,
                           GdkWindowTypeHint hint)
 {
+  GdkWindowImplDirectFB *impl;
+
   g_return_if_fail (GDK_IS_WINDOW (window));

   if (GDK_WINDOW_DESTROYED (window))
@@ -2263,7 +2265,19 @@
   GDK_NOTE (MISC, g_print ("gdk_window_set_type_hint: 0x%x: %d\n",
                GDK_WINDOW_DFB_ID (window), hint));

-  ((GdkWindowImplDirectFB *)((GdkWindowObject *)window)->impl)->type_hint = hint;
+  impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
+
+  impl->type_hint = hint;
+
+  switch (hint)
+  {
+     	case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
+        	impl->window->SetStackingClass (impl->window, DWSC_UPPER);
+        	impl->window->RaiseToTop (impl->window);
+      		break;
+	default:
+		;
+  };


   /* N/A */

With this patch the dfbdump output seems ok:

-----------------------------------[ Windows of Layer 0 ]-----------------------------------------
Reference   FID  . Refs     X     Y   Width Height Opacity   ID     Capabilities   State & Options
--------------------------------------------------------------------------------------------------
0x00000018 [  1] :   6      2,    2     71 x   81    0x00     4  ^  alphachannel   FOCUSED
0x00000014 [  1] :   3      0,    0     75 x   45    0xff     2  ^  alphachannel
0x00000017 [  1] :   1   -100, -100     10 x   10    0x00     3  -  input only
0x00000012 [  1] :   2      0,    0    640 x  480    0x00     1  -  alphachannel


I have the following open questions:
- What is an "input only" window?
- Who's creating this extra GdkWindow just for input and why?
- Why are DirectFB windows not collected (freed) after they are closed?
  For example, after closing a dialog, it continues appearing in the dfbdump output.

Other problems
- The dropdown list loses focus after being clicked. You must move the mouse slightly for it to gain focus again.
- Why does the combo box not use GDK_WINDOW_TYPE_HINT_COMBO, rather than GDK_WINDOW_TYPE_HINT_POPUP_MENU?
  (Ok, this is probably a gtk+ question)

--
Mit freundlichen Grüßen

Jesus Ruiz de Infante
(Entwicklung)
HALE electronic GmbH
Eugen-Müller-Straße 18, 5020 Salzburg, Austria
Tel:  +43 (662) 439011 0
Fax:  +43 (662) 439011 9
jesus ruizdeinfante hale at
Firmenbuchnummer: FN 66801m HG Salzburg



--
Scanned by MailScanner.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]