Avoid useless operations on destroyed windows.
SVN revision: 23101
This commit is contained in:
parent
606864e876
commit
10cac01945
2
src/E.h
2
src/E.h
|
@ -700,7 +700,7 @@ void fword(char *s, int num, char *wd);
|
|||
#define FOCUS_ENTER 4
|
||||
#define FOCUS_LEAVE 5
|
||||
#define FOCUS_EWIN_NEW 6
|
||||
#define FOCUS_EWIN_GONE 7
|
||||
#define FOCUS_EWIN_UNMAP 7
|
||||
#define FOCUS_DESK_ENTER 8
|
||||
#define FOCUS_DESK_LEAVE 9
|
||||
#define FOCUS_NEXT 10
|
||||
|
|
|
@ -1001,7 +1001,7 @@ EwinUnmap2(EWin * ewin)
|
|||
{
|
||||
/* The frame has been unmapped */
|
||||
|
||||
FocusToEWin(ewin, FOCUS_EWIN_GONE);
|
||||
FocusToEWin(ewin, FOCUS_EWIN_UNMAP);
|
||||
if (ewin == Mode.mouse_over_ewin)
|
||||
Mode.mouse_over_ewin = NULL;
|
||||
if (ewin == Mode.context_ewin)
|
||||
|
|
|
@ -328,7 +328,7 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
return;
|
||||
break;
|
||||
|
||||
case FOCUS_EWIN_GONE:
|
||||
case FOCUS_EWIN_UNMAP:
|
||||
if (Mode.focuswin)
|
||||
return;
|
||||
ewin = FocusEwinSelect();
|
||||
|
@ -473,14 +473,15 @@ FocusToEWin(EWin * ewin, int why)
|
|||
focus_pending_ewin = ewin;
|
||||
break;
|
||||
|
||||
case FOCUS_EWIN_GONE:
|
||||
case FOCUS_EWIN_UNMAP:
|
||||
focus_pending_why = why;
|
||||
focus_pending_ewin = NULL;
|
||||
if (ewin == Mode.focuswin)
|
||||
{
|
||||
Mode.focuswin = NULL;
|
||||
focus_is_set = 0;
|
||||
FocusEwinSetActive(ewin, 0);
|
||||
if (!EoIsGone(ewin))
|
||||
FocusEwinSetActive(ewin, 0);
|
||||
}
|
||||
if (ewin == focus_pending_new)
|
||||
focus_pending_new = NULL;
|
||||
|
|
Loading…
Reference in New Issue