diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/FbTk/Timer.cc | 2 | ||||
-rw-r--r-- | src/FbTk/Timer.hh | 2 | ||||
-rw-r--r-- | src/Screen.cc | 10 | ||||
-rw-r--r-- | src/fluxbox.cc | 36 | ||||
-rw-r--r-- | src/fluxbox.hh | 6 |
6 files changed, 29 insertions, 29 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.6: | 2 | Changes for 0.9.6: |
3 | *03/10/05: | 3 | *03/10/05: |
4 | * Fix reading of auto raise delay (Simon) | ||
5 | fluxbox.hh/cc Screen.cc Timer.hh/cc | ||
4 | * Make focusLast work for sloppy focus when changing workspace or | 6 | * Make focusLast work for sloppy focus when changing workspace or |
5 | closing a window (Simon) | 7 | closing a window (Simon) |
6 | - also generalises event redirects (e.g. for window moving) | 8 | - 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() { | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | void Timer::setTimeout(long t) { | 63 | void Timer::setTimeout(time_t t) { |
64 | m_timeout.tv_sec = t / 1000; | 64 | m_timeout.tv_sec = t / 1000; |
65 | m_timeout.tv_usec = t; | 65 | m_timeout.tv_usec = t; |
66 | m_timeout.tv_usec -= (m_timeout.tv_sec * 1000); | 66 | 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: | |||
59 | 59 | ||
60 | inline void fireOnce(bool once) { m_once = once; } | 60 | inline void fireOnce(bool once) { m_once = once; } |
61 | /// set timeout | 61 | /// set timeout |
62 | void setTimeout(long val); | 62 | void setTimeout(time_t val); |
63 | /// set timeout | 63 | /// set timeout |
64 | void setTimeout(timeval val); | 64 | void setTimeout(timeval val); |
65 | void setCommand(RefCount<Command> &cmd); | 65 | void setCommand(RefCount<Command> &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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.237 2003/10/05 02:31:22 rathnor Exp $ | 25 | // $Id: Screen.cc,v 1.238 2003/10/05 06:28:47 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -870,10 +870,10 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
870 | // This is a little tricks to reduce flicker | 870 | // This is a little tricks to reduce flicker |
871 | // this way we can set focus pixmap on frame before we show it | 871 | // this way we can set focus pixmap on frame before we show it |
872 | // and using ExposeEvent to redraw without flicker | 872 | // and using ExposeEvent to redraw without flicker |
873 | WinClient *win = getLastFocusedWindow(currentWorkspaceID()); | 873 | //WinClient *win = getLastFocusedWindow(currentWorkspaceID()); |
874 | if (win && win->fbwindow()) { | 874 | //if (win && win->fbwindow()) { |
875 | win->fbwindow()->setFocusFlag(true); | 875 | // win->fbwindow()->setFocusFlag(true); |
876 | } | 876 | //} |
877 | 877 | ||
878 | currentWorkspace()->showAll(); | 878 | currentWorkspace()->showAll(); |
879 | 879 | ||
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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.194 2003/10/05 02:31:23 rathnor Exp $ | 25 | // $Id: fluxbox.cc,v 1.195 2003/10/05 06:28:47 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -208,6 +208,13 @@ setFromString(const char *strval) { | |||
208 | setDefaultValue(); | 208 | setDefaultValue(); |
209 | } | 209 | } |
210 | 210 | ||
211 | template<> | ||
212 | void FbTk::Resource<long>:: | ||
213 | setFromString(const char *strval) { | ||
214 | if (sscanf(strval, "%ld", &m_value) != 1) | ||
215 | setDefaultValue(); | ||
216 | } | ||
217 | |||
211 | //----------------------------------------------------------------- | 218 | //----------------------------------------------------------------- |
212 | //---- manipulators for int, bool, and some enums with Resource --- | 219 | //---- manipulators for int, bool, and some enums with Resource --- |
213 | //----------------------------------------------------------------- | 220 | //----------------------------------------------------------------- |
@@ -287,6 +294,14 @@ getString() { | |||
287 | } | 294 | } |
288 | 295 | ||
289 | template<> | 296 | template<> |
297 | string FbTk::Resource<long>:: | ||
298 | getString() { | ||
299 | char tmpstr[128]; | ||
300 | sprintf(tmpstr, "%ld", m_value); | ||
301 | return string(tmpstr); | ||
302 | } | ||
303 | |||
304 | template<> | ||
290 | void FbTk::Resource<Fluxbox::Layer>:: | 305 | void FbTk::Resource<Fluxbox::Layer>:: |
291 | setFromString(const char *strval) { | 306 | setFromString(const char *strval) { |
292 | int tempnum = 0; | 307 | int tempnum = 0; |
@@ -403,6 +418,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
403 | "session.titlebar.right", "Session.Titlebar.Right"), | 418 | "session.titlebar.right", "Session.Titlebar.Right"), |
404 | m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), | 419 | m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), |
405 | m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), | 420 | m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), |
421 | m_rc_auto_raise_delay(m_resourcemanager, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay"), | ||
406 | m_focused_window(0), | 422 | m_focused_window(0), |
407 | m_mousescreen(0), | 423 | m_mousescreen(0), |
408 | m_keyscreen(0), | 424 | m_keyscreen(0), |
@@ -493,7 +509,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
493 | cerr<<"Warning: cannot set locale modifiers"<<endl; | 509 | cerr<<"Warning: cannot set locale modifiers"<<endl; |
494 | 510 | ||
495 | 511 | ||
496 | resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0; | ||
497 | resource.update_delay_time = 5; | 512 | resource.update_delay_time = 5; |
498 | 513 | ||
499 | #ifdef HAVE_GETPID | 514 | #ifdef HAVE_GETPID |
@@ -1499,11 +1514,6 @@ void Fluxbox::save_rc() { | |||
1499 | sprintf(rc_string, "session.updateDelayTime: %lu", resource.update_delay_time); | 1514 | sprintf(rc_string, "session.updateDelayTime: %lu", resource.update_delay_time); |
1500 | XrmPutLineResource(&new_blackboxrc, rc_string); | 1515 | XrmPutLineResource(&new_blackboxrc, rc_string); |
1501 | 1516 | ||
1502 | sprintf(rc_string, "session.autoRaiseDelay: %lu", | ||
1503 | ((resource.auto_raise_delay.tv_sec * 1000) + | ||
1504 | (resource.auto_raise_delay.tv_usec / 1000))); | ||
1505 | XrmPutLineResource(&new_blackboxrc, rc_string); | ||
1506 | |||
1507 | ScreenList::iterator it = m_screen_list.begin(); | 1517 | ScreenList::iterator it = m_screen_list.begin(); |
1508 | ScreenList::iterator it_end = m_screen_list.end(); | 1518 | ScreenList::iterator it_end = m_screen_list.end(); |
1509 | 1519 | ||
@@ -1662,18 +1672,6 @@ void Fluxbox::load_rc() { | |||
1662 | } else | 1672 | } else |
1663 | resource.update_delay_time = 5; | 1673 | resource.update_delay_time = 5; |
1664 | 1674 | ||
1665 | if (XrmGetResource(*database, "session.autoRaiseDelay", "Session.AutoRaiseDelay", | ||
1666 | &value_type, &value)) { | ||
1667 | if (sscanf(value.addr, "%lu", &resource.auto_raise_delay.tv_usec) != 1) | ||
1668 | resource.auto_raise_delay.tv_usec = 250; | ||
1669 | } else | ||
1670 | resource.auto_raise_delay.tv_usec = 250; | ||
1671 | |||
1672 | resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec / 1000; | ||
1673 | resource.auto_raise_delay.tv_usec -= | ||
1674 | (resource.auto_raise_delay.tv_sec * 1000); | ||
1675 | resource.auto_raise_delay.tv_usec *= 1000; | ||
1676 | |||
1677 | // expand tilde | 1675 | // expand tilde |
1678 | *m_rc_groupfile = StringUtil::expandFilename(*m_rc_groupfile); | 1676 | *m_rc_groupfile = StringUtil::expandFilename(*m_rc_groupfile); |
1679 | 1677 | ||
diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 5d3f505..5fc01e0 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.hh,v 1.73 2003/10/05 02:31:23 rathnor Exp $ | 25 | // $Id: fluxbox.hh,v 1.74 2003/10/05 06:28:47 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef FLUXBOX_HH | 27 | #ifndef FLUXBOX_HH |
28 | #define FLUXBOX_HH | 28 | #define FLUXBOX_HH |
@@ -143,7 +143,7 @@ public: | |||
143 | inline int getDesktopLayer() const { return 12; } | 143 | inline int getDesktopLayer() const { return 12; } |
144 | 144 | ||
145 | 145 | ||
146 | inline const timeval &getAutoRaiseDelay() const { return resource.auto_raise_delay; } | 146 | inline time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } |
147 | 147 | ||
148 | inline unsigned int getCacheLife() const { return *m_rc_cache_life * 60000; } | 148 | inline unsigned int getCacheLife() const { return *m_rc_cache_life * 60000; } |
149 | inline unsigned int getCacheMax() const { return *m_rc_cache_max; } | 149 | inline unsigned int getCacheMax() const { return *m_rc_cache_max; } |
@@ -226,7 +226,6 @@ private: | |||
226 | 226 | ||
227 | struct resource { | 227 | struct resource { |
228 | Time double_click_interval; | 228 | Time double_click_interval; |
229 | timeval auto_raise_delay; | ||
230 | long update_delay_time; | 229 | long update_delay_time; |
231 | } resource; | 230 | } resource; |
232 | 231 | ||
@@ -261,6 +260,7 @@ private: | |||
261 | 260 | ||
262 | FbTk::Resource<TitlebarList> m_rc_titlebar_left, m_rc_titlebar_right; | 261 | FbTk::Resource<TitlebarList> m_rc_titlebar_left, m_rc_titlebar_right; |
263 | FbTk::Resource<unsigned int> m_rc_cache_life, m_rc_cache_max; | 262 | FbTk::Resource<unsigned int> m_rc_cache_life, m_rc_cache_max; |
263 | FbTk::Resource<time_t> m_rc_auto_raise_delay; | ||
264 | 264 | ||
265 | 265 | ||
266 | std::map<Window, WinClient *> m_window_search; | 266 | std::map<Window, WinClient *> m_window_search; |