Partial fix to desktop switch focus problem.

Should make the symptoms go away.


SVN revision: 7015
This commit is contained in:
Kim Woelders 2003-06-11 20:05:59 +00:00
parent 98ab36111b
commit a8ca5e4ab0
2 changed files with 19 additions and 3 deletions

View File

@ -1492,8 +1492,9 @@ GotoDesktop(int num)
mode.ewin->y + desks.desk[mode.ewin->desktop].y);
}
}
FocusToEWin(NULL);
ICCCM_Cmap(NULL);
BeginNewDeskFocus();
if (num > 0)
{
@ -1577,9 +1578,12 @@ GotoDesktop(int num)
}
}
}
NewDeskFocus();
RedrawPagersForDesktop(num, 3);
ForceUpdatePagersForDesktop(num);
HandleDrawQueue();
EDBUG_RETURN_;
}

View File

@ -25,6 +25,8 @@
static void ReverseTimeout(int val, void *data);
static void AutoraiseTimeout(int val, void *data);
static int new_desk_focus_nesting = 0;
/* Mostly stolen from the temporary 'ToolTipTimeout' */
static void
AutoraiseTimeout(int val, void *data)
@ -363,8 +365,11 @@ BeginNewDeskFocus(void)
EWin *ewin, **lst;
int i, j, num;
if (new_desk_focus_nesting++)
return;
/* we are about to flip desktops or areas - disable enter and leave events
* temproarily */
* temporarily */
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
if (lst)
@ -405,6 +410,7 @@ BeginNewDeskFocus(void)
}
Efree(lst);
}
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
XSelectInput(disp, desks.desk[i].win,
PropertyChangeMask | SubstructureRedirectMask |
@ -419,7 +425,10 @@ NewDeskFocus(void)
EDBUG(4, "NewDeskFocus");
/* we flipped - re-enable ener and leave events */
if (--new_desk_focus_nesting)
return;
/* we flipped - re-enable enter and leave events */
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
if (lst)
{
@ -469,6 +478,7 @@ NewDeskFocus(void)
}
Efree(lst);
}
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
XSelectInput(disp, desks.desk[i].win,
SubstructureNotifyMask | ButtonPressMask |
@ -476,6 +486,7 @@ NewDeskFocus(void)
ButtonMotionMask | PropertyChangeMask |
SubstructureRedirectMask | KeyPressMask | KeyReleaseMask |
PointerMotionMask);
if ((mode.focusmode == FOCUS_POINTER) || (mode.focusmode == FOCUS_SLOPPY))
{
ewin = GetEwinPointerInClient();
@ -508,6 +519,7 @@ NewDeskFocus(void)
Efree(lst);
}
}
EDBUG_RETURN_;
}