nanogui: set a timer when move the window!


Previous by date: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Justin Fretwell
Next by date: 20 Aug 2002 02:17:45 -0000 Re: NanoGTK, Chinese and Locale, Johnny Fung
Previous in thread: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Justin Fretwell
Next in thread: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Alex Holden

Subject: Re: [nanogui] set a timer when move the window!
From: "wang" ####@####.####
Date: 20 Aug 2002 02:17:45 -0000
Message-Id:

Alex !

>You know that's 1000Hz right? 1/10th of that, 100Hz (10ms) is faster
>than the eye can see and even 50Hz (20ms) ought to be fine.

   theoretically speaking,that's right,but in fact ,we set the timer 
1ms ,it doesn't mean it can work with 1ms interval exactly,I have done
this experiment ,I mean the shorter the interval the more  error.
>I'd put in a bit of sanity checking here. Initialise Wm_timer to 0, only
>create the timer if it is 0, only destroy the timer if it is not 0, and
>set it to 0 after destroying it. Also do a final GrMoveWindow() on
>button up to make sure you don't miss the last position event when the
>button is released. You could also make it slightly more efficient by
>recording the last position you moved the window to and if it has not
>changed since the last timer event, don't do the GrMoveWindow() call.
    In fact ,it's not very obvious if we do not do a final GrMoveWindow()
on button up ,but I think you can do it before set "active" to GR_FALSE in
Wm_container_buttonup().
    yep,you can do the position check when dealing with  GR_EVENT_TYPE_TIMER
event,but I think you should difine another Wm_move structure to store the 
old position.
    By the way ,if you don't mind ,can add this new change on you latest
aph version.

        wang
####@####.####
          2002-08-20





Previous by date: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Justin Fretwell
Next by date: 20 Aug 2002 02:17:45 -0000 Re: NanoGTK, Chinese and Locale, Johnny Fung
Previous in thread: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Justin Fretwell
Next in thread: 20 Aug 2002 02:17:45 -0000 Re: set a timer when move the window!, Alex Holden


Powered by ezmlm-browse 0.20.