[Bug 3639] Combo entry popup does not hide when entry loses focus.

bugzilla-daemon at async.com.br bugzilla-daemon at async.com.br
Tue Feb 19 17:57:42 BRT 2008


http://bugs.async.com.br/show_bug.cgi?id=3639





--- Comment #2 from Ronaldo Maia <romaia at async.com.br>  2008-02-19 17:57:41 BRT ---
(In reply to comment #1)
> (From update of attachment 4565 [details])
> >Index: kiwi/ui/entrycompletion.py
> 
> >+    def _popup_grab_window(self):
> >+        activate_time = 0L
> >+        if gdk.pointer_grab(self._entry.window, True,
> >+                            (gdk.BUTTON_PRESS_MASK |
> >+                             gdk.BUTTON_RELEASE_MASK |
> >+                             gdk.POINTER_MOTION_MASK),
> >+                             None, None, activate_time) == 0:
> >+            if gdk.keyboard_grab(self._entry.window, True, activate_time) == 0:
> >+                return True
> >+            else:
> >+                self._entry.window.get_display().pointer_ungrab(activate_time);
> >+                return False
> >+        return False
> 
> This looks kind of strange. Do you really need to grab *both* the mouse and the
> keyboard?

That's how it is done when clicking the toggle button (I assume you wrote that
code)

> 
> >+    def _popup_ungrab_window(self):
> >+        activate_time = 0L
> 
> isn't get gdk.get_current_time() or something? (GDK_CURRENT_TIME in C iirc)
> How is this done in gtk+?

According to the docs, 0L is same as using current time.

> 
> >+        self._entry.window.get_display().pointer_ungrab(activate_time);
> >+        self._entry.window.get_display().keyboard_ungrab(activate_time);
> 
> Ehum, duplicate code?

I will fix that.


-- 
Configure bugmail: http://bugs.async.com.br/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Kiwi mailing list