/*
* ion/ioncore/eventh.c
*
- * Copyright (c) Tuomo Valkonen 1999-2006.
+ * Copyright (c) Tuomo Valkonen 1999-2007.
*
* Ion is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
/*{{{ Enter window, focus */
-/*extern Time ioncore_focus_time;*/
-
-
static void do_handle_enter_window(XEvent *ev)
{
XEnterWindowEvent *eev=&(ev->xcrossing);
if(ioncore_g.input_mode!=IONCORE_INPUTMODE_NORMAL)
return;
- /*if(ioncore_g.focus_next!=NULL && ioncore_focus_time==CurrentTime)
- return;*/
-
- /*if(ioncore_await_warp())
- return;
-
- if(eev->mode!=NotifyNormal && !ioncore_g.warp_enabled)
- return;*/
-
reg=XWINDOW_REGION_OF_T(eev->window, WRegion);
if(reg==NULL)
if(region_skip_focus(reg))
return;
-
+
/* If a child of 'reg' is to be focused, do not process this
- * event.
+ * event. (ioncore_g.focus_next should only be set here by
+ * another call to use from ioncore_handle_enter_window below.)
*/
if(ioncore_g.focus_next!=NULL){
WRegion *r2=ioncore_g.focus_next;
if(ev->detail==NotifyPointer)
return;
- /* Root windows appear either as WRootWins or WScreens */
- if(ev->window==region_root_of(reg)){
+ if(ev->window==region_root_of(reg)){ /* OBJ_IS(reg, WRootWin) */
D(fprintf(stderr, "scr-in %d %d %d\n", ROOTWIN_OF(reg)->xscr,
ev->mode, ev->detail));
if((ev->detail==NotifyPointerRoot || ev->detail==NotifyDetailNone) &&
region_set_focus(reg);
return;
}
- /*return;*/
}
/* Input contexts */