Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: Freezing when mouse leaves CL_DisplayWindow

  1. #1
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default Freezing when mouse leaves CL_DisplayWindow

    Anyone else get this? Sometimes when I mouse-out of the display window the game just freezes or stops getting input. It's sort of wonky and doesn't always reproduce, but happens in demos too, so I don't think it's just my programs. Might be my computer (vista64).

    Work around for this or is it a known bug, or am I the only one seeing it? I am using the 2.0.2 release package.

  2. #2
    Squire
    Join Date
    Oct 2008
    Location
    Canada
    Posts
    29

    Default Me too!

    Yeah same thing here. Same version of ClanLib. I'm on WinXP. Hasn't bothered me too much, but it is ...weird!

  3. #3
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Is your app using just clanDisplay or is it also using clanGUI?

  4. #4
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Quote Originally Posted by Magnus Norddahl View Post
    Is your app using just clanDisplay or is it also using clanGUI?
    The times I've noticed this, using no GUI.

    My current app is using GUI and I can't say I've noticed it since.

  5. #5
    Knight
    Join Date
    Feb 2009
    Location
    I looked through my window, there are no signs ... but, its definitely planet Earth.
    Posts
    88

    Default

    I experience the same thing and I'm using 0.8.1. The thing is that I use mouse to move the space ship around the screen. In windowed mode, I've noticed a bunch of bugs. One of them is what you said, the window is not updating when the mouse goes out of the bounds of the window, while the app is still working. And this does not happen all the time. And when it does happen and I return the mouse to the screen after a while, the space ship has already passed to the end of the level

    I'm trying to make a game which will promote ClanLib and if money is earned I'll donate some, but I'm just not getting any support.

    Before, I played with just SDL without anything else, before I even heard about the ClanLib. And in SDL you can use SDL_WM_GrabInput(SDL_GRAB_ON) and the border of the window would be the limit of where you can move the mouse. This is the feature that I could not find in ClanLib.

    With all due respect, you guys are doing a great job, but this is frustrating.

  6. #6

    Default

    I think may be it's because you guys use some mouse signal to actualize the movement.
    I just get the mouse posision every frame and did'nt have troubles

  7. #7
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Quote Originally Posted by ppheathead View Post
    I think may be it's because you guys use some mouse signal to actualize the movement.
    I just get the mouse posision every frame and did'nt have troubles
    The first place one will notice this is when they compile and run the very first example, basic2D. It does it there also.

    And I don't see how you're doing anything differently, if you're polling from the main display window IC, it's no different. It's likely you haven't experienced it yet (it's not 100%).

    If you're doing something special, well by golly, enlighten us

  8. #8
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    It seems to be reproducable always for me if I stop the mouse cursor at the window border exactly.

  9. #9
    Knight
    Join Date
    Feb 2009
    Location
    I looked through my window, there are no signs ... but, its definitely planet Earth.
    Posts
    88

    Default

    Is there a way to contain the mouse input to a window, rather than to pass it to a window manager? Like SDL does?

  10. #10
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    There is no direct function call for it. The closest ClanLib has is that you can capture the mouse (dispwind.capture_mouse()), but there is no function to reposition the mouse cursor, I think.

    You can call SetCursorPos on Windows to reposition it, and its trivial to add that to clanDisplay as a patch. But I don't know how you do the same thing in X11.

  11. #11
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    This hang bug has now been fixing in the latest ClanLib 2.0 SVN version.

  12. #12
    Knight
    Join Date
    Feb 2009
    Location
    I looked through my window, there are no signs ... but, its definitely planet Earth.
    Posts
    88

    Default

    For X11 or any other window manager, you should take a look at source code of SDL in SDL/include/SDL_video.h

    /*
    * Grabbing means that the mouse is confined to the application window,
    * and nearly all keyboard input is passed directly to the application,
    * and not interpreted by a window manager, if any.
    */
    extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);

  13. #13
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    "For X11 or any other window manager, you should take a look at source code of SDL in SDL/include/SDL_video.h"

    And YOU meaning YOU I guess? This is open source, if you'd like some feature, try coding it and send some patch. Note, SDL has a much more limiting license than ClanLib, so don't copy the code. See what it does, learn what it does, and rewrite it using your own code.

  14. #14
    Knight
    Join Date
    Feb 2009
    Location
    I looked through my window, there are no signs ... but, its definitely planet Earth.
    Posts
    88

    Default

    But, I'm not as good as you guys and that is the header file, I only have a binary version, source version is much larger, so I haven't downloaded it, there was no need.

  15. #15
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Quote Originally Posted by sphair View Post
    This hang bug has now been fixing in the latest ClanLib 2.0 SVN version.
    I just downloaded the 2.0 SVN and I'm still able to reproduce the bug (on windows vista 64bit).

    I just built the libs and compiled basic2d, and it seems to still do it...

  16. #16
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Can you try unplugging input devices from the computer (eg joystick) and see if that helps.

  17. #17
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Quote Originally Posted by rombust View Post
    Can you try unplugging input devices from the computer (eg joystick) and see if that helps.
    Other than my mouse and keyboard?

    I have none. I guess I could try unplugging the keyboard. Those are my only two input devices, though. Couldn't really test it without the mouse

  18. #18
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    I've just tried the Basic 2D example on Vista 64bit, and I am unable to reproduce the problem.

  19. #19
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Quote Originally Posted by sphair View Post
    I've just tried the Basic 2D example on Vista 64bit, and I am unable to reproduce the problem.
    I was having some issues with my VC2008 not reloading the clan lib update (lord knows why). Let me do some reloading and rebuilding and see if it is fixed this time.

    It was project specific (to only one of my projects), but you never know. I'd hate to give out misinformation.

  20. #20
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Hm, unfortunately the problem persists on my end.

    If someone was willing to upload their exe I'll run it here on my end and see if it still does it for me (maybe my compiler has lost it's mind). Maybe that's futile, maybe not.

    I'll you decide =)

    I'm also on a release candidate for vista, build 6002 for SP2.... That could be it, of course, I'll be on 7 in a few weeks so it might be all for naught.

Similar Threads

  1. problem about sig_window_close emitted from CL_DisplayWindow
    By aeamg in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 03-06-2009, 12:10 PM
  2. CL_DisplayWindow set_size()
    By russ_allegro in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 06-27-2008, 11:53 AM
  3. cl_displaywindow refuses to display a window
    By dwune in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-01-2007, 04:01 PM
  4. I'm playing the Isle of Croth, and Dink keeps freezing up!
    By divadolce in forum Dink Smallwood HD
    Replies: 2
    Last Post: 01-03-2007, 08:40 PM
  5. FQ freezing up
    By in forum Funeral Quest
    Replies: 5
    Last Post: 10-15-2002, 07:32 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
  •