summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-10 09:51:58 (GMT)
committerfluxgen <fluxgen>2003-09-10 09:51:58 (GMT)
commit7df61abcbd9c0e533ad34d55d6e42e7a22b0b024 (patch)
treee815025c8e8f538b76228bf3f97f4a626fc1fe7c
parentdd97388f198b5299b8aaab646413158a65fe4c5f (diff)
downloadfluxbox_lack-7df61abcbd9c0e533ad34d55d6e42e7a22b0b024.zip
fluxbox_lack-7df61abcbd9c0e533ad34d55d6e42e7a22b0b024.tar.bz2
added updateDelayTime resource
-rw-r--r--src/fluxbox.cc17
-rw-r--r--src/fluxbox.hh4
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 @@
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.187 2003/08/24 11:19:45 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.188 2003/09/10 09:51:58 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -493,7 +493,8 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
493 493
494 494
495 resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0; 495 resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0;
496 496 resource.update_delay_time = 5;
497
497#ifdef HAVE_GETPID 498#ifdef HAVE_GETPID
498 m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False); 499 m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False);
499#endif // HAVE_GETPID 500#endif // HAVE_GETPID
@@ -1452,6 +1453,10 @@ void Fluxbox::save_rc() {
1452 resource.double_click_interval); 1453 resource.double_click_interval);
1453 XrmPutLineResource(&new_blackboxrc, rc_string); 1454 XrmPutLineResource(&new_blackboxrc, rc_string);
1454 1455
1456
1457 sprintf(rc_string, "session.updateDelayTime: %lu", resource.update_delay_time);
1458 XrmPutLineResource(&new_blackboxrc, rc_string);
1459
1455 sprintf(rc_string, "session.autoRaiseDelay: %lu", 1460 sprintf(rc_string, "session.autoRaiseDelay: %lu",
1456 ((resource.auto_raise_delay.tv_sec * 1000) + 1461 ((resource.auto_raise_delay.tv_sec * 1000) +
1457 (resource.auto_raise_delay.tv_usec / 1000))); 1462 (resource.auto_raise_delay.tv_usec / 1000)));
@@ -1607,6 +1612,14 @@ void Fluxbox::load_rc() {
1607 } else 1612 } else
1608 resource.double_click_interval = 250; 1613 resource.double_click_interval = 250;
1609 1614
1615
1616 if (XrmGetResource(*database, "session.updateDelayTime", "Session.updateDelayTime",
1617 &value_type, &value)) {
1618 if (sscanf(value.addr, "%lu", &resource.update_delay_time) != 1)
1619 resource.update_delay_time = 5;
1620 } else
1621 resource.update_delay_time = 5;
1622
1610 if (XrmGetResource(*database, "session.autoRaiseDelay", "Session.AutoRaiseDelay", 1623 if (XrmGetResource(*database, "session.autoRaiseDelay", "Session.AutoRaiseDelay",
1611 &value_type, &value)) { 1624 &value_type, &value)) {
1612 if (sscanf(value.addr, "%lu", &resource.auto_raise_delay.tv_usec) != 1) 1625 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 @@
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.71 2003/08/11 17:15:51 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.72 2003/09/10 09:51:58 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -97,6 +97,7 @@ public:
97 BScreen *searchScreen(Window w); 97 BScreen *searchScreen(Window w);
98 98
99 inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; } 99 inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; }
100 inline long getUpdateDelayTime() const { return resource.update_delay_time; }
100 inline const Time &getLastTime() const { return m_last_time; } 101 inline const Time &getLastTime() const { return m_last_time; }
101 102
102 void addAtomHandler(AtomHandler *atomh); 103 void addAtomHandler(AtomHandler *atomh);
@@ -213,6 +214,7 @@ private:
213 struct resource { 214 struct resource {
214 Time double_click_interval; 215 Time double_click_interval;
215 timeval auto_raise_delay; 216 timeval auto_raise_delay;
217 long update_delay_time;
216 } resource; 218 } resource;
217 219
218 220