Commit 9cd55aa9 authored by claes's avatar claes

FocusTimer added

parent 44d7113e
...@@ -41,6 +41,7 @@ extern "C" { ...@@ -41,6 +41,7 @@ extern "C" {
extern "C" { extern "C" {
#include "flow_x.h" #include "flow_x.h"
#include "co_mrm_util.h"
} }
#include "co_lng.h" #include "co_lng.h"
#include "xtt_hist.h" #include "xtt_hist.h"
...@@ -418,12 +419,24 @@ static void hist_action_inputfocus( Widget w, XmAnyCallbackStruct *data) ...@@ -418,12 +419,24 @@ static void hist_action_inputfocus( Widget w, XmAnyCallbackStruct *data)
XtSetArg (args[0], XmNuserData, &hist); XtSetArg (args[0], XmNuserData, &hist);
XtGetValues (w, args, 1); XtGetValues (w, args, 1);
if ( mrm_IsIconicState(w))
return;
if ( hist->hist) {
if ( hist->focustimer.disabled())
return;
hist->hist->set_input_focus();
hist->focustimer.disable( hist->toplevel_hist, 4000);
}
//printf("focus\n"); //printf("focus\n");
//histOP->hist->set_input_focus(); //histOP->hist->set_input_focus();
//????????????????????? //?????????????????????
//if ( ev && ev->hist_displayed) //if ( ev && ev->hist_displayed)
// ev->hist->set_input_focus(); // ev->hist->set_input_focus();
hist->hist->set_input_focus(); // hist->hist->set_input_focus();
} }
......
...@@ -20,6 +20,10 @@ extern "C" { ...@@ -20,6 +20,10 @@ extern "C" {
# include "pwr.h" # include "pwr.h"
#endif #endif
#ifndef xtt_focustimer_h
# include "xtt_focustimer.h"
#endif
#ifndef xtt_evlist #ifndef xtt_evlist
# include "xtt_evlist.h" # include "xtt_evlist.h"
#endif #endif
...@@ -77,6 +81,7 @@ class Hist { ...@@ -77,6 +81,7 @@ class Hist {
void (*popup_menu_cb)( void *, pwr_sAttrRef, unsigned long, void (*popup_menu_cb)( void *, pwr_sAttrRef, unsigned long,
unsigned long, char *, Widget * ); unsigned long, char *, Widget * );
EvList *hist; EvList *hist;
FocusTimer focustimer;
int hist_size; int hist_size;
char *minTime_str; char *minTime_str;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment