[hafqa] [hafqa] [Bug 2070] When applicationn lasts on respond, long ESC keypress could not work or short ESC keypress could close the app.

From: bugzilla-daemon at lists.maemo.org bugzilla-daemon at lists.maemo.org
Date: Tue Oct 16 11:26:54 EEST 2007
https://bugs.maemo.org/show_bug.cgi?id=2070





------- Comment #5 from tommi.komulainen at nokia.com  2007-10-16 11:26 GMT+3 -------
(From update of attachment 562)
Looks OK to me. Though the ChangeLog should describe the problem and the why a
bit more than the how which can be seen from the patch.


>+                /* Added with lower priority to avoid queued key
>+                   release events being proccessed later than the
>+                   timeout */
>+                priv->escape_timeout = g_timeout_add_full
>+                  ((G_PRIORITY_DEFAULT + 1),

You should use GDK_PRIORITY_EVENTS + 1 there.


>+                if ((event->time - priv->escape_press_time) >=
>+                    HILDON_WINDOW_LONG_PRESS_TIME)
>+                  {
>+                    hildon_window_fake_close_event (widget);
>+                  }

There should be a comment there as it's not immediately obvious why you might
want to close the window on release. After all, there's a timeout used for
closing.


>       g_source_remove (priv->escape_timeout);
>       priv->escape_timeout = 0;
>+      priv->escape_press_time = 0;

Unsetting escape_press_time seems superfluous as its handling is always
preceded with check for priv->escape_timeout. No strong feelings, but if you
prefer unsetting the value you should do it consistently, also in
hildon_window_escape_timeout()


-- 
Configure bugmail: https://bugs.maemo.org/userprefs.cgi?tab=email
------- 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