Results 1 to 3 of 3

Thread: Mouse Input not caught always

  1. #1

    Default Mouse Input not caught always

    Hello,

    I've just gotten ClanLib installed and I did the tictactoe game tutorial and everything is going smoothly. One thing that worries me that I am noticing is that the mouse click events are not picked up all the time. When I run the tictactoe game or when I run PilotsPuzzle example and I click the mouse 3 or more times in the same spot, the program does not register any clicks after that. This is a problem for me because I was thinking of designing a game very dependent on having this working.


    Also, I've noticed that there are basically two ways to react to mouse clicks. One is called polling and that is putting the mouse event reaction code in the main while loop, and the "better" way is with signals and slots. Although I'd love to get slots and signals working, it seems that polling never fails whereas the signal seems to fail after not moving the mouse.

    Thanks, any info is appreciated

    OMg, I just realized I stupidly did not include my platform information. I'm running ClanLib on ubuntu fiesty fawn, clanlib version 0.8.0 compiled from source with sdl and gl enabled.

    I compiled the MouseSlot example and I seem to get good performance out of it, while the aforementioned examples not so. I noticed I got a warning when compiling MouseSlot:
    Code:
    In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/strstream:51,
                     from mousesignal.cpp:9:
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
    Last edited by gmatt; 06-25-2007 at 06:23 AM.

  2. #2

    Default

    Well it seems that the problem maybe that keepalive() isn't polling fast enough?
    Last edited by gmatt; 06-26-2007 at 04:59 AM.

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Hmm, interesting. I use an older Ubuntu to test on and haven't seen these problems with using signals or polling - but a few things were updated with linux update since the official 0.8 release.

    As a test, if my Novashell application works ok for you, you may want to work directly from the 0.8 subversion repository.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Mouse Input
    By Soudeus in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 04-25-2007, 01:57 PM
  2. Display targets and input
    By void_kill in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 03-23-2007, 11:56 PM

Bookmarks

Bookmarks

Posting Permissions

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