From 7df61abcbd9c0e533ad34d55d6e42e7a22b0b024 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 10 Sep 2003 09:51:58 +0000 Subject: added updateDelayTime resource --- src/fluxbox.cc | 17 +++++++++++++++-- src/fluxbox.hh | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index c28a53c..94da4cb 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.187 2003/08/24 11:19:45 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.188 2003/09/10 09:51:58 fluxgen Exp $ #include "fluxbox.hh" @@ -493,7 +493,8 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0; - + resource.update_delay_time = 5; + #ifdef HAVE_GETPID m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False); #endif // HAVE_GETPID @@ -1452,6 +1453,10 @@ void Fluxbox::save_rc() { resource.double_click_interval); XrmPutLineResource(&new_blackboxrc, rc_string); + + sprintf(rc_string, "session.updateDelayTime: %lu", resource.update_delay_time); + XrmPutLineResource(&new_blackboxrc, rc_string); + sprintf(rc_string, "session.autoRaiseDelay: %lu", ((resource.auto_raise_delay.tv_sec * 1000) + (resource.auto_raise_delay.tv_usec / 1000))); @@ -1607,6 +1612,14 @@ void Fluxbox::load_rc() { } else resource.double_click_interval = 250; + + if (XrmGetResource(*database, "session.updateDelayTime", "Session.updateDelayTime", + &value_type, &value)) { + if (sscanf(value.addr, "%lu", &resource.update_delay_time) != 1) + resource.update_delay_time = 5; + } else + resource.update_delay_time = 5; + if (XrmGetResource(*database, "session.autoRaiseDelay", "Session.AutoRaiseDelay", &value_type, &value)) { if (sscanf(value.addr, "%lu", &resource.auto_raise_delay.tv_usec) != 1) diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 5aa44a7..6459385 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.71 2003/08/11 17:15:51 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.72 2003/09/10 09:51:58 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH @@ -97,6 +97,7 @@ public: BScreen *searchScreen(Window w); inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; } + inline long getUpdateDelayTime() const { return resource.update_delay_time; } inline const Time &getLastTime() const { return m_last_time; } void addAtomHandler(AtomHandler *atomh); @@ -213,6 +214,7 @@ private: struct resource { Time double_click_interval; timeval auto_raise_delay; + long update_delay_time; } resource; -- cgit v0.11.2