parent
c33d194912
commit
7e209c6c60
1
src/E.h
1
src/E.h
|
@ -774,6 +774,7 @@ typedef struct
|
|||
} display;
|
||||
struct
|
||||
{
|
||||
Time time;
|
||||
int x, y;
|
||||
int px, py;
|
||||
Time last_btime;
|
||||
|
|
12
src/events.c
12
src/events.c
|
@ -169,6 +169,7 @@ HandleEvent(XEvent * ev)
|
|||
case KeyPress:
|
||||
Mode.events.last_keycode = ev->xkey.keycode;
|
||||
case KeyRelease:
|
||||
Mode.events.time = ev->xkey.time;
|
||||
ModeGetXY(ev->xbutton.root, ev->xkey.x_root, ev->xkey.y_root);
|
||||
#if 0 /* FIXME - Why? */
|
||||
if (ev->xkey.root != VRoot.win)
|
||||
|
@ -185,11 +186,17 @@ HandleEvent(XEvent * ev)
|
|||
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
Mode.events.time = ev->xbutton.time;
|
||||
ModeGetXY(ev->xbutton.root, ev->xbutton.x_root, ev->xbutton.y_root);
|
||||
goto do_stuff;
|
||||
|
||||
case MotionNotify:
|
||||
Mode.events.time = ev->xmotion.time;
|
||||
break;
|
||||
|
||||
case EnterNotify:
|
||||
Mode.context_win = ev->xany.window;
|
||||
Mode.events.time = ev->xcrossing.time;
|
||||
if (ev->xcrossing.mode == NotifyGrab &&
|
||||
ev->xcrossing.detail == NotifyInferior)
|
||||
{
|
||||
|
@ -200,6 +207,7 @@ HandleEvent(XEvent * ev)
|
|||
goto do_stuff;
|
||||
|
||||
case LeaveNotify:
|
||||
Mode.events.time = ev->xcrossing.time;
|
||||
if (ev->xcrossing.mode == NotifyGrab &&
|
||||
ev->xcrossing.detail == NotifyInferior)
|
||||
{
|
||||
|
@ -208,6 +216,10 @@ HandleEvent(XEvent * ev)
|
|||
}
|
||||
goto do_stuff;
|
||||
|
||||
case PropertyNotify:
|
||||
Mode.events.time = ev->xproperty.time;
|
||||
break;
|
||||
|
||||
do_stuff:
|
||||
TooltipsHandleEvent(); /* TBD */
|
||||
ActionclassesEvent(ev, GetFocusEwin());
|
||||
|
|
13
src/icccm.c
13
src/icccm.c
|
@ -326,26 +326,27 @@ ICCCM_Focus(const EWin * ewin)
|
|||
if (EventDebug(EDBUG_TYPE_FOCUS))
|
||||
{
|
||||
if (ewin)
|
||||
Eprintf("ICCCM_Focus %#lx %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
Eprintf("ICCCM_Focus T=%#lx %#lx %s\n", Mode.events.time,
|
||||
_EwinGetClientXwin(ewin), EwinGetName(ewin));
|
||||
else
|
||||
Eprintf("ICCCM_Focus None\n");
|
||||
Eprintf("ICCCM_Focus None T=%#lx\n", Mode.events.time);
|
||||
}
|
||||
|
||||
if (!ewin)
|
||||
{
|
||||
XSetInputFocus(disp, VRoot.win, RevertToPointerRoot, CurrentTime);
|
||||
XSetInputFocus(disp, VRoot.win, RevertToPointerRoot, Mode.events.time);
|
||||
HintsSetActiveWindow(None);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ewin->icccm.take_focus)
|
||||
{
|
||||
ecore_x_icccm_take_focus_send(_EwinGetClientXwin(ewin), CurrentTime);
|
||||
ecore_x_icccm_take_focus_send(_EwinGetClientXwin(ewin),
|
||||
Mode.events.time);
|
||||
}
|
||||
|
||||
XSetInputFocus(disp, _EwinGetClientXwin(ewin), RevertToPointerRoot,
|
||||
CurrentTime);
|
||||
Mode.events.time);
|
||||
|
||||
HintsSetActiveWindow(_EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue