×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    21

    How do I detect 'Swipe to Close App' on N9

    Hi,
    Our Qt game has failed Ovi store acceptance because it does not close in response to a Swipe Down but goes to recents instead. I thought this was taken care of by the OS sending the App a close event, but it might be under game control because i also read the swipe 'down' would be dependent on whether the game is playing in portrait or landscape mode, which the OS might not know.

    So the question is: Is the OS responsible for sending a Close event or if not How does the game capture which swipe was made ? I have an event filter and am catching the WindowDeactivate and pausing the game. This seems to get called on swipe down as well as any other swipe to minimise. I can't tell the difference, am i missing some extra event data?
    Thank you.
    Last edited by DodoBoy; 2011-09-19 at 22:18.

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: How do I detect 'Swipe to Close App' on N9

    Hi,
    When users want to close an application, the WM sends a X11 close event to Application [1] which is converted to QCloseEvent [2].
    So what you need to do is listen for it or just subclass QWidget::closeEvent.

    The window manager doesn't kill any process. Application must terminate with an exit 0 if closed correctly.

    [1] http://cboard.cprogramming.com/linux...dow-event.html
    [2] http://doc.qt.nokia.com/stable/qcloseevent.html

  3. #3
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    150

    Re: How do I detect 'Swipe to Close App' on N9

    you might check this discussion thread: http://developer.qt.nokia.com/forums/viewthread/9878/ - it could be closely related to your problem.

  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    21

    Re: How do I detect 'Swipe to Close App' on N9

    thanks ... that link was very useful.

    I think the problem is the OS doesn't know the game is in Portrait orientation because i rotate the graphics using glRot(x), so the swipe to close is working on the wrong direction.
    I'm going to try using the method described here:
    http://www.developer.nokia.com/Commu...an-orientation
    which appears really messy, to tell the N9 it's in Portrait orientation.
    Hopefully that will fix the issue.

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    21

    Re: How do I detect 'Swipe to Close App' on N9

    I was in touch with nokia technical support and they confirm the blogger's code solution is the current only way of fixing this issue.
    Seems to work too.

  6. #6
    Regular Contributor
    Join Date
    Sep 2010
    Posts
    150

    Re: How do I detect 'Swipe to Close App' on N9

    ok, thanks for info :-)

Similar Threads

  1. Swipe event
    By suryasraj in forum Symbian
    Replies: 3
    Last Post: 2011-06-01, 13:08
  2. detecting left-right swipe in WRT?
    By InYourDreamz in forum Symbian
    Replies: 2
    Last Post: 2010-01-20, 14:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×