diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2012-08-28 08:51:55 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-08-28 08:51:55 (GMT) |
commit | 541c8c407b7ba8dd10f85bb48bcb5900270b3f84 (patch) | |
tree | 71a6abc0f2a43bcfd33f80b3b30b878f234cbf05 /src/Window.hh | |
parent | 60a53113e05db443af4d520883ec3145680642a8 (diff) | |
download | fluxbox_pavel-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.zip fluxbox_pavel-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.tar.bz2 |
changed timing functions to use a monotonic increasing clock
gettimeofday() is subject to be changed on daylight-saving or to ntp-related
(think leap-seconds). even worse, it is subject to be changed BACK in time. this
is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is
irrelevant for timers to know the nano-seconds since the epoch anyways.
Diffstat (limited to 'src/Window.hh')
-rw-r--r-- | src/Window.hh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Window.hh b/src/Window.hh index 8c97c7b..09374af 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -33,11 +33,11 @@ | |||
33 | 33 | ||
34 | #include "FbTk/DefaultValue.hh" | 34 | #include "FbTk/DefaultValue.hh" |
35 | #include "FbTk/Timer.hh" | 35 | #include "FbTk/Timer.hh" |
36 | #include "FbTk/FbTime.hh" | ||
36 | #include "FbTk/EventHandler.hh" | 37 | #include "FbTk/EventHandler.hh" |
37 | #include "FbTk/LayerItem.hh" | 38 | #include "FbTk/LayerItem.hh" |
38 | #include "FbTk/Signal.hh" | 39 | #include "FbTk/Signal.hh" |
39 | 40 | ||
40 | #include <sys/time.h> | ||
41 | #include <vector> | 41 | #include <vector> |
42 | #include <string> | 42 | #include <string> |
43 | #include <memory> | 43 | #include <memory> |
@@ -529,14 +529,15 @@ private: | |||
529 | // state and hint signals | 529 | // state and hint signals |
530 | FbTk::Signal<FluxboxWindow &> m_workspacesig, m_statesig, m_layersig, m_hintsig; | 530 | FbTk::Signal<FluxboxWindow &> m_workspacesig, m_statesig, m_layersig, m_hintsig; |
531 | 531 | ||
532 | time_t m_creation_time; | 532 | uint64_t m_creation_time; |
533 | uint64_t m_last_keypress_time; | ||
534 | FbTk::Timer m_timer; | ||
533 | 535 | ||
534 | // Window states | 536 | // Window states |
535 | bool moving, resizing, m_initialized; | 537 | bool moving, resizing, m_initialized; |
536 | 538 | ||
537 | WinClient *m_attaching_tab; | 539 | WinClient *m_attaching_tab; |
538 | 540 | ||
539 | FbTk::Timer m_timer; | ||
540 | Display *display; /// display connection | 541 | Display *display; /// display connection |
541 | 542 | ||
542 | int m_button_grab_x, m_button_grab_y; // handles last button press event for move | 543 | int m_button_grab_x, m_button_grab_y; // handles last button press event for move |
@@ -545,8 +546,6 @@ private: | |||
545 | int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" | 546 | int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" |
546 | int m_last_pressed_button; | 547 | int m_last_pressed_button; |
547 | 548 | ||
548 | timeval m_last_keypress_time; | ||
549 | |||
550 | unsigned int m_workspace_number; | 549 | unsigned int m_workspace_number; |
551 | unsigned long m_current_state; // NormalState | IconicState | Withdrawn | 550 | unsigned long m_current_state; // NormalState | IconicState | Withdrawn |
552 | 551 | ||