andrenho / xsw

Create a presentation based on a config file
GNU General Public License v3.0
2 stars 0 forks source link

Strange number in dev mode when pressing CTRL #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start presentation.
2. Press CTRL-D and move the mouse over the presentation.
3. Press CTRL.
4. Look at the fine mouse positioning, at the bottom left.

What is the expected output? What do you see instead?

It shows a strange number, such as 5000x9000.

Original issue reported on code.google.com by andre....@gmail.com on 12 Apr 2009 at 4:37

GoogleCodeExporter commented 9 years ago

Original comment by andre....@gmail.com on 16 Apr 2009 at 11:16

GoogleCodeExporter commented 9 years ago

Original comment by andre....@gmail.com on 17 Apr 2009 at 3:22

GoogleCodeExporter commented 9 years ago

Original comment by andre....@gmail.com on 18 Apr 2009 at 8:39

GoogleCodeExporter commented 9 years ago
I tested this in the latest branch and the solution is quite simple although it 
took
me a little while to track down.  The SDK_KEYDOWN case doesn't have a break.  
Thus,
if any character (including ctrl) is pressed, the default case will occur which 
will
break out of the switch(e.key.keysym.sym).  However it will fall through to the
SDL_MOUSEMOTION which will put a bogus value in x and/or y.

Thus
            }
                      break;

        case SDL_MOUSEMOTION:

            if(developer) {

should be added to presenter.c

Original comment by CHWoi...@gmail.com on 21 Apr 2009 at 12:01

GoogleCodeExporter commented 9 years ago
Sorry...a correction to the previous statement...it will fall through if any
non-supported character is pressed

Original comment by CHWoi...@gmail.com on 21 Apr 2009 at 12:03

GoogleCodeExporter commented 9 years ago
Righ!

Original comment by andre....@gmail.com on 21 Apr 2009 at 12:49

GoogleCodeExporter commented 9 years ago
Done in 0.2.3.

Original comment by andre....@gmail.com on 21 Apr 2009 at 1:15