Enable actions on focus in/out.

SVN revision: 16097
This commit is contained in:
Kim Woelders 2005-08-10 19:33:33 +00:00
parent d7a6b8fdcf
commit aa497063d6
4 changed files with 20 additions and 0 deletions

View File

@ -398,6 +398,8 @@
#define __KEY_PRESS 4
#define __KEY_RELEASE 5
#define __DOUBLE_CLICK 6
#define __FOCUS_IN 7
#define __FOCUS_OUT 8
#define __USE_BORDER 480
#define __HAS_NAME 481

View File

@ -276,6 +276,8 @@ int Esnprintf(va_alist);
#define EVENT_KEY_DOWN 4
#define EVENT_KEY_UP 5
#define EVENT_DOUBLE_DOWN 6
#define EVENT_FOCUS_IN 7
#define EVENT_FOCUS_OUT 8
#define GROUP_SELECT_ALL 0
#define GROUP_SELECT_EWIN_ONLY 1

View File

@ -897,6 +897,16 @@ ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
modifiers = ev->xcrossing.state & mask;
mouse = 1;
break;
case FocusIn:
type = EVENT_FOCUS_IN;
button = -1;
mouse = 1;
break;
case FocusOut:
type = EVENT_FOCUS_OUT;
button = -1;
mouse = 1;
break;
default:
break;
}

View File

@ -1778,8 +1778,14 @@ EwinHandleEventsClient(XEvent * ev, void *prm)
case MotionNotify:
case EnterNotify:
case LeaveNotify:
break;
case FocusIn:
case FocusOut:
if (ev->xfocus.detail == NotifyInferior)
break;
if (ewin->border->aclass)
ActionclassEvent(ewin->border->aclass, ev, ewin);
break;
case ConfigureNotify:
case GravityNotify:
break;