parent
c3fc3050ec
commit
53b7d488ef
13
src/ewins.c
13
src/ewins.c
|
@ -1806,6 +1806,19 @@ EwinReposition(EWin * ewin)
|
|||
EwinMove(ewin, xn, yn);
|
||||
}
|
||||
|
||||
void
|
||||
EwinWarpTo(EWin * ewin)
|
||||
{
|
||||
if (ewin == Mode.mouse_over_ewin)
|
||||
return;
|
||||
|
||||
if (ewin->state.iconified)
|
||||
return;
|
||||
|
||||
EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
|
||||
Mode.mouse_over_ewin = ewin;
|
||||
}
|
||||
|
||||
typedef union
|
||||
{
|
||||
unsigned int all;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2007 Kim Woelders
|
||||
* Copyright (C) 2004-2008 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -390,6 +390,8 @@ void EwinUpdateOpacity(EWin * ewin);
|
|||
|
||||
void EwinChange(EWin * ewin, unsigned int flag);
|
||||
|
||||
void EwinWarpTo(EWin * ewin);
|
||||
|
||||
EWin **EwinListTransients(const EWin * ewin, int *num, int group);
|
||||
EWin **EwinListTransientFor(const EWin * ewin, int *num);
|
||||
|
||||
|
|
|
@ -399,11 +399,8 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
|
||||
if (Conf.focus.warp_always)
|
||||
do_warp = 1;
|
||||
if (do_warp && ewin != Mode.mouse_over_ewin)
|
||||
{
|
||||
EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
|
||||
Mode.mouse_over_ewin = ewin;
|
||||
}
|
||||
if (do_warp)
|
||||
EwinWarpTo(ewin);
|
||||
|
||||
RemoveTimerEvent("REVERSE_FOCUS_TIMEOUT");
|
||||
switch (why)
|
||||
|
|
14
src/warp.c
14
src/warp.c
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2007 Kim Woelders
|
||||
* Copyright (C) 2004-2008 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -354,11 +354,7 @@ WarpFocus(int delta)
|
|||
if (Conf.focus.raise_on_next)
|
||||
EwinRaise(ewin);
|
||||
if (Conf.focus.warp_on_next)
|
||||
if (ewin != Mode.mouse_over_ewin && !ewin->state.iconified)
|
||||
{
|
||||
EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
|
||||
Mode.mouse_over_ewin = ewin;
|
||||
}
|
||||
EwinWarpTo(ewin);
|
||||
if (Conf.warplist.warpfocused)
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
}
|
||||
|
@ -402,11 +398,7 @@ WarpFocusFinish(void)
|
|||
|
||||
EwinOpActivate(ewin, OPSRC_USER, Conf.warplist.raise_on_select);
|
||||
if (Conf.warplist.warp_on_select)
|
||||
if (ewin != Mode.mouse_over_ewin)
|
||||
{
|
||||
EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
|
||||
Mode.mouse_over_ewin = ewin;
|
||||
}
|
||||
EwinWarpTo(ewin);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2007 Kim Woelders
|
||||
* Copyright (C) 2004-2008 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -218,8 +218,7 @@ Zoom(EWin * ewin)
|
|||
if (zoom_mask_4)
|
||||
EDestroyWindow(zoom_mask_4);
|
||||
SwitchRes(0, 0, 0, 0, 0);
|
||||
EXWarpPointer(EwinGetClientXwin(ewin), ewin->client.w / 2,
|
||||
ewin->client.h / 2);
|
||||
EwinWarpTo(ewin);
|
||||
ESync();
|
||||
zoom_last_ewin = NULL;
|
||||
}
|
||||
|
@ -250,8 +249,7 @@ Zoom(EWin * ewin)
|
|||
EwinBorderGetSize(ewin, &bl, &br, &bt, &bb);
|
||||
EwinMove(ewin, -bl + x1, -bt + y1);
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
EXWarpPointer(EwinGetClientXwin(ewin), ewin->client.w / 2,
|
||||
ewin->client.h / 2);
|
||||
EwinWarpTo(ewin);
|
||||
#if 0 /* Doesn't work as intended */
|
||||
XGrabPointer(disp, EwinGetClientXwin(ewin), True,
|
||||
ButtonPressMask | ButtonReleaseMask |
|
||||
|
|
Loading…
Reference in New Issue