From 02466ab04056d9275e7351400be111a9c4580f26 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 19 Mar 2002 00:16:44 +0000 Subject: Fixed timer pointer --- src/fluxbox.cc | 19 ++++++++----------- src/fluxbox.hh | 31 ++----------------------------- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 612f08e..2ff4b03 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.40 2002/03/18 20:26:32 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.41 2002/03/19 00:16:44 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE @@ -306,8 +306,8 @@ m_rc_titlebar_left(m_resourcemanager, TitlebarList(&m_titlebar_left[0], &m_title m_rc_titlebar_right(m_resourcemanager, TitlebarList(&m_titlebar_right[0], &m_titlebar_right[3]), "session.titlebar.right", "Session.Titlebar.Right"), m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), -focused_window(0), -masked_window(0), +focused_window(0), masked_window(0), +timer(this), no_focus(false), rc_file(rc), argv(m_argv), argc(m_argc), @@ -394,10 +394,9 @@ key(0) XSync(getXDisplay(), False); reconfigure_wait = reread_menu_wait = false; - - timer = new BTimer(this, this); - timer->setTimeout(0); - timer->fireOnce(True); + + timer.setTimeout(0); + timer.fireOnce(True); //create keybindings handler and load keys file char *keyfilename = StringUtil::expandFilename((*m_rc_keyfile).c_str()); @@ -425,8 +424,6 @@ Fluxbox::~Fluxbox(void) { delete key; key = 0; - delete timer; - delete screenList; delete menuTimestamps; @@ -2327,7 +2324,7 @@ void Fluxbox::reload_rc(void) { void Fluxbox::reconfigure(void) { reconfigure_wait = true; - if (! timer->isTiming()) timer->start(); + if (! timer.isTiming()) timer.start(); } @@ -2421,7 +2418,7 @@ void Fluxbox::checkMenu(void) { void Fluxbox::rereadMenu(void) { reread_menu_wait = True; - if (! timer->isTiming()) timer->start(); + if (! timer.isTiming()) timer.start(); } diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 4ba3e67..361b1f8 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.13 2002/03/01 15:28:56 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.14 2002/03/19 00:16:44 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH @@ -45,42 +45,15 @@ # endif // HAVE_SYS_TIME_H #endif // TIME_WITH_SYS_TIME -#ifndef _RESOURCE_HH_ #include "Resource.hh" -#endif - -#ifndef _KEYS_HH_ #include "Keys.hh" -#endif - -#ifndef _BASEDISPLAY_HH_ #include "BaseDisplay.hh" -#endif - -#ifndef _IMAGE_HH_ #include "Image.hh" -#endif - -#ifndef _LINKEDLIST_HH_ #include "LinkedList.hh" -#endif - -#ifndef _TIMER_HH_ #include "Timer.hh" -#endif - -#ifndef _WINDOW_HH_ #include "Window.hh" -#endif - -#ifndef _TAB_HH_ #include "Tab.hh" -#endif - -#ifndef _TOOLBAR_HH_ #include "Toolbar.hh" -#endif - #ifdef SLIT # include "Slit.hh" #endif // SLIT @@ -264,7 +237,7 @@ private: LinkedList *screenList; FluxboxWindow *focused_window, *masked_window; - BTimer *timer; + BTimer timer; #ifdef HAVE_GETPID Atom fluxbox_pid; -- cgit v0.11.2