Ajust (primarily click-to-focus) context window behavior.

SVN revision: 9598
This commit is contained in:
Kim Woelders 2004-04-04 21:32:37 +00:00
parent b215aca4ac
commit 12328ebfb5
2 changed files with 14 additions and 4 deletions

View File

@ -184,12 +184,19 @@ GetFocusEwin(void)
EWin *
GetContextEwin(void)
{
EWin *ewin;
EDBUG(4, "GetContextEwin");
if (Mode.focuswin)
EDBUG_RETURN(Mode.focuswin);
ewin = Mode.mouse_over_win;
if (ewin && !ewin->menu)
EDBUG_RETURN(ewin);
EDBUG_RETURN(Mode.mouse_over_win);
ewin = Mode.focuswin;
if (ewin && !ewin->menu)
EDBUG_RETURN(ewin);
return NULL;
}
void

View File

@ -462,6 +462,10 @@ FocusNewDesk(void)
SubstructureRedirectMask | KeyPressMask | KeyReleaseMask |
PointerMotionMask);
/* Set the mouse-over window */
ewin = GetEwinByCurrentPointer();
Mode.mouse_over_win = ewin;
ewin = FocusEwinSelect();
if (ewin)
FocusToEWin(ewin, FOCUS_DESK_ENTER);
@ -493,7 +497,6 @@ FocusHandleEnter(XEvent * ev)
}
ewin = GetEwinByCurrentPointer();
Mode.mouse_over_win = ewin;
switch (Conf.focus.mode)