Magnifier: Only enter grabbing mode first time it is mapped.

It would also do so on map after having been iconified.
Also avoid registering new timer/animator on every map.

SVN revision: 60280
This commit is contained in:
Kim Woelders 2011-06-13 16:28:56 +00:00
parent cb3082ed27
commit 682e08a9ba
1 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,7 @@ typedef struct {
int sw, sh; /* Scene wxh */
char disable_text;
char bpress;
char configured;
char filter;
char grabbing;
char step;
@ -380,13 +381,16 @@ MagwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
break;
case MapNotify:
mw->update = 1;
if (mw->configured)
break;
mw->configured = 1;
MagwinKeyPress(mw, XK_g);
#if USE_TIMER
TIMER_ADD(mw->timer, 50, _MagwinTimeout, 0, mw);
#elif USE_ANIMATOR
AnimatorAdd(_MagwinAnimator, mw);
#endif
mw->update = 1;
break;
}