added updateDelayTime resource
This commit is contained in:
parent
dd97388f19
commit
7df61abcbd
2 changed files with 18 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#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.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0;
|
||||||
|
resource.update_delay_time = 5;
|
||||||
|
|
||||||
#ifdef HAVE_GETPID
|
#ifdef HAVE_GETPID
|
||||||
m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False);
|
m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False);
|
||||||
#endif // HAVE_GETPID
|
#endif // HAVE_GETPID
|
||||||
|
@ -1452,6 +1453,10 @@ void Fluxbox::save_rc() {
|
||||||
resource.double_click_interval);
|
resource.double_click_interval);
|
||||||
XrmPutLineResource(&new_blackboxrc, rc_string);
|
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",
|
sprintf(rc_string, "session.autoRaiseDelay: %lu",
|
||||||
((resource.auto_raise_delay.tv_sec * 1000) +
|
((resource.auto_raise_delay.tv_sec * 1000) +
|
||||||
(resource.auto_raise_delay.tv_usec / 1000)));
|
(resource.auto_raise_delay.tv_usec / 1000)));
|
||||||
|
@ -1607,6 +1612,14 @@ void Fluxbox::load_rc() {
|
||||||
} else
|
} else
|
||||||
resource.double_click_interval = 250;
|
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",
|
if (XrmGetResource(*database, "session.autoRaiseDelay", "Session.AutoRaiseDelay",
|
||||||
&value_type, &value)) {
|
&value_type, &value)) {
|
||||||
if (sscanf(value.addr, "%lu", &resource.auto_raise_delay.tv_usec) != 1)
|
if (sscanf(value.addr, "%lu", &resource.auto_raise_delay.tv_usec) != 1)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
#ifndef FLUXBOX_HH
|
||||||
#define FLUXBOX_HH
|
#define FLUXBOX_HH
|
||||||
|
@ -97,6 +97,7 @@ public:
|
||||||
BScreen *searchScreen(Window w);
|
BScreen *searchScreen(Window w);
|
||||||
|
|
||||||
inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; }
|
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; }
|
inline const Time &getLastTime() const { return m_last_time; }
|
||||||
|
|
||||||
void addAtomHandler(AtomHandler *atomh);
|
void addAtomHandler(AtomHandler *atomh);
|
||||||
|
@ -213,6 +214,7 @@ private:
|
||||||
struct resource {
|
struct resource {
|
||||||
Time double_click_interval;
|
Time double_click_interval;
|
||||||
timeval auto_raise_delay;
|
timeval auto_raise_delay;
|
||||||
|
long update_delay_time;
|
||||||
} resource;
|
} resource;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue