Obsolete event handling tweak.

Avoid trouble around obsolete events and click grabs.
This commit is contained in:
Kim Woelders 2013-10-06 21:30:27 +02:00
parent 3f51b8c871
commit f6ff19cef1
1 changed files with 14 additions and 10 deletions

View File

@ -2457,15 +2457,17 @@ EwinHandleEventsContainer(Win win __UNUSED__, XEvent * ev, void *prm)
{
EWin *ewin = (EWin *) prm;
if (ev->type == ButtonPress)
{
FocusHandleClick(ewin, EwinGetClientConWin(ewin));
return;
}
if (!_EwinEventEwinCheck("cont", ev, ewin))
return;
switch (ev->type)
{
case ButtonPress:
FocusHandleClick(ewin, EwinGetContainerWin(ewin));
break;
default:
if (EwinHandleContainerEvents(ewin, ev))
break;
@ -2483,17 +2485,19 @@ EwinHandleEventsClient(Win win __UNUSED__, XEvent * ev, void *prm)
{
EWin *ewin = (EWin *) prm;
#if !USE_CONTAINER_WIN
if (ev->type == ButtonPress)
{
FocusHandleClick(ewin, EwinGetClientConWin(ewin));
return;
}
#endif
if (!_EwinEventEwinCheck("cli", ev, ewin))
return;
switch (ev->type)
{
#if !USE_CONTAINER_WIN
case ButtonPress:
FocusHandleClick(ewin, EwinGetClientConWin(ewin));
break;
#endif
case FocusIn:
case FocusOut:
if (ev->xfocus.detail == NotifyInferior)