Add force parameter to EwinWarpTo().

SVN revision: 49488
This commit is contained in:
Kim Woelders 2010-06-06 10:08:17 +00:00
parent 2eb17183a6
commit 6f9ab28110
5 changed files with 8 additions and 8 deletions

View File

@ -1808,9 +1808,9 @@ EwinReposition(EWin * ewin)
}
void
EwinWarpTo(EWin * ewin)
EwinWarpTo(EWin * ewin, int force)
{
if (ewin == Mode.mouse_over_ewin)
if (!force && ewin == Mode.mouse_over_ewin)
return;
if (ewin->state.iconified)

View File

@ -381,7 +381,7 @@ void EwinUpdateOpacity(EWin * ewin);
void EwinChange(EWin * ewin, unsigned int flag);
void EwinWarpTo(EWin * ewin);
void EwinWarpTo(EWin * ewin, int force);
EWin **EwinListTransients(const EWin * ewin, int *num, int group);
EWin **EwinListTransientFor(const EWin * ewin, int *num);

View File

@ -412,7 +412,7 @@ doFocusToEwin(EWin * ewin, int why)
if (Conf.focus.warp_always)
do_warp = 1;
if (do_warp)
EwinWarpTo(ewin);
EwinWarpTo(ewin, 0);
switch (why)
{

View File

@ -362,7 +362,7 @@ WarpFocus(int delta)
if (Conf.focus.raise_on_next)
EwinRaise(ewin);
if (Conf.focus.warp_on_next)
EwinWarpTo(ewin);
EwinWarpTo(ewin, 0);
if (Conf.warplist.warpfocused)
FocusToEWin(ewin, FOCUS_SET);
}
@ -406,7 +406,7 @@ WarpFocusFinish(void)
EwinOpActivate(ewin, OPSRC_USER, Conf.warplist.raise_on_select);
if (Conf.warplist.warp_on_select)
EwinWarpTo(ewin);
EwinWarpTo(ewin, 0);
}
static void

View File

@ -215,7 +215,7 @@ Zoom(EWin * ewin)
if (zoom_mask_4)
EDestroyWindow(zoom_mask_4);
SwitchRes(0, 0, 0, 0, 0);
EwinWarpTo(ewin);
EwinWarpTo(ewin, 1);
ESync(0);
zoom_last_ewin = NULL;
}
@ -246,7 +246,7 @@ Zoom(EWin * ewin)
EwinBorderGetSize(ewin, &bl, &br, &bt, &bb);
EwinMove(ewin, -bl + x1, -bt + y1);
FocusToEWin(ewin, FOCUS_SET);
EwinWarpTo(ewin);
EwinWarpTo(ewin, 1);
#if 0 /* Doesn't work as intended */
XGrabPointer(disp, EwinGetClientXwin(ewin), True,
ButtonPressMask | ButtonReleaseMask |