parent
204abb82d9
commit
9f7bb47878
|
@ -75,7 +75,8 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
|
|||
|
||||
#if 0 /* Debug */
|
||||
Eprintf("BorderWpITApply: %#lx %#lx %2d %d %s\n",
|
||||
EwinGetClientWin(ewin), EoGetWin(ewin), i, force, EwinGetName(ewin));
|
||||
_EwinGetClientXwin(ewin), EoGetWin(ewin), i, force,
|
||||
EwinGetName(ewin));
|
||||
#endif
|
||||
|
||||
is = ImageclassGetImageState(ewin->border->part[i].iclass, ewb->state,
|
||||
|
@ -157,7 +158,7 @@ EwinBorderDraw(EWin * ewin, int do_shape, int do_paint)
|
|||
|
||||
#if 0 /* Debug */
|
||||
Eprintf("EwinBorderDraw %#lx %s d=%d s=%d p=%d\n",
|
||||
EwinGetClientWin(ewin), EoGetName(ewin), EoGetDesk(ewin), do_shape,
|
||||
_EwinGetClientXwin(ewin), EoGetName(ewin), EoGetDesk(ewin), do_shape,
|
||||
do_paint);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -286,8 +286,8 @@ doEwinMoveResize(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
|
||||
if (EventDebug(EDBUG_TYPE_MOVERESIZE))
|
||||
Eprintf("doEwinMoveResize(%d,%d) %#lx f=%x d=%d %d+%d %d*%d %s\n",
|
||||
call_depth, Mode.mode, ewin->client.win, flags, desk, x, y, w, h,
|
||||
EwinGetName(ewin));
|
||||
call_depth, Mode.mode, _EwinGetClientXwin(ewin), flags, desk, x,
|
||||
y, w, h, EwinGetName(ewin));
|
||||
|
||||
pdesk = (ewin->o.stacked >= 0) ? EoGetDesk(ewin) : -1;
|
||||
desk = desk % Conf.desks.num;
|
||||
|
@ -451,7 +451,7 @@ doEwinMoveResize(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
#endif
|
||||
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w,
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), 0, 0, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EwinBorderCalcSizes(ewin, 0);
|
||||
}
|
||||
|
@ -785,13 +785,13 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
w = b;
|
||||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
if (!Mode.wm.startup)
|
||||
x = x + w - b;
|
||||
|
@ -799,13 +799,13 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
h = d;
|
||||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &d);
|
||||
if (!Mode.wm.startup)
|
||||
y = y + h - d;
|
||||
|
@ -845,26 +845,26 @@ EwinInstantUnShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
w = ewin->client.w + ewin->border->border.left +
|
||||
ewin->border->border.right;
|
||||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
w = ewin->client.w + ewin->border->border.left +
|
||||
ewin->border->border.right;
|
||||
x = x + EoGetW(ewin) - w;
|
||||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
h = ewin->client.h + ewin->border->border.top +
|
||||
ewin->border->border.bottom;
|
||||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
h = ewin->client.h + ewin->border->border.top +
|
||||
ewin->border->border.bottom;
|
||||
y = y + EoGetH(ewin) - h;
|
||||
|
@ -873,7 +873,7 @@ EwinInstantUnShade(EWin * ewin)
|
|||
|
||||
/* Reset gravity */
|
||||
att.win_gravity = NorthWestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
|
||||
ewin->state.shaded = 0;
|
||||
EwinMoveResize(ewin, x, y, ewin->client.w, ewin->client.h);
|
||||
|
@ -887,7 +887,7 @@ EwinInstantUnShade(EWin * ewin)
|
|||
#define _EWIN_ADJUST_SHAPE(ewin, xo, yo) \
|
||||
do { \
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, xo, yo, \
|
||||
ewin->client.win, ShapeBounding, ShapeSet); \
|
||||
_EwinGetClientWin(ewin), ShapeBounding, ShapeSet); \
|
||||
ewin->update.shape = 1; \
|
||||
} while (0)
|
||||
|
||||
|
@ -925,7 +925,7 @@ EwinShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &c);
|
||||
a = w;
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
|
@ -956,7 +956,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &b, &c);
|
||||
a = w;
|
||||
c = x + w;
|
||||
|
@ -989,7 +989,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &c, &b);
|
||||
a = h;
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
|
@ -1020,7 +1020,7 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
EwinBorderMinShadeSize(ewin, &c, &b);
|
||||
a = h;
|
||||
c = y + h;
|
||||
|
@ -1101,17 +1101,17 @@ EwinUnShade(EWin * ewin)
|
|||
default:
|
||||
case 0:
|
||||
att.win_gravity = EastGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
a = ewin->border->border.left + ewin->border->border.right;
|
||||
b = ewin->client.w + a;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(ewin->client.win, -ewin->client.w, 0,
|
||||
EWindowSync(_EwinGetClientWin(ewin)); /* Gravity - recache */
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), -ewin->client.w, 0,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
|
@ -1138,7 +1138,7 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 1:
|
||||
att.win_gravity = WestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
a = ewin->border->border.left + ewin->border->border.right;
|
||||
b = ewin->client.w + a;
|
||||
c = x + a;
|
||||
|
@ -1146,10 +1146,10 @@ EwinUnShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w,
|
||||
EWindowSync(_EwinGetClientWin(ewin)); /* Gravity - recache */
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), 0, 0, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
|
@ -1177,17 +1177,17 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 2:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
a = ewin->border->border.top + ewin->border->border.bottom;
|
||||
b = ewin->client.h + a;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(ewin->client.win, 0, 1 - ewin->client.h,
|
||||
EWindowSync(_EwinGetClientWin(ewin)); /* Gravity - recache */
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), 0, 1 - ewin->client.h,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
|
@ -1214,7 +1214,7 @@ EwinUnShade(EWin * ewin)
|
|||
break;
|
||||
case 3:
|
||||
att.win_gravity = SouthGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
a = ewin->border->border.top + ewin->border->border.bottom;
|
||||
b = ewin->client.h + a;
|
||||
c = y + h;
|
||||
|
@ -1222,10 +1222,10 @@ EwinUnShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
EWindowSync(ewin->client.win); /* Gravity - recache */
|
||||
EMoveResizeWindow(ewin->client.win, 0, 1 - ewin->client.h,
|
||||
EWindowSync(_EwinGetClientWin(ewin)); /* Gravity - recache */
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), 0, 1 - ewin->client.h,
|
||||
ewin->client.w, ewin->client.h);
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
EMapWindow(ewin->win_container);
|
||||
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
|
||||
{
|
||||
|
@ -1255,11 +1255,11 @@ EwinUnShade(EWin * ewin)
|
|||
|
||||
/* Reset gravity */
|
||||
att.win_gravity = NorthWestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
EChangeWindowAttributes(_EwinGetClientWin(ewin), CWWinGravity, &att);
|
||||
|
||||
EMoveResizeWindow(ewin->client.win, 0, 0, ewin->client.w, ewin->client.h);
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), 0, 0, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EMoveResizeWindow(ewin->win_container, ewin->border->border.left,
|
||||
ewin->border->border.top, ewin->client.w, ewin->client.h);
|
||||
|
||||
if (ewin->state.shaped)
|
||||
|
@ -1440,8 +1440,7 @@ void
|
|||
EwinOpKill(EWin * ewin)
|
||||
{
|
||||
SoundPlay("SOUND_WINDOW_CLOSE");
|
||||
/* NB! Got to use X- not E- to get properly through the event handling. */
|
||||
XDestroyWindow(disp, ewin->client.win);
|
||||
EDestroyWindow(_EwinGetClientWin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
106
src/ewins.c
106
src/ewins.c
|
@ -62,7 +62,7 @@ EwinEventsConfigure(EWin * ewin, int mode)
|
|||
emask = (mode) ? ~((long)0) : ~(EnterWindowMask | LeaveWindowMask);
|
||||
|
||||
ESelectInput(EoGetWin(ewin), EWIN_TOP_EVENT_MASK & emask);
|
||||
ESelectInput(ewin->client.win, ewin->client.event_mask & emask);
|
||||
ESelectInput(_EwinGetClientWin(ewin), ewin->client.event_mask & emask);
|
||||
EwinBorderEventsConfigure(ewin, mode);
|
||||
}
|
||||
|
||||
|
@ -147,14 +147,16 @@ EwinCreate(Window win, int type)
|
|||
AddItem(ewin, "EWIN", win, LIST_TYPE_EWIN);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinCreate %#lx frame=%#lx cont=%#lx st=%d\n", ewin->client.win,
|
||||
EoGetWin(ewin), ewin->win_container, ewin->state.state);
|
||||
Eprintf("EwinCreate %#lx frame=%#lx cont=%#lx st=%d\n",
|
||||
_EwinGetClientXwin(ewin), EoGetWin(ewin),
|
||||
_EwinGetContainerXwin(ewin), ewin->state.state);
|
||||
|
||||
EventCallbackRegister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin);
|
||||
EventCallbackRegister(ewin->win_container, 0, EwinHandleEventsContainer,
|
||||
ewin);
|
||||
ERegisterWindow(ewin->client.win);
|
||||
EventCallbackRegister(ewin->client.win, 0, EwinHandleEventsClient, ewin);
|
||||
ERegisterWindow(_EwinGetClientXwin(ewin));
|
||||
EventCallbackRegister(_EwinGetClientWin(ewin), 0, EwinHandleEventsClient,
|
||||
ewin);
|
||||
|
||||
if (!EwinIsInternal(ewin))
|
||||
{
|
||||
|
@ -188,16 +190,17 @@ EwinDestroy(EWin * ewin)
|
|||
return;
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinDestroy %#lx st=%d: %s\n", ewin->client.win,
|
||||
Eprintf("EwinDestroy %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
RemoveItemByPtr(ewin, LIST_TYPE_EWIN);
|
||||
EventCallbackUnregister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin);
|
||||
EventCallbackUnregister(ewin->win_container, 0, EwinHandleEventsContainer,
|
||||
ewin);
|
||||
EventCallbackUnregister(ewin->client.win, 0, EwinHandleEventsClient, ewin);
|
||||
EventCallbackUnregister(_EwinGetClientWin(ewin), 0, EwinHandleEventsClient,
|
||||
ewin);
|
||||
if (!EwinIsInternal(ewin))
|
||||
EUnregisterWindow(ewin->client.win);
|
||||
EUnregisterWindow(_EwinGetClientWin(ewin));
|
||||
|
||||
SnapshotEwinUnmatch(ewin);
|
||||
|
||||
|
@ -377,7 +380,7 @@ GetContextEwin(void)
|
|||
|
||||
done:
|
||||
#if 0
|
||||
Eprintf("GetContextEwin %#lx %s\n", EwinGetClientWin(ewin),
|
||||
Eprintf("GetContextEwin %#lx %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
#endif
|
||||
return ewin;
|
||||
|
@ -389,7 +392,7 @@ SetContextEwin(EWin * ewin)
|
|||
if (ewin && ewin->type == EWIN_TYPE_MENU)
|
||||
return;
|
||||
#if 0
|
||||
Eprintf("SetContextEwin %#lx %s\n", EwinGetClientWin(ewin),
|
||||
Eprintf("SetContextEwin %#lx %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
#endif
|
||||
Mode.context_ewin = ewin;
|
||||
|
@ -485,12 +488,13 @@ void
|
|||
EwinUpdateShapeInfo(EWin * ewin)
|
||||
{
|
||||
EGrabServer();
|
||||
ewin->state.shaped = EShapeCopy(ewin->win_container, ewin->client.win);
|
||||
ewin->state.shaped =
|
||||
EShapeCopy(ewin->win_container, _EwinGetClientWin(ewin));
|
||||
EUngrabServer();
|
||||
|
||||
#if 0 /* Debug */
|
||||
Eprintf("EwinUpdateShapeInfo %#lx cont=%#lx shaped=%d\n",
|
||||
ewin->client.win, ewin->win_container, ewin->client.shaped);
|
||||
_EwinGetClientXwin(ewin), ewin->win_container, ewin->client.shaped);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -505,7 +509,7 @@ EwinPropagateShapes(EWin * ewin)
|
|||
|
||||
#if 0
|
||||
Eprintf("EwinPropagateShapes %#lx %#lx %s\n", EoGetWin(ewin),
|
||||
ewin->client.win, EoGetName(ewin));
|
||||
_EwinGetClientXwin(ewin), EoGetName(ewin));
|
||||
#endif
|
||||
if (ewin->update.shape)
|
||||
{
|
||||
|
@ -578,7 +582,7 @@ Adopt(EWin * ewin)
|
|||
GrabButtonGrabs(ewin);
|
||||
|
||||
/* We must reparent after getting original window position */
|
||||
EReparentWindow(ewin->client.win, ewin->win_container, 0, 0);
|
||||
EReparentWindow(_EwinGetClientWin(ewin), ewin->win_container, 0, 0);
|
||||
ICCCM_Adopt(ewin);
|
||||
|
||||
EwinBorderSelect(ewin); /* Select border before calculating geometry */
|
||||
|
@ -596,8 +600,8 @@ Adopt(EWin * ewin)
|
|||
HintsSetClientList();
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("Adopt %#lx st=%d: %s\n", ewin->client.win, ewin->state.state,
|
||||
EwinGetName(ewin));
|
||||
Eprintf("Adopt %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -644,7 +648,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
/* Don't treat this as a normal transient */
|
||||
ewin->icccm.transient = -1;
|
||||
}
|
||||
else if (ewin->icccm.transient_for == ewin->client.win)
|
||||
else if (ewin->icccm.transient_for == _EwinGetClientXwin(ewin))
|
||||
{
|
||||
/* Some apps actually do this. Why? */
|
||||
ewin->icccm.transient = 0;
|
||||
|
@ -945,7 +949,7 @@ EwinWithdraw(EWin * ewin)
|
|||
/* Only external clients should go here */
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinWithdraw %#lx st=%d: %s\n", ewin->client.win,
|
||||
Eprintf("EwinWithdraw %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
EGrabServer();
|
||||
|
@ -953,10 +957,10 @@ EwinWithdraw(EWin * ewin)
|
|||
/* Park the client window on the root */
|
||||
x = ewin->client.x;
|
||||
y = ewin->client.y;
|
||||
XTranslateCoordinates(disp, ewin->client.win, VRoot.win,
|
||||
ETranslateCoordinates(_EwinGetClientWin(ewin), VRoot.win,
|
||||
-ewin->border->border.left,
|
||||
-ewin->border->border.top, &x, &y, &win);
|
||||
EReparentWindow(ewin->client.win, VRoot.win, x, y);
|
||||
EReparentWindow(_EwinGetClientWin(ewin), VRoot.win, x, y);
|
||||
ICCCM_Withdraw(ewin);
|
||||
HintsDelWindowHints(ewin);
|
||||
|
||||
|
@ -976,8 +980,9 @@ EwinEventMapRequest(EWin * ewin, Window win)
|
|||
else
|
||||
{
|
||||
Eprintf("AddToFamily: Already managing %s %#lx\n", "A",
|
||||
ewin->client.win);
|
||||
EReparentWindow(ewin->client.win, ewin->win_container, 0, 0);
|
||||
_EwinGetClientXwin(ewin));
|
||||
EReparentWindow(_EwinGetClientWin(ewin), ewin->win_container, 0,
|
||||
0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -989,8 +994,9 @@ EwinEventMapRequest(EWin * ewin, Window win)
|
|||
if (ewin)
|
||||
{
|
||||
Eprintf("AddToFamily: Already managing %s %#lx\n", "B",
|
||||
ewin->client.win);
|
||||
EReparentWindow(ewin->client.win, ewin->win_container, 0, 0);
|
||||
_EwinGetClientXwin(ewin));
|
||||
EReparentWindow(_EwinGetClientWin(ewin), ewin->win_container, 0,
|
||||
0);
|
||||
ShowEwin(ewin);
|
||||
}
|
||||
else
|
||||
|
@ -1002,7 +1008,7 @@ static void
|
|||
EwinEventDestroy(EWin * ewin)
|
||||
{
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventDestroy %#lx st=%d: %s\n", ewin->client.win,
|
||||
Eprintf("EwinEventDestroy %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
EwinDestroy(ewin);
|
||||
|
@ -1016,11 +1022,12 @@ EwinEventReparent(EWin * ewin)
|
|||
EGrabServer();
|
||||
|
||||
/* Refetch parent window. We cannot rely on the one in the event. */
|
||||
parent = EWindowGetParent(ewin->client.win);
|
||||
parent = EWindowGetParent(_EwinGetClientWin(ewin));
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventReparent %#lx st=%d parent=%#lx: %s\n",
|
||||
ewin->client.win, ewin->state.state, parent, EwinGetName(ewin));
|
||||
if (parent != ewin->win_container)
|
||||
_EwinGetClientXwin(ewin), ewin->state.state, parent,
|
||||
EwinGetName(ewin));
|
||||
if (parent != _EwinGetContainerXwin(ewin))
|
||||
EwinDestroy(ewin);
|
||||
|
||||
EUngrabServer();
|
||||
|
@ -1034,7 +1041,7 @@ EwinEventMap(EWin * ewin)
|
|||
ewin->state.state = EWIN_STATE_MAPPED;
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventMap %#lx st=%d: %s\n", ewin->client.win,
|
||||
Eprintf("EwinEventMap %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
/* If first time we may want to focus it (unless during startup) */
|
||||
|
@ -1050,7 +1057,7 @@ static void
|
|||
EwinEventUnmap(EWin * ewin)
|
||||
{
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventUnmap %#lx st=%d: %s\n", ewin->client.win,
|
||||
Eprintf("EwinEventUnmap %#lx st=%d: %s\n", _EwinGetClientXwin(ewin),
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
if (ewin->state.state == EWIN_STATE_WITHDRAWN)
|
||||
|
@ -1062,7 +1069,7 @@ EwinEventUnmap(EWin * ewin)
|
|||
ewin->state.state = EWIN_STATE_ICONIC;
|
||||
|
||||
EwinUnmap1(ewin);
|
||||
EWindowSetMapped(ewin->client.win, 0);
|
||||
EWindowSetMapped(_EwinGetClientWin(ewin), 0);
|
||||
EoUnmap(ewin);
|
||||
EwinUnmap2(ewin);
|
||||
|
||||
|
@ -1078,7 +1085,7 @@ EwinEventUnmap(EWin * ewin)
|
|||
return;
|
||||
}
|
||||
|
||||
if (EWindowGetParent(ewin->client.win) == ewin->win_container)
|
||||
if (EWindowGetParent(_EwinGetClientWin(ewin)) == _EwinGetContainerXwin(ewin))
|
||||
EwinWithdraw(ewin);
|
||||
}
|
||||
|
||||
|
@ -1214,7 +1221,7 @@ EwinEventVisibility(EWin * ewin, int state)
|
|||
void
|
||||
EwinReparent(EWin * ewin, Window parent)
|
||||
{
|
||||
EReparentWindow(ewin->client.win, parent, 0, 0);
|
||||
EReparentWindow(_EwinGetClientWin(ewin), parent, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1229,7 +1236,8 @@ RestackEwin(EWin * ewin)
|
|||
unsigned int value_mask;
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_STACKING))
|
||||
Eprintf("RestackEwin %#lx %s\n", ewin->client.win, EwinGetName(ewin));
|
||||
Eprintf("RestackEwin %#lx %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
|
||||
lst = EwinListGetForDesk(&num, EoGetDesk(ewin));
|
||||
if (num < 2)
|
||||
|
@ -1277,8 +1285,8 @@ RaiseEwin(EWin * ewin)
|
|||
num = EoRaise(ewin);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_RAISELOWER))
|
||||
Eprintf("RaiseEwin(%d) %#lx %s n=%d\n", call_depth, ewin->client.win,
|
||||
EwinGetName(ewin), num);
|
||||
Eprintf("RaiseEwin(%d) %#lx %s n=%d\n", call_depth,
|
||||
_EwinGetClientXwin(ewin), EwinGetName(ewin), num);
|
||||
|
||||
if (num == 0) /* Quit if stacking is unchanged */
|
||||
goto done;
|
||||
|
@ -1318,8 +1326,8 @@ LowerEwin(EWin * ewin)
|
|||
num = EoLower(ewin);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_RAISELOWER))
|
||||
Eprintf("LowerEwin(%d) %#lx %s n=%d\n", call_depth, ewin->client.win,
|
||||
EwinGetName(ewin), num);
|
||||
Eprintf("LowerEwin(%d) %#lx %s n=%d\n", call_depth,
|
||||
_EwinGetClientXwin(ewin), EwinGetName(ewin), num);
|
||||
|
||||
if (num == 0) /* Quit if stacking is unchanged */
|
||||
goto done;
|
||||
|
@ -1348,13 +1356,13 @@ ShowEwin(EWin * ewin)
|
|||
if (EoIsShown(ewin))
|
||||
return;
|
||||
|
||||
if (ewin->client.win)
|
||||
if (_EwinGetClientWin(ewin))
|
||||
{
|
||||
#if 0 /* FIXME - Why? */
|
||||
if (ewin->state.shaded)
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
#endif
|
||||
EMapWindow(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
}
|
||||
|
||||
if (ewin->update.shape)
|
||||
|
@ -1377,7 +1385,7 @@ HideEwin(EWin * ewin)
|
|||
|
||||
EwinUnmap1(ewin);
|
||||
|
||||
EUnmapWindow(ewin->client.win);
|
||||
EUnmapWindow(_EwinGetClientWin(ewin));
|
||||
EoUnmap(ewin);
|
||||
|
||||
EwinUnmap2(ewin);
|
||||
|
@ -1396,7 +1404,7 @@ HideEwin(EWin * ewin)
|
|||
Window
|
||||
EwinGetClientWin(const EWin * ewin)
|
||||
{
|
||||
return (ewin) ? ewin->client.win : None;
|
||||
return (ewin) ? _EwinGetClientWin(ewin) : None;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -1440,7 +1448,7 @@ EwinGetIconName(const EWin * ewin)
|
|||
}
|
||||
|
||||
int
|
||||
EwinIsOnScreen(EWin * ewin)
|
||||
EwinIsOnScreen(const EWin * ewin)
|
||||
{
|
||||
int x, y, w, h;
|
||||
|
||||
|
@ -1639,7 +1647,7 @@ EwinsSetFree(void)
|
|||
|
||||
/* This makes E determine the client window stacking at exit */
|
||||
EwinInstantUnShade(ewin);
|
||||
EReparentWindow(ewin->client.win, RRoot.win,
|
||||
EReparentWindow(_EwinGetClientWin(ewin), RRoot.win,
|
||||
ewin->client.x, ewin->client.y);
|
||||
}
|
||||
}
|
||||
|
@ -1698,7 +1706,7 @@ EwinHandleEventsToplevel(XEvent * ev, void *prm)
|
|||
default:
|
||||
#if DEBUG_EWIN_EVENTS
|
||||
Eprintf("EwinHandleEventsToplevel: type=%2d win=%#lx: %s\n",
|
||||
ev->type, ewin->client.win, EwinGetName(ewin));
|
||||
ev->type, _EwinGetClientXwin(ewin), EwinGetName(ewin));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1711,7 +1719,7 @@ EwinHandleEventsContainer(XEvent * ev, void *prm)
|
|||
|
||||
#if 0
|
||||
Eprintf("EwinHandleEventsContainer: type=%2d win=%#lx: %s\n",
|
||||
ev->type, ewin->client.win, EwinGetName(ewin));
|
||||
ev->type, _EwinGetClientXwin(ewin), EwinGetName(ewin));
|
||||
#endif
|
||||
switch (ev->type)
|
||||
{
|
||||
|
@ -1739,7 +1747,7 @@ EwinHandleEventsContainer(XEvent * ev, void *prm)
|
|||
if (ewin->state.state == EWIN_STATE_NEW)
|
||||
{
|
||||
Eprintf("EwinEventUnmap %#lx: Ignoring bogus Unmap event\n",
|
||||
ewin->client.win);
|
||||
_EwinGetClientXwin(ewin));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -1758,7 +1766,7 @@ EwinHandleEventsContainer(XEvent * ev, void *prm)
|
|||
|
||||
default:
|
||||
Eprintf("EwinHandleEventsContainer: type=%2d win=%#lx: %s\n",
|
||||
ev->type, ewin->client.win, EwinGetName(ewin));
|
||||
ev->type, _EwinGetClientXwin(ewin), EwinGetName(ewin));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1792,7 +1800,7 @@ EwinHandleEventsClient(XEvent * ev, void *prm)
|
|||
default:
|
||||
#if DEBUG_EWIN_EVENTS
|
||||
Eprintf("EwinHandleEventsClient: type=%2d win=%#lx: %s\n",
|
||||
ev->type, ewin->client.win, EwinGetName(ewin));
|
||||
ev->type, _EwinGetClientXwin(ewin), EwinGetName(ewin));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ struct _ewin
|
|||
const Border *previous_border;
|
||||
EWinBit *bits;
|
||||
|
||||
char toggle; /* FIXME - Eliminate */
|
||||
|
||||
struct
|
||||
{
|
||||
Window win;
|
||||
|
@ -214,6 +216,11 @@ struct _ewin
|
|||
#define EwinIsWindowGroupLeader(ewin) (ewin->icccm.is_group_leader)
|
||||
#define EwinGetWindowGroup(ewin) (ewin->icccm.group)
|
||||
|
||||
#define _EwinGetClientWin(ewin) (ewin->client.win)
|
||||
#define _EwinGetClientXwin(ewin) (ewin->client.win)
|
||||
#define _EwinGetContainerWin(ewin) (ewin->win_container)
|
||||
#define _EwinGetContainerXwin(ewin) (ewin->win_container)
|
||||
|
||||
/* ewins.c */
|
||||
#define EWIN_CHANGE_NAME (1<<0)
|
||||
#define EWIN_CHANGE_ICON_NAME (1<<1)
|
||||
|
@ -249,7 +256,7 @@ void EwinReparent(EWin * ewin, Window parent);
|
|||
Window EwinGetClientWin(const EWin * ewin);
|
||||
const char *EwinGetName(const EWin * ewin);
|
||||
const char *EwinGetIconName(const EWin * ewin);
|
||||
int EwinIsOnScreen(EWin * ewin);
|
||||
int EwinIsOnScreen(const EWin * ewin);
|
||||
void EwinRememberPositionSet(EWin * ewin);
|
||||
void EwinRememberPositionGet(EWin * ewin, int *px, int *py);
|
||||
|
||||
|
|
41
src/ewmh.c
41
src/ewmh.c
|
@ -294,7 +294,7 @@ EWMH_SetClientList(void)
|
|||
{
|
||||
wl = Emalloc(num * sizeof(Ecore_X_Window));
|
||||
for (i = 0; i < num; i++)
|
||||
wl[i] = lst[num - i - 1]->client.win;
|
||||
wl[i] = _EwinGetClientXwin(lst[num - i - 1]);
|
||||
ecore_x_netwm_client_list_set(VRoot.win, wl, num);
|
||||
Efree(wl);
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ EWMH_SetClientStacking(void)
|
|||
{
|
||||
wl = Emalloc(num * sizeof(Ecore_X_Window));
|
||||
for (i = 0; i < num; i++)
|
||||
wl[i] = lst[num - i - 1]->client.win;
|
||||
wl[i] = _EwinGetClientXwin(lst[num - i - 1]);
|
||||
ecore_x_netwm_client_list_stacking_set(VRoot.win, wl, num);
|
||||
Efree(wl);
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ EWMH_SetWindowDesktop(const EWin * ewin)
|
|||
val = 0xFFFFFFFF;
|
||||
else
|
||||
val = EoGetDesk(ewin);
|
||||
ecore_x_netwm_desktop_set(ewin->client.win, val);
|
||||
ecore_x_netwm_desktop_set(_EwinGetClientXwin(ewin), val);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -403,8 +403,9 @@ EWMH_SetWindowState(const EWin * ewin)
|
|||
ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION,
|
||||
ewin->state.attention);
|
||||
|
||||
ecore_x_window_prop_atom_set(ewin->client.win, ECORE_X_ATOM_NET_WM_STATE,
|
||||
atom_list, atom_count);
|
||||
ecore_x_window_prop_atom_set(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_STATE, atom_list,
|
||||
atom_count);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -422,14 +423,14 @@ EWMH_SetWindowBorder(const EWin * ewin)
|
|||
else
|
||||
val[0] = val[1] = val[2] = val[3] = 0;
|
||||
|
||||
ecore_x_window_prop_card32_set(ewin->client.win,
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_FRAME_EXTENTS, val, 4);
|
||||
}
|
||||
|
||||
void
|
||||
EWMH_SetWindowOpacity(const EWin * ewin)
|
||||
{
|
||||
ecore_x_netwm_opacity_set(ewin->client.win, ewin->ewmh.opacity);
|
||||
ecore_x_netwm_opacity_set(_EwinGetClientXwin(ewin), ewin->ewmh.opacity);
|
||||
ecore_x_netwm_opacity_set(EoGetWin(ewin), ewin->ewmh.opacity);
|
||||
}
|
||||
|
||||
|
@ -444,7 +445,7 @@ EWMH_GetWindowName(EWin * ewin)
|
|||
|
||||
_EFREE(ewin->ewmh.wm_name);
|
||||
|
||||
ecore_x_netwm_name_get(ewin->client.win, &val);
|
||||
ecore_x_netwm_name_get(_EwinGetClientXwin(ewin), &val);
|
||||
if (!val)
|
||||
return;
|
||||
ewin->ewmh.wm_name = EstrUtf82Int(val, 0);
|
||||
|
@ -460,7 +461,7 @@ EWMH_GetWindowIconName(EWin * ewin)
|
|||
|
||||
_EFREE(ewin->ewmh.wm_icon_name);
|
||||
|
||||
ecore_x_netwm_icon_name_get(ewin->client.win, &val);
|
||||
ecore_x_netwm_icon_name_get(_EwinGetClientXwin(ewin), &val);
|
||||
if (!val)
|
||||
return;
|
||||
ewin->ewmh.wm_icon_name = EstrUtf82Int(val, 0);
|
||||
|
@ -475,7 +476,7 @@ EWMH_GetWindowDesktop(EWin * ewin)
|
|||
int num;
|
||||
unsigned int desk;
|
||||
|
||||
num = ecore_x_netwm_desktop_get(ewin->client.win, &desk);
|
||||
num = ecore_x_netwm_desktop_get(_EwinGetClientXwin(ewin), &desk);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -499,7 +500,7 @@ EWMH_GetWindowState(EWin * ewin)
|
|||
Ecore_X_Atom *p_atoms, atom;
|
||||
int i, n_atoms;
|
||||
|
||||
n_atoms = ecore_x_window_prop_atom_list_get(ewin->client.win,
|
||||
n_atoms = ecore_x_window_prop_atom_list_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_STATE,
|
||||
&p_atoms);
|
||||
if (n_atoms <= 0)
|
||||
|
@ -548,7 +549,7 @@ EWMH_GetWindowType(EWin * ewin)
|
|||
Ecore_X_Atom *p_atoms, atom;
|
||||
int n_atoms;
|
||||
|
||||
n_atoms = ecore_x_window_prop_atom_list_get(ewin->client.win,
|
||||
n_atoms = ecore_x_window_prop_atom_list_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
|
||||
&p_atoms);
|
||||
if (n_atoms <= 0)
|
||||
|
@ -617,7 +618,7 @@ EWMH_GetWindowIcons(EWin * ewin)
|
|||
ewin->ewmh.wm_icon = NULL;
|
||||
}
|
||||
|
||||
num = ecore_x_window_prop_card32_list_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_card32_list_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_ICON, &val);
|
||||
ewin->ewmh.wm_icon_len = num;
|
||||
if (num <= 0)
|
||||
|
@ -643,7 +644,7 @@ EWMH_GetWindowMisc(EWin * ewin)
|
|||
int num;
|
||||
Ecore_X_Window win;
|
||||
|
||||
num = ecore_x_window_prop_window_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_window_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
|
||||
&win, 1);
|
||||
if (num <= 0)
|
||||
|
@ -659,7 +660,7 @@ EWMH_GetWindowOpacity(EWin * ewin)
|
|||
int num;
|
||||
unsigned int opacity;
|
||||
|
||||
num = ecore_x_netwm_opacity_get(ewin->client.win, &opacity);
|
||||
num = ecore_x_netwm_opacity_get(_EwinGetClientXwin(ewin), &opacity);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -680,12 +681,12 @@ EWMH_GetWindowStrut(EWin * ewin)
|
|||
int num;
|
||||
unsigned int val[12];
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, val,
|
||||
12);
|
||||
|
||||
if (num < 4)
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_STRUT, val, 4);
|
||||
if (num < 4)
|
||||
return;
|
||||
|
@ -736,7 +737,7 @@ EWMH_SetWindowActions(const EWin * ewin)
|
|||
if (!ewin->state.inhibit_close)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
|
||||
|
||||
ecore_x_window_prop_atom_set(ewin->client.win,
|
||||
ecore_x_window_prop_atom_set(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, aa, num);
|
||||
}
|
||||
|
||||
|
@ -760,8 +761,8 @@ EWMH_GetWindowHints(EWin * ewin)
|
|||
void
|
||||
EWMH_DelWindowHints(const EWin * ewin)
|
||||
{
|
||||
XDeleteProperty(disp, ewin->client.win, ECORE_X_ATOM_NET_WM_DESKTOP);
|
||||
XDeleteProperty(disp, ewin->client.win, ECORE_X_ATOM_NET_WM_STATE);
|
||||
XDeleteProperty(disp, _EwinGetClientXwin(ewin), ECORE_X_ATOM_NET_WM_DESKTOP);
|
||||
XDeleteProperty(disp, _EwinGetClientXwin(ewin), ECORE_X_ATOM_NET_WM_STATE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -62,7 +62,7 @@ EwinFindByClient(Window win)
|
|||
ewins = EwinListGetAll(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (win == ewins[i]->client.win)
|
||||
if (win == _EwinGetClientXwin(ewins[i]))
|
||||
return ewins[i];
|
||||
}
|
||||
return NULL;
|
||||
|
@ -77,7 +77,8 @@ EwinFindByChildren(Window win)
|
|||
ewins = EwinListGetAll(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if ((win == ewins[i]->client.win) || (win == ewins[i]->win_container))
|
||||
if ((win == _EwinGetClientXwin(ewins[i])) ||
|
||||
(win == _EwinGetContainerXwin(ewins[i])))
|
||||
{
|
||||
return ewins[i];
|
||||
}
|
||||
|
@ -115,7 +116,7 @@ EwinFindByString(const char *match, int type)
|
|||
if (type == '+')
|
||||
{
|
||||
/* Match start of window ID */
|
||||
sprintf(ewinid, "%x", (unsigned)ewins[i]->client.win);
|
||||
sprintf(ewinid, "%x", (unsigned)_EwinGetClientXwin(ewins[i]));
|
||||
if (strncmp(ewinid, match, len))
|
||||
continue;
|
||||
}
|
||||
|
@ -368,7 +369,7 @@ EwinListTransients(EWin * ewin, int *num, int group)
|
|||
if (ew == ewin)
|
||||
continue;
|
||||
|
||||
if (EwinGetTransientFor(ew) == ewin->client.win)
|
||||
if (EwinGetTransientFor(ew) == _EwinGetClientXwin(ewin))
|
||||
{
|
||||
lst = Erealloc(lst, (j + 1) * sizeof(EWin *));
|
||||
lst[j++] = ew;
|
||||
|
@ -425,7 +426,7 @@ EwinListTransientFor(EWin * ewin, int *num)
|
|||
continue;
|
||||
|
||||
/* Regular parent or if root trans, top level group members */
|
||||
if ((EwinGetTransientFor(ewin) == ew->client.win) ||
|
||||
if ((EwinGetTransientFor(ewin) == _EwinGetClientXwin(ew)) ||
|
||||
(!EwinIsTransient(ew) &&
|
||||
EwinGetTransientFor(ewin) == VRoot.win &&
|
||||
EwinGetWindowGroup(ew) == EwinGetWindowGroup(ewin)))
|
||||
|
|
33
src/focus.c
33
src/focus.c
|
@ -62,9 +62,9 @@ FocusEwinValid(EWin * ewin, int want_on_screen, int click, int want_visible)
|
|||
return 0;
|
||||
|
||||
#if 0
|
||||
Eprintf("FocusEwinValid %#lx %s: cl=%d(%d) vis=%d(%d)\n", ewin->client.win,
|
||||
EwinGetName(ewin), click, ewin->props.focusclick, want_visible,
|
||||
ewin->state.visibility);
|
||||
Eprintf("FocusEwinValid %#lx %s: cl=%d(%d) vis=%d(%d)\n",
|
||||
_EwinGetClientXwin(ewin), EwinGetName(ewin), click,
|
||||
ewin->props.focusclick, want_visible, ewin->state.visibility);
|
||||
#endif
|
||||
|
||||
if (ewin->state.inhibit_focus)
|
||||
|
@ -203,18 +203,18 @@ FocusEwinSetGrabs(EWin * ewin)
|
|||
ewin != EwinListStackGetTop()) ||
|
||||
(Conf.focus.mode == MODE_FOCUS_CLICK && !ewin->state.active))
|
||||
{
|
||||
GrabButtonSet(AnyButton, AnyModifier, ewin->win_container,
|
||||
GrabButtonSet(AnyButton, AnyModifier, _EwinGetContainerWin(ewin),
|
||||
ButtonPressMask, ECSR_PGRAB, 1);
|
||||
#if 0
|
||||
Eprintf("FocusEwinSetGrabs: %#lx grab %s\n", ewin->client.win,
|
||||
Eprintf("FocusEwinSetGrabs: %#lx grab %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
GrabButtonRelease(AnyButton, AnyModifier, ewin->win_container);
|
||||
GrabButtonRelease(AnyButton, AnyModifier, _EwinGetContainerWin(ewin));
|
||||
#if 0
|
||||
Eprintf("FocusEwinSetGrabs: %#lx ungrab %s\n", ewin->client.win,
|
||||
Eprintf("FocusEwinSetGrabs: %#lx ungrab %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
#endif
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ FocusFix(void)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
ewin = lst[i];
|
||||
GrabButtonRelease(AnyButton, AnyModifier, ewin->win_container);
|
||||
GrabButtonRelease(AnyButton, AnyModifier, _EwinGetContainerWin(ewin));
|
||||
FocusEwinSetGrabs(ewin);
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
|
||||
if (EventDebug(EDBUG_TYPE_FOCUS))
|
||||
Eprintf("doFocusToEWin %#lx %s why=%d\n",
|
||||
(ewin) ? ewin->client.win : 0,
|
||||
(ewin) ? _EwinGetClientXwin(ewin) : 0,
|
||||
(ewin) ? EwinGetName(ewin) : "None", why);
|
||||
|
||||
switch (why)
|
||||
|
@ -361,7 +361,7 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
|
||||
if (Conf.focus.mode != MODE_FOCUS_CLICK)
|
||||
DoIn("AUTORAISE_TIMEOUT", 0.001 * Conf.autoraise.delay,
|
||||
AutoraiseTimeout, ewin->client.win, NULL);
|
||||
AutoraiseTimeout, _EwinGetClientXwin(ewin), NULL);
|
||||
}
|
||||
|
||||
if (do_raise)
|
||||
|
@ -381,8 +381,8 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
{
|
||||
default:
|
||||
case FOCUS_PREV:
|
||||
DoIn("REVERSE_FOCUS_TIMEOUT", 0.5, ReverseTimeout, ewin->client.win,
|
||||
NULL);
|
||||
DoIn("REVERSE_FOCUS_TIMEOUT", 0.5, ReverseTimeout,
|
||||
_EwinGetClientXwin(ewin), NULL);
|
||||
break;
|
||||
case FOCUS_DESK_ENTER:
|
||||
break;
|
||||
|
@ -421,7 +421,7 @@ FocusToEWin(EWin * ewin, int why)
|
|||
{
|
||||
if (EventDebug(EDBUG_TYPE_FOCUS))
|
||||
Eprintf("FocusToEWin(%d) %#lx %s why=%d\n", focus_inhibit,
|
||||
(ewin) ? ewin->client.win : 0,
|
||||
(ewin) ? _EwinGetClientXwin(ewin) : 0,
|
||||
(ewin) ? EwinGetName(ewin) : "None", why);
|
||||
|
||||
switch (why)
|
||||
|
@ -601,8 +601,9 @@ FocusHandleClick(EWin * ewin, Window win)
|
|||
|
||||
/* allow click to pass thorugh */
|
||||
if (EventDebug(EDBUG_TYPE_GRABS))
|
||||
Eprintf("FocusHandleClick %#lx %#lx\n", win, ewin->win_container);
|
||||
if (win == ewin->win_container)
|
||||
Eprintf("FocusHandleClick %#lx %#lx\n", win,
|
||||
_EwinGetContainerXwin(ewin));
|
||||
if (win == _EwinGetContainerXwin(ewin))
|
||||
{
|
||||
ESync();
|
||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||
|
@ -990,7 +991,7 @@ FocusIpc(const char *params, Client * c __UNUSED__)
|
|||
|
||||
ewin = GetFocusEwin();
|
||||
if (ewin)
|
||||
IpcPrintf("Focused: %#lx\n", ewin->client.win);
|
||||
IpcPrintf("Focused: %#lx\n", _EwinGetClientXwin(ewin));
|
||||
else
|
||||
IpcPrintf("Focused: none\n");
|
||||
}
|
||||
|
|
49
src/gnome.c
49
src/gnome.c
|
@ -301,9 +301,8 @@ GNOME_GetHintIcons(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num =
|
||||
ecore_x_window_prop_xid_list_get(ewin->client.win, atom_get, XA_PIXMAP,
|
||||
&plst);
|
||||
num = ecore_x_window_prop_xid_list_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
XA_PIXMAP, &plst);
|
||||
if (num < 2)
|
||||
return;
|
||||
|
||||
|
@ -331,7 +330,8 @@ GNOME_GetHintLayer(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, &layer, 1);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
&layer, 1);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -354,7 +354,8 @@ GNOME_GetHintState(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, &flags, 1);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
&flags, 1);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -386,7 +387,8 @@ GNOME_GetHintAppState(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, &flags, 1);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
&flags, 1);
|
||||
if (num <= 0)
|
||||
return;
|
||||
}
|
||||
|
@ -407,7 +409,8 @@ GNOME_GetHintDesktop(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, &desk, 1);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
&desk, 1);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -430,7 +433,8 @@ GNOME_GetHint(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, &flags, 1);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
&flags, 1);
|
||||
if (num <= 0)
|
||||
return;
|
||||
|
||||
|
@ -463,7 +467,7 @@ GNOME_SetHint(const EWin * ewin)
|
|||
val |= WIN_STATE_SHADED;
|
||||
if (ewin->props.fixedpos)
|
||||
val |= WIN_STATE_FIXED_POSITION;
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, atom_set, &val, 1);
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), atom_set, &val, 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -478,7 +482,7 @@ GNOME_SetEwinArea(const EWin * ewin)
|
|||
atom_set = XInternAtom(disp, XA_WIN_AREA, False);
|
||||
val[0] = ewin->area_x;
|
||||
val[1] = ewin->area_y;
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, atom_set, val, 2);
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), atom_set, val, 2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -492,7 +496,7 @@ GNOME_SetEwinDesk(const EWin * ewin)
|
|||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_WORKSPACE, False);
|
||||
val = EoGetDesk(ewin);
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, atom_set, &val, 1);
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), atom_set, &val, 1);
|
||||
}
|
||||
|
||||
#if 0 /* Does nothing */
|
||||
|
@ -511,7 +515,8 @@ GNOME_GetExpandedSize(EWin * ewin, Atom atom_change)
|
|||
if ((atom_change) && (atom_change != atom_get))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_card32_get(ewin->client.win, atom_get, exp, 4);
|
||||
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), atom_get,
|
||||
exp, 4);
|
||||
if (num >= 4)
|
||||
{
|
||||
#if 0 /* Not actually used */
|
||||
|
@ -660,7 +665,7 @@ GNOME_SetClientList(void)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (!lst[i]->props.skip_ext_task && lst[i]->state.iconified != 4)
|
||||
wl[j++] = lst[i]->client.win;
|
||||
wl[j++] = _EwinGetClientXwin(lst[i]);
|
||||
}
|
||||
}
|
||||
ecore_x_window_prop_card32_set(VRoot.win, atom_set, wl, j);
|
||||
|
@ -688,6 +693,7 @@ void
|
|||
GNOME_DelHints(const EWin * ewin)
|
||||
{
|
||||
static Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 };
|
||||
Window win;
|
||||
|
||||
if (!atom_get[0])
|
||||
{
|
||||
|
@ -698,12 +704,14 @@ GNOME_DelHints(const EWin * ewin)
|
|||
atom_get[4] = XInternAtom(disp, XA_WIN_APP_STATE, False);
|
||||
atom_get[5] = XInternAtom(disp, XA_WIN_AREA, False);
|
||||
}
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[0]);
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[1]);
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[2]);
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[3]);
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[4]);
|
||||
XDeleteProperty(disp, ewin->client.win, atom_get[5]);
|
||||
|
||||
win = _EwinGetClientXwin(ewin);
|
||||
XDeleteProperty(disp, win, atom_get[0]);
|
||||
XDeleteProperty(disp, win, atom_get[1]);
|
||||
XDeleteProperty(disp, win, atom_get[2]);
|
||||
XDeleteProperty(disp, win, atom_get[3]);
|
||||
XDeleteProperty(disp, win, atom_get[4]);
|
||||
XDeleteProperty(disp, win, atom_get[5]);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -773,7 +781,8 @@ GNOME_ProcessClientMessage(XClientMessageEvent * event)
|
|||
|
||||
val = event->data.l[0];
|
||||
EoSetLayer(ewin, val);
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, a4, &val, 1);
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), a4,
|
||||
&val, 1);
|
||||
RaiseEwin(ewin);
|
||||
}
|
||||
return;
|
||||
|
|
14
src/hints.c
14
src/hints.c
|
@ -332,14 +332,15 @@ EHintsSetInfo(const EWin * ewin)
|
|||
c[7] = ewin->client.h;
|
||||
c[8] = ewin->state.docked;
|
||||
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, a, (unsigned int *)c, 9);
|
||||
ecore_x_window_prop_card32_set(_EwinGetClientXwin(ewin), a,
|
||||
(unsigned int *)c, 9);
|
||||
|
||||
ecore_x_window_prop_string_set(ewin->client.win, aa,
|
||||
ecore_x_window_prop_string_set(_EwinGetClientXwin(ewin), aa,
|
||||
ewin->normal_border->name);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap set einf %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
ewin->client.win, ewin->client.x, ewin->client.y,
|
||||
_EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, EwinGetName(ewin));
|
||||
}
|
||||
|
||||
|
@ -360,7 +361,8 @@ EHintsGetInfo(EWin * ewin)
|
|||
aa = XInternAtom(disp, "ENL_INTERNAL_DATA_BORDER", False);
|
||||
|
||||
num =
|
||||
ecore_x_window_prop_card32_get(ewin->client.win, a, (unsigned int *)c, 9);
|
||||
ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), a,
|
||||
(unsigned int *)c, 9);
|
||||
if (num < 8)
|
||||
return 0;
|
||||
|
||||
|
@ -383,14 +385,14 @@ EHintsGetInfo(EWin * ewin)
|
|||
}
|
||||
ewin->state.placed = 1;
|
||||
|
||||
str = ecore_x_window_prop_string_get(ewin->client.win, aa);
|
||||
str = ecore_x_window_prop_string_get(_EwinGetClientXwin(ewin), aa);
|
||||
if (str)
|
||||
EwinSetBorderByName(ewin, str);
|
||||
Efree(str);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap get einf %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
ewin->client.win, ewin->client.x, ewin->client.y,
|
||||
_EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, EwinGetName(ewin));
|
||||
|
||||
return 0;
|
||||
|
|
78
src/icccm.c
78
src/icccm.c
|
@ -75,7 +75,7 @@ ICCCM_GetTitle(EWin * ewin, Atom atom_change)
|
|||
|
||||
_EFREE(ewin->icccm.wm_name);
|
||||
|
||||
ewin->icccm.wm_name = ecore_x_icccm_title_get(ewin->client.win);
|
||||
ewin->icccm.wm_name = ecore_x_icccm_title_get(_EwinGetClientXwin(ewin));
|
||||
|
||||
EwinChange(ewin, EWIN_CHANGE_NAME);
|
||||
}
|
||||
|
@ -91,13 +91,14 @@ ICCCM_GetColormap(EWin * ewin)
|
|||
return;
|
||||
|
||||
/* Hmmm.. Why? */
|
||||
win = ewin->client.win;
|
||||
num = ecore_x_window_prop_window_get(ewin->client.win,
|
||||
win = _EwinGetClientXwin(ewin);
|
||||
num = ecore_x_window_prop_window_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
|
||||
&win, 1);
|
||||
|
||||
ewin->client.cmap = 0;
|
||||
if (XGetWindowAttributes(disp, ewin->client.win, &xwa) && xwa.colormap)
|
||||
if (XGetWindowAttributes(disp, _EwinGetClientXwin(ewin), &xwa)
|
||||
&& xwa.colormap)
|
||||
ewin->client.cmap = xwa.colormap;
|
||||
}
|
||||
|
||||
|
@ -111,9 +112,9 @@ ICCCM_Delete(const EWin * ewin)
|
|||
}
|
||||
|
||||
if (ewin->icccm.delete_window)
|
||||
ecore_x_icccm_delete_window_send(ewin->client.win, CurrentTime);
|
||||
ecore_x_icccm_delete_window_send(_EwinGetClientXwin(ewin), CurrentTime);
|
||||
else
|
||||
XKillClient(disp, ewin->client.win);
|
||||
XKillClient(disp, _EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
||||
#if 0 /* Deprecated */
|
||||
|
@ -123,22 +124,22 @@ ICCCM_Save(const EWin * ewin)
|
|||
if (EwinIsInternal(ewin))
|
||||
return;
|
||||
|
||||
ecore_x_icccm_send_save_yourself(ewin->client.win);
|
||||
ecore_x_icccm_send_save_yourself(_EwinGetClientXwin(ewin));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ICCCM_Iconify(const EWin * ewin)
|
||||
{
|
||||
EUnmapWindow(ewin->client.win);
|
||||
ecore_x_icccm_state_set_iconic(ewin->client.win);
|
||||
EUnmapWindow(_EwinGetClientWin(ewin));
|
||||
ecore_x_icccm_state_set_iconic(_EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
ICCCM_DeIconify(const EWin * ewin)
|
||||
{
|
||||
EMapWindow(ewin->client.win);
|
||||
ecore_x_icccm_state_set_normal(ewin->client.win);
|
||||
EMapWindow(_EwinGetClientWin(ewin));
|
||||
ecore_x_icccm_state_set_normal(_EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -148,9 +149,9 @@ ICCCM_Withdraw(const EWin * ewin)
|
|||
* or changing the value to Withdrawn. Since twm/fvwm does
|
||||
* it that way, we change it to Withdrawn.
|
||||
*/
|
||||
ecore_x_icccm_state_set_withdrawn(ewin->client.win);
|
||||
ecore_x_icccm_state_set_withdrawn(_EwinGetClientXwin(ewin));
|
||||
|
||||
XRemoveFromSaveSet(disp, ewin->client.win);
|
||||
XRemoveFromSaveSet(disp, _EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -231,8 +232,8 @@ ICCCM_Configure(const EWin * ewin)
|
|||
|
||||
ev.type = ConfigureNotify;
|
||||
ev.xconfigure.display = disp;
|
||||
ev.xconfigure.event = ewin->client.win;
|
||||
ev.xconfigure.window = ewin->client.win;
|
||||
ev.xconfigure.event = _EwinGetClientXwin(ewin);
|
||||
ev.xconfigure.window = _EwinGetClientXwin(ewin);
|
||||
d = EoGetDesk(ewin);
|
||||
ev.xconfigure.x = DeskGetX(d) + ewin->client.x;
|
||||
ev.xconfigure.y = DeskGetY(d) + ewin->client.y;
|
||||
|
@ -245,13 +246,13 @@ ICCCM_Configure(const EWin * ewin)
|
|||
ev.xconfigure.border_width = 0;
|
||||
ev.xconfigure.above = EoGetWin(ewin);
|
||||
ev.xconfigure.override_redirect = False;
|
||||
XSendEvent(disp, ewin->client.win, False, StructureNotifyMask, &ev);
|
||||
XSendEvent(disp, _EwinGetClientXwin(ewin), False, StructureNotifyMask, &ev);
|
||||
}
|
||||
|
||||
void
|
||||
ICCCM_AdoptStart(const EWin * ewin)
|
||||
{
|
||||
Window win = ewin->client.win;
|
||||
Window win = _EwinGetClientXwin(ewin);
|
||||
|
||||
if (!EwinIsInternal(ewin))
|
||||
XAddToSaveSet(disp, win);
|
||||
|
@ -260,7 +261,7 @@ ICCCM_AdoptStart(const EWin * ewin)
|
|||
void
|
||||
ICCCM_Adopt(const EWin * ewin)
|
||||
{
|
||||
Window win = ewin->client.win;
|
||||
Window win = _EwinGetClientXwin(ewin);
|
||||
|
||||
if (ewin->icccm.start_iconified)
|
||||
ecore_x_icccm_state_set_iconic(win);
|
||||
|
@ -295,7 +296,7 @@ ICCCM_Cmap(EWin * ewin)
|
|||
int i, num;
|
||||
Ecore_X_Window *wlist;
|
||||
|
||||
num = ecore_x_window_prop_window_list_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_window_list_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
|
||||
&wlist);
|
||||
if (num > 0)
|
||||
|
@ -325,7 +326,7 @@ ICCCM_Focus(const EWin * ewin)
|
|||
if (EventDebug(EDBUG_TYPE_FOCUS))
|
||||
{
|
||||
if (ewin)
|
||||
Eprintf("ICCCM_Focus %#lx %s\n", ewin->client.win,
|
||||
Eprintf("ICCCM_Focus %#lx %s\n", _EwinGetClientXwin(ewin),
|
||||
EwinGetName(ewin));
|
||||
else
|
||||
Eprintf("ICCCM_Focus None\n");
|
||||
|
@ -340,12 +341,13 @@ ICCCM_Focus(const EWin * ewin)
|
|||
|
||||
if (ewin->icccm.take_focus)
|
||||
{
|
||||
ecore_x_icccm_take_focus_send(ewin->client.win, CurrentTime);
|
||||
ecore_x_icccm_take_focus_send(_EwinGetClientXwin(ewin), CurrentTime);
|
||||
}
|
||||
|
||||
XSetInputFocus(disp, ewin->client.win, RevertToPointerRoot, CurrentTime);
|
||||
XSetInputFocus(disp, _EwinGetClientXwin(ewin), RevertToPointerRoot,
|
||||
CurrentTime);
|
||||
|
||||
HintsSetActiveWindow(ewin->client.win);
|
||||
HintsSetActiveWindow(_EwinGetClientXwin(ewin));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -364,14 +366,14 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
w = ewin->client.w;
|
||||
h = ewin->client.h;
|
||||
bw = ewin->client.bw;
|
||||
EGetGeometry(ewin->client.win, &ww, &x, &y, &w, &h, &bw, &dummy);
|
||||
EGetGeometry(_EwinGetClientWin(ewin), &ww, &x, &y, &w, &h, &bw, &dummy);
|
||||
ewin->client.x = x;
|
||||
ewin->client.y = y;
|
||||
ewin->client.w = w;
|
||||
ewin->client.h = h;
|
||||
ewin->client.bw = bw;
|
||||
|
||||
if (XGetWMNormalHints(disp, ewin->client.win, &hint, &mask))
|
||||
if (XGetWMNormalHints(disp, _EwinGetClientXwin(ewin), &hint, &mask))
|
||||
{
|
||||
if (!(ewin->state.placed))
|
||||
{
|
||||
|
@ -517,11 +519,11 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap get icccm %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
ewin->client.win, ewin->client.x, ewin->client.y,
|
||||
_EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, EwinGetName(ewin));
|
||||
}
|
||||
|
||||
#define TryGroup(e) (((e)->icccm.group != None) && ((e)->icccm.group != (e)->client.win))
|
||||
#define TryGroup(e) (((e)->icccm.group != None) && ((e)->icccm.group != _EwinGetClientXwin(e)))
|
||||
|
||||
void
|
||||
ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
||||
|
@ -533,7 +535,7 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
|||
_EFREE(ewin->icccm.wm_res_name);
|
||||
_EFREE(ewin->icccm.wm_res_class);
|
||||
|
||||
if (XGetClassHint(disp, ewin->client.win, &hint) ||
|
||||
if (XGetClassHint(disp, _EwinGetClientXwin(ewin), &hint) ||
|
||||
(TryGroup(ewin) && XGetClassHint(disp, ewin->icccm.group, &hint)))
|
||||
{
|
||||
ewin->icccm.wm_res_name = Estrdup(hint.res_name);
|
||||
|
@ -550,7 +552,7 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
|||
|
||||
_EFREE(ewin->icccm.wm_command);
|
||||
|
||||
argc = ecore_x_window_prop_string_list_get(ewin->client.win,
|
||||
argc = ecore_x_window_prop_string_list_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_COMMAND,
|
||||
&argv);
|
||||
if ((argc < 0) && TryGroup(ewin))
|
||||
|
@ -568,7 +570,7 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
|||
_EFREE(ewin->icccm.wm_machine);
|
||||
|
||||
ewin->icccm.wm_machine =
|
||||
ecore_x_window_prop_string_get(ewin->client.win,
|
||||
ecore_x_window_prop_string_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_CLIENT_MACHINE);
|
||||
if (!ewin->icccm.wm_machine && TryGroup(ewin))
|
||||
ewin->icccm.wm_machine =
|
||||
|
@ -581,7 +583,7 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
|||
_EFREE(ewin->icccm.wm_icon_name);
|
||||
|
||||
ewin->icccm.wm_icon_name =
|
||||
ecore_x_window_prop_string_get(ewin->client.win,
|
||||
ecore_x_window_prop_string_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_ICON_NAME);
|
||||
if (!ewin->icccm.wm_icon_name && TryGroup(ewin))
|
||||
ewin->icccm.wm_icon_name =
|
||||
|
@ -593,7 +595,7 @@ ICCCM_GetInfo(EWin * ewin, Atom atom_change)
|
|||
{
|
||||
_EFREE(ewin->icccm.wm_role);
|
||||
ewin->icccm.wm_role =
|
||||
ecore_x_window_prop_string_get(ewin->client.win,
|
||||
ecore_x_window_prop_string_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_WINDOW_ROLE);
|
||||
}
|
||||
}
|
||||
|
@ -611,7 +613,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
|
||||
hint = NULL;
|
||||
if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_HINTS)
|
||||
hint = XGetWMHints(disp, ewin->client.win);
|
||||
hint = XGetWMHints(disp, _EwinGetClientXwin(ewin));
|
||||
if (hint)
|
||||
{
|
||||
/* I have to make sure the thing i'm docking is a dock app */
|
||||
|
@ -622,7 +624,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
WindowGroupHint))
|
||||
{
|
||||
if ((hint->icon_x == 0) && (hint->icon_y == 0)
|
||||
&& hint->window_group == ewin->client.win)
|
||||
&& hint->window_group == _EwinGetClientXwin(ewin))
|
||||
ewin->state.docked = 1;
|
||||
}
|
||||
}
|
||||
|
@ -673,7 +675,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
|
||||
if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_PROTOCOLS)
|
||||
{
|
||||
if (XGetWMProtocols(disp, ewin->client.win, &prop, &num))
|
||||
if (XGetWMProtocols(disp, _EwinGetClientXwin(ewin), &prop, &num))
|
||||
{
|
||||
ewin->icccm.take_focus = 0;
|
||||
ewin->icccm.delete_window = 0;
|
||||
|
@ -692,14 +694,14 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
{
|
||||
ewin->icccm.transient = 0;
|
||||
ewin->icccm.transient_for = None;
|
||||
if (XGetTransientForHint(disp, ewin->client.win, &win))
|
||||
if (XGetTransientForHint(disp, _EwinGetClientXwin(ewin), &win))
|
||||
{
|
||||
ewin->icccm.transient = 1;
|
||||
ewin->icccm.transient_for = win;
|
||||
}
|
||||
}
|
||||
|
||||
if (ewin->icccm.group == ewin->client.win)
|
||||
if (ewin->icccm.group == _EwinGetClientXwin(ewin))
|
||||
{
|
||||
ewin->icccm.is_group_leader = 1;
|
||||
}
|
||||
|
@ -712,7 +714,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
{
|
||||
Ecore_X_Window cleader;
|
||||
|
||||
num = ecore_x_window_prop_window_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_window_get(_EwinGetClientXwin(ewin),
|
||||
ECORE_X_ATOM_WM_CLIENT_LEADER,
|
||||
&cleader, 1);
|
||||
if (num > 0)
|
||||
|
|
34
src/ipc.c
34
src/ipc.c
|
@ -321,19 +321,20 @@ IPC_WinList(const char *params, Client * c __UNUSED__)
|
|||
switch (param1[0])
|
||||
{
|
||||
case '\0':
|
||||
IpcPrintf("%#lx : %s\n", e->client.win, SS(e->icccm.wm_name));
|
||||
IpcPrintf("%#lx : %s\n", _EwinGetClientXwin(e),
|
||||
SS(e->icccm.wm_name));
|
||||
break;
|
||||
|
||||
default:
|
||||
IpcPrintf("%#lx : %s :: %d : %d %d : %d %d %dx%d\n",
|
||||
e->client.win, SS(e->icccm.wm_name),
|
||||
_EwinGetClientXwin(e), SS(e->icccm.wm_name),
|
||||
(EoIsSticky(e)) ? -1 : EoGetDesk(e), e->area_x,
|
||||
e->area_y, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e));
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
IpcPrintf("%#10lx : %5d %5d %4dx%4d :: %2d : %d %d : %s\n",
|
||||
e->client.win, EoGetX(e), EoGetY(e), EoGetW(e),
|
||||
_EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
||||
EoGetH(e), (EoIsSticky(e)) ? -1 : EoGetDesk(e),
|
||||
e->area_x, e->area_y, SS(e->icccm.wm_name));
|
||||
break;
|
||||
|
@ -341,9 +342,10 @@ IPC_WinList(const char *params, Client * c __UNUSED__)
|
|||
case 'p':
|
||||
IpcPrintf
|
||||
("%#10lx : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" \"%s\"\n",
|
||||
e->client.win, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e),
|
||||
(EoIsSticky(e)) ? -1 : EoGetDesk(e), SS(e->icccm.wm_res_name),
|
||||
SS(e->icccm.wm_res_class), SS(e->icccm.wm_name));
|
||||
_EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
||||
EoGetH(e), (EoIsSticky(e)) ? -1 : EoGetDesk(e),
|
||||
SS(e->icccm.wm_res_name), SS(e->icccm.wm_res_class),
|
||||
SS(e->icccm.wm_name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -518,7 +520,7 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
}
|
||||
_EFREE(ewin->icccm.wm_name);
|
||||
ewin->icccm.wm_name = Estrdup(p);
|
||||
XStoreName(disp, ewin->client.win, ewin->icccm.wm_name);
|
||||
XStoreName(disp, _EwinGetClientXwin(ewin), ewin->icccm.wm_name);
|
||||
EwinBorderUpdateInfo(ewin);
|
||||
break;
|
||||
|
||||
|
@ -1011,16 +1013,18 @@ EwinShowInfo1(const EWin * ewin)
|
|||
"MWM_MENU: %5i\n"
|
||||
"MWM_MINIMIZE: %5i\n"
|
||||
"MWM_MAXIMIZE: %5i\n",
|
||||
ewin->client.win, EoGetWin(ewin), ewin->win_container,
|
||||
_EwinGetClientXwin(ewin), EoGetWin(ewin),
|
||||
_EwinGetContainerXwin(ewin),
|
||||
EoGetX(ewin), EoGetY(ewin), EoGetW(ewin), EoGetH(ewin),
|
||||
border->name,
|
||||
border->border.left, border->border.right,
|
||||
border->border.top, border->border.bottom,
|
||||
EoGetDesk(ewin),
|
||||
ewin->num_groups, ewin->state.docked, EoIsSticky(ewin),
|
||||
EoIsShown(ewin), ewin->state.iconified, ewin->state.shaded,
|
||||
ewin->state.active, EoGetLayer(ewin), ewin->props.never_use_area,
|
||||
EoIsFloating(ewin), ewin->client.w, ewin->client.h,
|
||||
ewin->num_groups, ewin->state.docked,
|
||||
EoIsSticky(ewin), EoIsShown(ewin), ewin->state.iconified,
|
||||
ewin->state.shaded, ewin->state.active, EoGetLayer(ewin),
|
||||
ewin->props.never_use_area, EoIsFloating(ewin),
|
||||
ewin->client.w, ewin->client.h,
|
||||
ewin->icccm.icon_win,
|
||||
ewin->icccm.icon_pmap, ewin->icccm.icon_mask,
|
||||
EwinGetWindowGroup(ewin),
|
||||
|
@ -1094,9 +1098,9 @@ EwinShowInfo2(const EWin * ewin)
|
|||
SS(ewin->icccm.wm_role),
|
||||
SS(ewin->icccm.wm_command),
|
||||
SS(ewin->icccm.wm_machine),
|
||||
ewin->client.win,
|
||||
_EwinGetClientXwin(ewin),
|
||||
ewin->client.x, ewin->client.y, ewin->client.w, ewin->client.h,
|
||||
ewin->win_container,
|
||||
_EwinGetContainerXwin(ewin),
|
||||
EoGetWin(ewin),
|
||||
EoGetX(ewin), EoGetY(ewin), EoGetW(ewin), EoGetH(ewin),
|
||||
#if USE_COMPOSITE
|
||||
|
@ -1237,7 +1241,7 @@ IPC_Reparent(const char *params, Client * c __UNUSED__)
|
|||
if (!ewin || !enew)
|
||||
IpcPrintf("No matching client or target EWin found\n");
|
||||
else
|
||||
EwinReparent(ewin, enew->client.win);
|
||||
EwinReparent(ewin, _EwinGetClientXwin(enew));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -602,7 +602,7 @@ MenuCreateFromAllEWins(const char *name, MenuStyle * ms)
|
|||
if (lst[i]->props.skip_winlist || !EwinGetName(lst[i]))
|
||||
continue;
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus", lst[i]->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus", _EwinGetClientXwin(lst[i]));
|
||||
mi = MenuItemCreate(EwinGetName(lst[i]), NULL, s, NULL);
|
||||
MenuAddItem(m, mi);
|
||||
}
|
||||
|
@ -630,7 +630,7 @@ MenuCreateFromDesktopEWins(char *name, Menu * parent, MenuStyle * ms, int desk)
|
|||
EoGetDesk(lst[i]) != j)
|
||||
continue;
|
||||
|
||||
Esnprintf(s, sizeof(s), "%lu", lst[i]->client.win);
|
||||
Esnprintf(s, sizeof(s), "%lu", _EwinGetClientXwin(lst[i]));
|
||||
mi = MenuItemCreate(lst[i]->client.title, NULL, s, NULL);
|
||||
MenuAddItem(m, mi);
|
||||
}
|
||||
|
@ -664,7 +664,8 @@ MenuCreateFromDesktops(const char *name, MenuStyle * ms)
|
|||
EoGetDesk(lst[i]) != j)
|
||||
continue;
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus", lst[i]->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus",
|
||||
_EwinGetClientXwin(lst[i]));
|
||||
mi = MenuItemCreate(EwinGetName(lst[i]), NULL, s, NULL);
|
||||
MenuAddItem(mm, mi);
|
||||
}
|
||||
|
@ -720,11 +721,11 @@ MenuCreateFromGroups(const char *name, MenuStyle * ms)
|
|||
mm = MenuCreate("__SUBMENUGROUP_E", NULL, m, ms);
|
||||
|
||||
Esnprintf(s, sizeof(s), "gop %li showhide",
|
||||
lst[i]->members[0]->client.win);
|
||||
_EwinGetClientXwin(lst[i]->members[0]));
|
||||
mi = MenuItemCreate(_("Show/Hide this group"), NULL, s, NULL);
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx ic",
|
||||
lst[i]->members[0]->client.win);
|
||||
_EwinGetClientXwin(lst[i]->members[0]));
|
||||
MenuAddItem(mm, mi);
|
||||
mi = MenuItemCreate(_("Iconify this group"), NULL, s, NULL);
|
||||
MenuAddItem(mm, mi);
|
||||
|
@ -732,7 +733,7 @@ MenuCreateFromGroups(const char *name, MenuStyle * ms)
|
|||
for (j = 0; j < lst[i]->num_members; j++)
|
||||
{
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus",
|
||||
lst[i]->members[j]->client.win);
|
||||
_EwinGetClientXwin(lst[i]->members[j]));
|
||||
mi = MenuItemCreate(EwinGetName(lst[i]->members[j]), NULL,
|
||||
s, NULL);
|
||||
MenuAddItem(mm, mi);
|
||||
|
|
|
@ -100,7 +100,7 @@ MWM_GetHints(EWin * ewin, Atom atom_change)
|
|||
ewin->mwm.func_close = 1;
|
||||
|
||||
puc = NULL;
|
||||
XGetWindowProperty(disp, ewin->client.win, _MOTIF_WM_HINTS, 0, 20,
|
||||
XGetWindowProperty(disp, _EwinGetClientXwin(ewin), _MOTIF_WM_HINTS, 0, 20,
|
||||
False, _MOTIF_WM_HINTS, &a2, &fmt, &num, &end, &puc);
|
||||
mwmhints = (MWMHints *) puc;
|
||||
if (!mwmhints)
|
||||
|
|
10
src/pager.c
10
src/pager.c
|
@ -875,19 +875,19 @@ PagerMenuShow(Pager * p, int x, int y)
|
|||
pw_menu =
|
||||
MenuCreate("__DESK_WIN_MENU", _("Window Options"), NULL, NULL);
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx ic", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx ic", _EwinGetClientXwin(ewin));
|
||||
mi = MenuItemCreate(_("Iconify"), NULL, s, NULL);
|
||||
MenuAddItem(pw_menu, mi);
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx close", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx close", _EwinGetClientXwin(ewin));
|
||||
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
|
||||
MenuAddItem(pw_menu, mi);
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx kill", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx kill", _EwinGetClientXwin(ewin));
|
||||
mi = MenuItemCreate(_("Annihilate"), NULL, s, NULL);
|
||||
MenuAddItem(pw_menu, mi);
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx st", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "wop %#lx st", _EwinGetClientXwin(ewin));
|
||||
mi = MenuItemCreate(_("Stick / Unstick"), NULL, s, NULL);
|
||||
MenuAddItem(pw_menu, mi);
|
||||
|
||||
|
@ -1445,7 +1445,7 @@ PagerHiwinHandleMouseUp(Pager * p, int px, int py, int button)
|
|||
else if (ewin2 && ewin2->props.vroot)
|
||||
{
|
||||
/* Dropping onto virtual root */
|
||||
EwinReparent(ewin, ewin2->client.win);
|
||||
EwinReparent(ewin, _EwinGetClientXwin(ewin2));
|
||||
}
|
||||
else if (!in_vroot)
|
||||
{
|
||||
|
|
|
@ -284,14 +284,15 @@ MatchEwinToSM(EWin * ewin)
|
|||
ewin->client.grav = NorthWestGravity;
|
||||
ewin->client.w = matches[i].w;
|
||||
ewin->client.h = matches[i].h;
|
||||
EMoveResizeWindow(disp, ewin->client.win, ewin->client.x,
|
||||
ewin->client.y, ewin->client.w,
|
||||
ewin->client.h);
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin),
|
||||
ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h);
|
||||
}
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap get sess %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
ewin->client.win, ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, EwinGetName(ewin));
|
||||
_EwinGetClientXwin(ewin), ewin->client.x,
|
||||
ewin->client.y, ewin->client.w, ewin->client.h,
|
||||
EwinGetName(ewin));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -767,7 +768,7 @@ SessionGetInfo(EWin * ewin, Atom atom_change)
|
|||
atom_change == atom_wm_client_leader)))
|
||||
return;
|
||||
|
||||
num = ecore_x_window_prop_window_get(ewin->client.win,
|
||||
num = ecore_x_window_prop_window_get(_EwinGetClientXwin(ewin),
|
||||
atom_wm_client_leader, &win, 1);
|
||||
if (num > 0)
|
||||
ewin->session_id = ecore_x_window_prop_string_get(win, atom_sm_client_id);
|
||||
|
|
|
@ -544,7 +544,7 @@ SnapshotEwinDialog(EWin * ewin)
|
|||
SnapDlgData *sd;
|
||||
char s[1024];
|
||||
|
||||
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", _EwinGetClientXwin(ewin));
|
||||
|
||||
if ((d = FindItem(s, 0, LIST_FINDBY_NAME, LIST_TYPE_DIALOG)))
|
||||
{
|
||||
|
@ -581,7 +581,7 @@ SnapshotEwinDialog(EWin * ewin)
|
|||
|
||||
sd = Ecalloc(1, sizeof(SnapDlgData));
|
||||
DialogSetData(d, sd);
|
||||
sd->client = ewin->client.win;
|
||||
sd->client = _EwinGetClientXwin(ewin);
|
||||
|
||||
sn = ewin->snap;
|
||||
if (sn)
|
||||
|
@ -1415,7 +1415,7 @@ SnapshotEwinMatch(EWin * ewin)
|
|||
ewin->client.x += ((sn->area_x - ax) * VRoot.w);
|
||||
ewin->client.y += ((sn->area_y - ay) * VRoot.h);
|
||||
}
|
||||
EMoveResizeWindow(ewin->client.win, ewin->client.x,
|
||||
EMoveResizeWindow(_EwinGetClientWin(ewin), ewin->client.x,
|
||||
ewin->client.y, ewin->client.w, ewin->client.h);
|
||||
}
|
||||
|
||||
|
@ -1468,7 +1468,7 @@ SnapshotEwinMatch(EWin * ewin)
|
|||
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap get snap %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
ewin->client.win, ewin->client.x, ewin->client.y,
|
||||
_EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||
ewin->client.w, ewin->client.h, EwinGetName(ewin));
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define ENABLE_DEBUG_STACKING 1
|
||||
|
||||
#define EobjGetCwin(p) \
|
||||
((p->type == EOBJ_TYPE_EWIN) ? EwinGetClientWin((EWin*)(p)) : None)
|
||||
((p->type == EOBJ_TYPE_EWIN) ? _EwinGetClientXwin(((EWin*)(p))) : None)
|
||||
|
||||
typedef struct _eobjlist EobjList;
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ Zoom(EWin * ewin)
|
|||
if (zoom_mask_4)
|
||||
EDestroyWindow(zoom_mask_4);
|
||||
SwitchRes(0, 0, 0, 0, 0);
|
||||
XWarpPointer(disp, None, ewin->client.win, 0, 0, 0, 0,
|
||||
XWarpPointer(disp, None, _EwinGetClientXwin(ewin), 0, 0, 0, 0,
|
||||
ewin->client.w / 2, ewin->client.h / 2);
|
||||
ESync();
|
||||
zoom_last_ewin = NULL;
|
||||
|
@ -250,15 +250,15 @@ Zoom(EWin * ewin)
|
|||
EwinMove(ewin, -ewin->border->border.left + x1,
|
||||
-ewin->border->border.top + y1);
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
XWarpPointer(disp, None, ewin->client.win, 0, 0, 0, 0,
|
||||
XWarpPointer(disp, None, _EwinGetClientXwin(ewin), 0, 0, 0, 0,
|
||||
ewin->client.w / 2, ewin->client.h / 2);
|
||||
#if 0 /* Doesn't work as intended */
|
||||
XGrabPointer(disp, ewin->client.win, True,
|
||||
XGrabPointer(disp, _EwinGetClientXwin(ewin), True,
|
||||
ButtonPressMask | ButtonReleaseMask |
|
||||
PointerMotionMask | ButtonMotionMask |
|
||||
EnterWindowMask | LeaveWindowMask,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
ewin->client.win, None, CurrentTime);
|
||||
_EwinGetClientXwin(ewin), None, CurrentTime);
|
||||
#endif
|
||||
zoom_mask_1 = ZoomMask(0, 0, x1, mode->vdisplay);
|
||||
zoom_mask_2 = ZoomMask(0, 0, mode->hdisplay, y1);
|
||||
|
|
Loading…
Reference in New Issue