From c516aa13a134ff311a1ce56976c030ba016bcfda Mon Sep 17 00:00:00 2001 From: rathnor Date: Sun, 5 Oct 2003 06:28:47 +0000 Subject: fix reading of auto raise delay --- ChangeLog | 2 ++ src/FbTk/Timer.cc | 2 +- src/FbTk/Timer.hh | 2 +- src/Screen.cc | 10 +++++----- src/fluxbox.cc | 36 +++++++++++++++++------------------- src/fluxbox.hh | 6 +++--- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 430f137..ec0c288 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.6: *03/10/05: + * Fix reading of auto raise delay (Simon) + fluxbox.hh/cc Screen.cc Timer.hh/cc * Make focusLast work for sloppy focus when changing workspace or closing a window (Simon) - also generalises event redirects (e.g. for window moving) diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index 1597fa3..efecc5e 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc @@ -60,7 +60,7 @@ Timer::~Timer() { } -void Timer::setTimeout(long t) { +void Timer::setTimeout(time_t t) { m_timeout.tv_sec = t / 1000; m_timeout.tv_usec = t; m_timeout.tv_usec -= (m_timeout.tv_sec * 1000); diff --git a/src/FbTk/Timer.hh b/src/FbTk/Timer.hh index 961d4d7..5949b73 100644 --- a/src/FbTk/Timer.hh +++ b/src/FbTk/Timer.hh @@ -59,7 +59,7 @@ public: inline void fireOnce(bool once) { m_once = once; } /// set timeout - void setTimeout(long val); + void setTimeout(time_t val); /// set timeout void setTimeout(timeval val); void setCommand(RefCount &cmd); diff --git a/src/Screen.cc b/src/Screen.cc index 3795455..fe5bb25 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.237 2003/10/05 02:31:22 rathnor Exp $ +// $Id: Screen.cc,v 1.238 2003/10/05 06:28:47 rathnor Exp $ #include "Screen.hh" @@ -870,10 +870,10 @@ void BScreen::changeWorkspaceID(unsigned int id) { // This is a little tricks to reduce flicker // this way we can set focus pixmap on frame before we show it // and using ExposeEvent to redraw without flicker - WinClient *win = getLastFocusedWindow(currentWorkspaceID()); - if (win && win->fbwindow()) { - win->fbwindow()->setFocusFlag(true); - } + //WinClient *win = getLastFocusedWindow(currentWorkspaceID()); + //if (win && win->fbwindow()) { + // win->fbwindow()->setFocusFlag(true); + //} currentWorkspace()->showAll(); diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1045200..2fa7714 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.194 2003/10/05 02:31:23 rathnor Exp $ +// $Id: fluxbox.cc,v 1.195 2003/10/05 06:28:47 rathnor Exp $ #include "fluxbox.hh" @@ -208,6 +208,13 @@ setFromString(const char *strval) { setDefaultValue(); } +template<> +void FbTk::Resource:: +setFromString(const char *strval) { + if (sscanf(strval, "%ld", &m_value) != 1) + setDefaultValue(); +} + //----------------------------------------------------------------- //---- manipulators for int, bool, and some enums with Resource --- //----------------------------------------------------------------- @@ -287,6 +294,14 @@ getString() { } template<> +string FbTk::Resource:: +getString() { + char tmpstr[128]; + sprintf(tmpstr, "%ld", m_value); + return string(tmpstr); +} + +template<> void FbTk::Resource:: setFromString(const char *strval) { int tempnum = 0; @@ -403,6 +418,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile "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"), + m_rc_auto_raise_delay(m_resourcemanager, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay"), m_focused_window(0), m_mousescreen(0), m_keyscreen(0), @@ -493,7 +509,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile cerr<<"Warning: cannot set locale modifiers"< m_rc_titlebar_left, m_rc_titlebar_right; FbTk::Resource m_rc_cache_life, m_rc_cache_max; + FbTk::Resource m_rc_auto_raise_delay; std::map m_window_search; -- cgit v0.11.2