[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: Mon Oct 15 14:16:09 EEST 2007
https://bugs.maemo.org/show_bug.cgi?id=2070


xan.lopez at nokia.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tommi.komulainen at nokia.com




------- Comment #3 from xan.lopez at nokia.com  2007-10-15 14:16 GMT+3 -------
Hey, thanks for the patch. Just a few comments:

- In the future could you use -p for the diff command? It makes reading patches
easier, as it gives more context.

+                /* 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),
+                   HILDON_WINDOW_LONG_PRESS_TIME,
+                   hildon_window_escape_timeout,
+                   widget,
+                   NULL);

This looks like a good idea to me, and I think that we should apply it
regardless of what we do with the rest of the patch. The parenthesis around
G_PRIORITY_DEFAULT + 1 is not needed though :)

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

This on the other hand, I'm not so sure. It is a hack, and I can imagine
situations where it could break (like getting a ButtonRelease without a
ButtonPress. Yes, it can happen). Shouldn't lowering the priority of the
timeout  be enough to prevent it from running before queued events that got
stuck because the application is blocking the main loop?

I'll add Tommi in CC so he can comment about this.


-- 
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