Switch desk/viewport on _NET_ACTIVE_WINDOW.

SVN revision: 18115
This commit is contained in:
Kim Woelders 2005-10-29 23:42:22 +00:00
parent 0922022489
commit f958ec26e4
4 changed files with 15 additions and 13 deletions

View File

@ -1408,6 +1408,18 @@ EwinMoveToArea(EWin * ewin, int ax, int ay)
EoGetY(ewin) + (VRoot.h * (ay - ewin->area_y)));
}
void
EwinOpActivate(EWin * ewin)
{
DeskGotoByEwin(ewin);
EwinOpRaise(ewin);
if (ewin->state.iconified)
EwinOpIconify(ewin, 0);
if (ewin->state.shaded)
EwinOpShade(ewin, 0);
FocusToEWin(ewin, FOCUS_SET);
}
void
EwinOpClose(EWin * ewin)
{

View File

@ -311,6 +311,7 @@ void EwinSetFullscreen(EWin * ewin, int on);
void EwinMoveToArea(EWin * ewin, int ax, int ay);
void EwinOpClose(EWin * ewin);
void EwinOpActivate(EWin * ewin);
void EwinOpKill(EWin * ewin);
void EwinOpRaise(EWin * ewin);
void EwinOpLower(EWin * ewin);

View File

@ -856,12 +856,7 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
if (ev->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
{
if (ewin->state.iconified)
EwinDeIconify(ewin);
RaiseEwin(ewin);
if (ewin->state.shaded)
EwinUnShade(ewin);
FocusToEWin(ewin, FOCUS_SET);
EwinOpActivate(ewin);
}
else if (ev->message_type == ECORE_X_ATOM_NET_CLOSE_WINDOW)
{

View File

@ -711,13 +711,7 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
IpcPrintf("focused: %s", (ewin == GetFocusEwin())? "yes" : "no");
goto done;
}
DeskGotoByEwin(ewin);
if (ewin->state.iconified)
EwinOpIconify(ewin, 0);
if (ewin->state.shaded)
EwinOpShade(ewin, 0);
EwinOpRaise(ewin);
FocusToEWin(ewin, FOCUS_SET);
EwinOpActivate(ewin);
break;
case EWIN_OP_FULLSCREEN: