Move "hiwin" stuff to hiwin.c/h. Pager tweaks when composite is enabled.
SVN revision: 15976
This commit is contained in:
parent
c6d9f2e158
commit
627a72b35f
|
@ -18,16 +18,6 @@ SRCS_ECOMPMGR = ecompmgr.c ecompmgr.h
|
||||||
endif
|
endif
|
||||||
e16_SOURCES = \
|
e16_SOURCES = \
|
||||||
E.h \
|
E.h \
|
||||||
econfig.h \
|
|
||||||
ecore-e16.h \
|
|
||||||
emodule.h \
|
|
||||||
eobj.h \
|
|
||||||
ewins.h \
|
|
||||||
ewin-ops.h \
|
|
||||||
icons.h \
|
|
||||||
snaps.h \
|
|
||||||
timestamp.h \
|
|
||||||
xwin.h \
|
|
||||||
aclass.c \
|
aclass.c \
|
||||||
actions.c \
|
actions.c \
|
||||||
alert.c \
|
alert.c \
|
||||||
|
@ -47,13 +37,19 @@ e16_SOURCES = \
|
||||||
dock.c \
|
dock.c \
|
||||||
draw.c \
|
draw.c \
|
||||||
econfig.c \
|
econfig.c \
|
||||||
|
econfig.h \
|
||||||
ecore-e16.c \
|
ecore-e16.c \
|
||||||
|
ecore-e16.h \
|
||||||
edge.c \
|
edge.c \
|
||||||
emodule.c \
|
emodule.c \
|
||||||
|
emodule.h \
|
||||||
eobj.c \
|
eobj.c \
|
||||||
|
eobj.h \
|
||||||
events.c \
|
events.c \
|
||||||
ewins.c \
|
ewins.c \
|
||||||
|
ewins.h \
|
||||||
ewin-ops.c \
|
ewin-ops.c \
|
||||||
|
ewin-ops.h \
|
||||||
extinitwin.c \
|
extinitwin.c \
|
||||||
file.c \
|
file.c \
|
||||||
finders.c \
|
finders.c \
|
||||||
|
@ -64,10 +60,13 @@ e16_SOURCES = \
|
||||||
groups.c \
|
groups.c \
|
||||||
handlers.c \
|
handlers.c \
|
||||||
hints.c \
|
hints.c \
|
||||||
|
hiwin.c \
|
||||||
|
hiwin.h \
|
||||||
icccm.c \
|
icccm.c \
|
||||||
iclass.c \
|
iclass.c \
|
||||||
iconify.c \
|
iconify.c \
|
||||||
icons.c \
|
icons.c \
|
||||||
|
icons.h \
|
||||||
ipc.c \
|
ipc.c \
|
||||||
lang.c \
|
lang.c \
|
||||||
lists.c \
|
lists.c \
|
||||||
|
@ -90,6 +89,7 @@ e16_SOURCES = \
|
||||||
size.c \
|
size.c \
|
||||||
slideout.c \
|
slideout.c \
|
||||||
snaps.c \
|
snaps.c \
|
||||||
|
snaps.h \
|
||||||
sound.c \
|
sound.c \
|
||||||
stacking.c \
|
stacking.c \
|
||||||
startup.c \
|
startup.c \
|
||||||
|
@ -97,11 +97,13 @@ e16_SOURCES = \
|
||||||
text.c \
|
text.c \
|
||||||
theme.c \
|
theme.c \
|
||||||
timers.c \
|
timers.c \
|
||||||
|
timestamp.h \
|
||||||
tooltips.c \
|
tooltips.c \
|
||||||
ttfont.c \
|
ttfont.c \
|
||||||
warp.c \
|
warp.c \
|
||||||
windowmatch.c \
|
windowmatch.c \
|
||||||
x.c \
|
x.c \
|
||||||
|
xwin.h \
|
||||||
zoom.c \
|
zoom.c \
|
||||||
$(SRCS_EWMH) $(SRCS_GNOME) \
|
$(SRCS_EWMH) $(SRCS_GNOME) \
|
||||||
$(SRCS_ECOMPMGR) \
|
$(SRCS_ECOMPMGR) \
|
||||||
|
|
|
@ -0,0 +1,417 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2000-2005 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
|
* Copyright (C) 2004-2005 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
|
||||||
|
* deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
* sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies of the Software, its documentation and marketing & publicity
|
||||||
|
* materials, and acknowledgment shall be given in the documentation, materials
|
||||||
|
* and software packages that this Software was used.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
#include "E.h"
|
||||||
|
#include "ewins.h"
|
||||||
|
#include "hiwin.h"
|
||||||
|
#include "xwin.h"
|
||||||
|
|
||||||
|
#define DEBUG_HIWIN 0
|
||||||
|
|
||||||
|
struct _hiwin
|
||||||
|
{
|
||||||
|
EObj o;
|
||||||
|
EWin *ewin;
|
||||||
|
int zoom;
|
||||||
|
int xo, yo, wo, ho;
|
||||||
|
void (*evcb) (XEvent * ev, void *data);
|
||||||
|
void *data;
|
||||||
|
char animate;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
void (*init) (Hiwin * phi, void *data);
|
||||||
|
void (*draw) (Hiwin * phi, void *data);
|
||||||
|
void (*fini) (Hiwin * phi, void *data, int shown);
|
||||||
|
} HiwinRender;
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderImageInit(Hiwin * phi, void *data)
|
||||||
|
{
|
||||||
|
EWin *ewin = data;
|
||||||
|
Imlib_Image *im;
|
||||||
|
Pixmap pmap;
|
||||||
|
|
||||||
|
pmap = EoGetPixmap(ewin);
|
||||||
|
if (pmap)
|
||||||
|
{
|
||||||
|
imlib_context_set_drawable(pmap);
|
||||||
|
im = imlib_create_image_from_drawable(0, 0, 0,
|
||||||
|
EoGetW(ewin), EoGetH(ewin), 0);
|
||||||
|
/* Skip zoom effect if composite is active */
|
||||||
|
phi->animate = 0;
|
||||||
|
}
|
||||||
|
else if (phi->zoom > 2 && EwinIsOnScreen(ewin))
|
||||||
|
{
|
||||||
|
imlib_context_set_drawable(EoGetWin(ewin));
|
||||||
|
im = imlib_create_image_from_drawable(0, 0, 0,
|
||||||
|
EoGetW(ewin), EoGetH(ewin), 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
imlib_context_set_drawable(ewin->mini_pmm.pmap);
|
||||||
|
im = imlib_create_image_from_drawable(0, 0, 0,
|
||||||
|
ewin->mini_w, ewin->mini_h, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
imlib_context_set_image(im);
|
||||||
|
imlib_context_set_drawable(EoGetWin(phi));
|
||||||
|
ESetWindowBackgroundPixmap(EoGetWin(phi), None);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderImageDraw(Hiwin * phi, void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
imlib_render_image_on_drawable_at_size(0, 0, EoGetW(phi), EoGetH(phi));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderImageFini(Hiwin * phi, void *data __UNUSED__, int shown)
|
||||||
|
{
|
||||||
|
Pixmap pmap;
|
||||||
|
|
||||||
|
if (shown)
|
||||||
|
{
|
||||||
|
pmap =
|
||||||
|
ECreatePixmap(EoGetWin(phi), EoGetW(phi), EoGetH(phi), VRoot.depth);
|
||||||
|
imlib_context_set_drawable(pmap);
|
||||||
|
imlib_render_image_on_drawable_at_size(0, 0, EoGetW(phi), EoGetH(phi));
|
||||||
|
ESetWindowBackgroundPixmap(EoGetWin(phi), pmap);
|
||||||
|
EFreePixmap(pmap);
|
||||||
|
EClearWindow(EoGetWin(phi));
|
||||||
|
}
|
||||||
|
imlib_free_image_and_decache();
|
||||||
|
}
|
||||||
|
|
||||||
|
static const HiwinRender HiwinRenderImage = {
|
||||||
|
HiwinRenderImageInit, HiwinRenderImageDraw, HiwinRenderImageFini
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderIclassInit(Hiwin * phi __UNUSED__, void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderIclassDraw(Hiwin * phi, void *data)
|
||||||
|
{
|
||||||
|
ImageclassApply(data, EoGetWin(phi), EoGetW(phi), EoGetH(phi), 0, 0,
|
||||||
|
STATE_NORMAL, 0, ST_PAGER);
|
||||||
|
EClearWindow(EoGetWin(phi));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderIclassFini(Hiwin * phi __UNUSED__, void *data __UNUSED__,
|
||||||
|
int shown __UNUSED__)
|
||||||
|
{
|
||||||
|
if (shown)
|
||||||
|
HiwinRenderIclassDraw(phi, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const HiwinRender HiwinRenderIclass = {
|
||||||
|
HiwinRenderIclassInit, HiwinRenderIclassDraw, HiwinRenderIclassFini
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GC gc;
|
||||||
|
} HiwinRenderPixmapData;
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderPixmapInit(Hiwin * phi __UNUSED__, void *data)
|
||||||
|
{
|
||||||
|
HiwinRenderPixmapData *pd = data;
|
||||||
|
|
||||||
|
pd->gc = ECreateGC(EoGetWin(phi), 0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderPixmapDraw(Hiwin * phi, void *data)
|
||||||
|
{
|
||||||
|
HiwinRenderPixmapData *pd = data;
|
||||||
|
|
||||||
|
XSetForeground(disp, pd->gc, BlackPixel(disp, VRoot.scr));
|
||||||
|
XFillRectangle(disp, EoGetWin(phi), pd->gc, 0, 0, EoGetW(phi), EoGetH(phi));
|
||||||
|
XSetForeground(disp, pd->gc, WhitePixel(disp, VRoot.scr));
|
||||||
|
XFillRectangle(disp, EoGetWin(phi), pd->gc, 1, 1, EoGetW(phi) - 2,
|
||||||
|
EoGetH(phi) - 2);
|
||||||
|
EClearWindow(EoGetWin(phi));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinRenderPixmapFini(Hiwin * phi __UNUSED__, void *data, int shown __UNUSED__)
|
||||||
|
{
|
||||||
|
HiwinRenderPixmapData *pd = data;
|
||||||
|
Pixmap pmap;
|
||||||
|
|
||||||
|
if (shown)
|
||||||
|
{
|
||||||
|
pmap =
|
||||||
|
ECreatePixmap(EoGetWin(phi), EoGetW(phi), EoGetH(phi), VRoot.depth);
|
||||||
|
XSetForeground(disp, pd->gc, BlackPixel(disp, VRoot.scr));
|
||||||
|
XFillRectangle(disp, pmap, pd->gc, 0, 0, EoGetW(phi), EoGetH(phi));
|
||||||
|
XSetForeground(disp, pd->gc, WhitePixel(disp, VRoot.scr));
|
||||||
|
XFillRectangle(disp, pmap, pd->gc, 1, 1, EoGetW(phi) - 2,
|
||||||
|
EoGetH(phi) - 2);
|
||||||
|
ESetWindowBackgroundPixmap(EoGetWin(phi), pmap);
|
||||||
|
EFreePixmap(pmap);
|
||||||
|
EClearWindow(EoGetWin(phi));
|
||||||
|
}
|
||||||
|
|
||||||
|
EFreeGC(pd->gc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const HiwinRender HiwinRenderPixmap = {
|
||||||
|
HiwinRenderPixmapInit, HiwinRenderPixmapDraw, HiwinRenderPixmapFini
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
HiwinEvent(XEvent * ev, void *prm)
|
||||||
|
{
|
||||||
|
Hiwin *phi = prm;
|
||||||
|
|
||||||
|
if (phi->evcb)
|
||||||
|
phi->evcb(ev, phi->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
Hiwin *
|
||||||
|
HiwinCreate(void)
|
||||||
|
{
|
||||||
|
Hiwin *phi;
|
||||||
|
|
||||||
|
phi = Ecalloc(1, sizeof(Hiwin));
|
||||||
|
if (!phi)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
EobjInit(EoObj(phi), EOBJ_TYPE_MISC, None, 0, 0, 3, 3, 1, "HiWin");
|
||||||
|
EoSetShadow(phi, 0);
|
||||||
|
EoSetFloating(phi, 1);
|
||||||
|
EoSetLayer(phi, 19);
|
||||||
|
EventCallbackRegister(EoGetWin(phi), 0, HiwinEvent, phi);
|
||||||
|
ESelectInput(EoGetWin(phi),
|
||||||
|
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||||
|
EnterWindowMask | LeaveWindowMask);
|
||||||
|
|
||||||
|
return phi;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinSetGeom(Hiwin * phi, int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
phi->xo = x;
|
||||||
|
phi->yo = y;
|
||||||
|
phi->wo = w;
|
||||||
|
phi->ho = h;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinInit(Hiwin * phi, EWin * ewin)
|
||||||
|
{
|
||||||
|
phi->ewin = ewin;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinSetCallback(Hiwin * phi, void (*func) (XEvent * ev, void *data),
|
||||||
|
void *data)
|
||||||
|
{
|
||||||
|
phi->evcb = func;
|
||||||
|
phi->data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinGetXY(Hiwin * phi, int *x, int *y)
|
||||||
|
{
|
||||||
|
*x = EoGetX(phi);
|
||||||
|
*y = EoGetY(phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinMove(Hiwin * phi, int x, int y)
|
||||||
|
{
|
||||||
|
EoMove(phi, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
EWin *
|
||||||
|
HiwinGetEwin(Hiwin * phi, int check)
|
||||||
|
{
|
||||||
|
EWin *ewin;
|
||||||
|
|
||||||
|
if (!phi)
|
||||||
|
return NULL;
|
||||||
|
if (!check || !phi->ewin)
|
||||||
|
return phi->ewin;
|
||||||
|
|
||||||
|
ewin = EwinFindByPtr(phi->ewin);
|
||||||
|
if (!ewin)
|
||||||
|
phi->ewin = NULL;
|
||||||
|
|
||||||
|
return ewin;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinHide(Hiwin * phi)
|
||||||
|
{
|
||||||
|
if (!phi)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (EoIsShown(phi))
|
||||||
|
{
|
||||||
|
GrabPointerRelease();
|
||||||
|
EoUnmap(phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
phi->ewin = NULL;
|
||||||
|
phi->data = NULL;
|
||||||
|
phi->evcb = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
HiwinShow(Hiwin * phi, EWin * ewin, int zoom, int confine)
|
||||||
|
{
|
||||||
|
const HiwinRender *pz;
|
||||||
|
int x, y, w, h, zold;
|
||||||
|
int xx, yy, ww, hh, i, i1, i2, step, px, py;
|
||||||
|
XID pzd[2];
|
||||||
|
void *data;
|
||||||
|
ImageClass *ic;
|
||||||
|
|
||||||
|
if (!ewin)
|
||||||
|
ewin = phi->ewin;
|
||||||
|
if (!ewin)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (ewin->mini_pmm.pmap)
|
||||||
|
{
|
||||||
|
pz = &HiwinRenderImage;
|
||||||
|
data = ewin;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ic = ImageclassFind("PAGER_WIN", 0);
|
||||||
|
if (ic)
|
||||||
|
{
|
||||||
|
pz = &HiwinRenderIclass;
|
||||||
|
data = ic;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pz = &HiwinRenderPixmap;
|
||||||
|
data = pzd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phi->zoom <= 2 && zoom == 2)
|
||||||
|
{
|
||||||
|
phi->zoom = 1;
|
||||||
|
|
||||||
|
x = phi->xo + phi->wo / 2;
|
||||||
|
y = phi->yo + phi->ho / 2;
|
||||||
|
w = zoom * phi->wo;
|
||||||
|
h = zoom * phi->ho;
|
||||||
|
|
||||||
|
step = zoom - phi->zoom;
|
||||||
|
}
|
||||||
|
else if (zoom <= 2)
|
||||||
|
{
|
||||||
|
x = phi->xo + phi->wo / 2;
|
||||||
|
y = phi->yo + phi->ho / 2;
|
||||||
|
w = zoom * phi->wo;
|
||||||
|
h = zoom * phi->ho;
|
||||||
|
step = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x = VRoot.w / 2;
|
||||||
|
y = VRoot.h / 2;
|
||||||
|
w = zoom * EoGetW(phi->ewin) / 4;
|
||||||
|
h = zoom * EoGetH(phi->ewin) / 4;
|
||||||
|
step = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG_HIWIN
|
||||||
|
Eprintf("HiwinShow %s zoom=%d->%d step=%d %d,%d %dx%d\n",
|
||||||
|
EoGetName(ewin), phi->zoom, zoom, step, x, y, w, h);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
zold = phi->zoom;
|
||||||
|
phi->zoom = zoom;
|
||||||
|
phi->animate = 1;
|
||||||
|
|
||||||
|
pz->init(phi, data);
|
||||||
|
|
||||||
|
EoMap(phi, 0);
|
||||||
|
|
||||||
|
if (step && phi->animate)
|
||||||
|
{
|
||||||
|
x = phi->xo;
|
||||||
|
y = phi->yo;
|
||||||
|
w = phi->wo;
|
||||||
|
h = phi->ho;
|
||||||
|
|
||||||
|
if (w > h)
|
||||||
|
{
|
||||||
|
i1 = w * zold;
|
||||||
|
i2 = w * zoom;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i1 = h * zold;
|
||||||
|
i2 = h * zoom;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = i1; i != i2; i += step)
|
||||||
|
{
|
||||||
|
if (w > h)
|
||||||
|
{
|
||||||
|
ww = i;
|
||||||
|
hh = (ww * h) / w;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hh = i;
|
||||||
|
ww = (hh * w) / h;
|
||||||
|
}
|
||||||
|
xx = x + ((w - ww) / 2);
|
||||||
|
yy = y + ((h - hh) / 2);
|
||||||
|
EoMoveResize(phi, xx, yy, ww, hh);
|
||||||
|
pz->draw(phi, data);
|
||||||
|
|
||||||
|
PointerAt(&px, &py);
|
||||||
|
if ((px < x) || (py < y) || (px >= (x + w)) || (py >= (y + h)))
|
||||||
|
{
|
||||||
|
pz->fini(phi, data, 0);
|
||||||
|
EoUnmap(phi);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EoMoveResize(phi, x - w / 2, y - h / 2, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
GrabPointerSet(EoGetWin(phi), ECSR_ACT_MOVE, confine);
|
||||||
|
|
||||||
|
pz->fini(phi, data, 1);
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2005 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
|
||||||
|
* deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
* sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies of the Software, its documentation and marketing & publicity
|
||||||
|
* materials, and acknowledgment shall be given in the documentation, materials
|
||||||
|
* and software packages that this Software was used.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
#ifndef _HIWIN_H_
|
||||||
|
#define _HIWIN_H_
|
||||||
|
|
||||||
|
typedef struct _hiwin Hiwin;
|
||||||
|
|
||||||
|
Hiwin *HiwinCreate(void);
|
||||||
|
void HiwinSetGeom(Hiwin * phi, int x, int y, int w, int h);
|
||||||
|
void HiwinInit(Hiwin * phi, EWin * ewin);
|
||||||
|
void HiwinSetCallback(Hiwin * phi,
|
||||||
|
void (*func) (XEvent * ev, void *data),
|
||||||
|
void *data);
|
||||||
|
void HiwinGetXY(Hiwin * phi, int *x, int *y);
|
||||||
|
void HiwinMove(Hiwin * phi, int x, int y);
|
||||||
|
EWin *HiwinGetEwin(Hiwin * phi, int check);
|
||||||
|
void HiwinShow(Hiwin * phi, EWin * ewin, int zoom, int confine);
|
||||||
|
void HiwinHide(Hiwin * phi);
|
||||||
|
|
||||||
|
#endif /* _HIWIN_H_ */
|
530
src/pager.c
530
src/pager.c
|
@ -24,6 +24,7 @@
|
||||||
#include "E.h"
|
#include "E.h"
|
||||||
#include "emodule.h"
|
#include "emodule.h"
|
||||||
#include "ewins.h"
|
#include "ewins.h"
|
||||||
|
#include "hiwin.h"
|
||||||
#include "xwin.h"
|
#include "xwin.h"
|
||||||
|
|
||||||
#define DEBUG_PAGER 0
|
#define DEBUG_PAGER 0
|
||||||
|
@ -36,7 +37,6 @@
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int zoom;
|
int zoom;
|
||||||
int zoom_old;
|
|
||||||
} Mode_pagers;
|
} Mode_pagers;
|
||||||
|
|
||||||
struct _pager
|
struct _pager
|
||||||
|
@ -59,14 +59,6 @@ struct _pager
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
EObj o;
|
|
||||||
EWin *ewin;
|
|
||||||
Pager *p;
|
|
||||||
int xo, yo, wo, ho;
|
|
||||||
} PagerHiwin;
|
|
||||||
|
|
||||||
#define PAGER_EVENT_MOUSE_OUT -1
|
#define PAGER_EVENT_MOUSE_OUT -1
|
||||||
#define PAGER_EVENT_MOTION 0
|
#define PAGER_EVENT_MOTION 0
|
||||||
#define PAGER_EVENT_MOUSE_IN 1
|
#define PAGER_EVENT_MOUSE_IN 1
|
||||||
|
@ -76,15 +68,14 @@ static void PagerScanTimeout(int val, void *data);
|
||||||
static void PagerUpdateTimeout(int val, void *data);
|
static void PagerUpdateTimeout(int val, void *data);
|
||||||
static void PagerCheckUpdate(Pager * p);
|
static void PagerCheckUpdate(Pager * p);
|
||||||
static void PagerEwinUpdateFromPager(Pager * p, EWin * ewin);
|
static void PagerEwinUpdateFromPager(Pager * p, EWin * ewin);
|
||||||
static void PagerHiwinHide(Pager * p);
|
static void PagerHiwinHide(void);
|
||||||
static EWin *PagerHiwinEwin(int check);
|
|
||||||
static void PagerEwinGroupSet(void);
|
static void PagerEwinGroupSet(void);
|
||||||
static void PagerEvent(XEvent * ev, void *prm);
|
static void PagerEvent(XEvent * ev, void *prm);
|
||||||
static void PagerHiwinEvent(XEvent * ev, void *prm);
|
static void PagerHiwinEvent(XEvent * ev, void *prm);
|
||||||
|
|
||||||
static char pager_update_pending = 0;
|
static char pager_update_pending = 0;
|
||||||
|
|
||||||
static PagerHiwin *hiwin = NULL;
|
static Hiwin *hiwin = NULL;
|
||||||
|
|
||||||
static Pager *
|
static Pager *
|
||||||
PagerCreate(void)
|
PagerCreate(void)
|
||||||
|
@ -114,7 +105,7 @@ PagerDestroy(Pager * p)
|
||||||
if (p->name)
|
if (p->name)
|
||||||
Efree(p->name);
|
Efree(p->name);
|
||||||
EDestroyWindow(p->win);
|
EDestroyWindow(p->win);
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
if (p->pmap != None)
|
if (p->pmap != None)
|
||||||
EFreePixmap(p->pmap);
|
EFreePixmap(p->pmap);
|
||||||
if (p->bgpmap != None)
|
if (p->bgpmap != None)
|
||||||
|
@ -137,7 +128,6 @@ ScaleRect(Window src, Pixmap dst, Pixmap * pdst, int sx, int sy, int sw, int sh,
|
||||||
scale * dw, scale * dh, 0, 0);
|
scale * dw, scale * dh, 0, 0);
|
||||||
imlib_context_set_image(im);
|
imlib_context_set_image(im);
|
||||||
imlib_context_set_anti_alias(1);
|
imlib_context_set_anti_alias(1);
|
||||||
imlib_context_set_drawable(dst);
|
|
||||||
if (pdst)
|
if (pdst)
|
||||||
{
|
{
|
||||||
imlib_render_pixmaps_for_whole_image_at_size(&pmap, &mask, dw, dh);
|
imlib_render_pixmaps_for_whole_image_at_size(&pmap, &mask, dw, dh);
|
||||||
|
@ -145,6 +135,7 @@ ScaleRect(Window src, Pixmap dst, Pixmap * pdst, int sx, int sy, int sw, int sh,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
imlib_context_set_drawable(dst);
|
||||||
imlib_render_image_on_drawable_at_size(dx, dy, dw, dh);
|
imlib_render_image_on_drawable_at_size(dx, dy, dw, dh);
|
||||||
}
|
}
|
||||||
imlib_free_image();
|
imlib_free_image();
|
||||||
|
@ -247,7 +238,7 @@ PagerScanTimeout(int val __UNUSED__, void *data)
|
||||||
|
|
||||||
#if 0 /* FIXME - Remove? */
|
#if 0 /* FIXME - Remove? */
|
||||||
static void
|
static void
|
||||||
PagerHiwinUpdate(PagerHiwin * phi, Pager * p __UNUSED__, EWin * ewin)
|
PagerHiwinUpdate(Hiwin * phi, Pager * p __UNUSED__, EWin * ewin)
|
||||||
{
|
{
|
||||||
Imlib_Image *im;
|
Imlib_Image *im;
|
||||||
|
|
||||||
|
@ -267,7 +258,8 @@ PagerHiwinUpdate(PagerHiwin * phi, Pager * p __UNUSED__, EWin * ewin)
|
||||||
static void
|
static void
|
||||||
PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h, use_iclass;
|
||||||
|
Drawable draw;
|
||||||
|
|
||||||
w = (EoGetW(ewin) * p->dw) / VRoot.w;
|
w = (EoGetW(ewin) * p->dw) / VRoot.w;
|
||||||
h = (EoGetH(ewin) * p->dh) / VRoot.h;
|
h = (EoGetH(ewin) * p->dh) / VRoot.h;
|
||||||
|
@ -277,30 +269,38 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
||||||
if (h < 1)
|
if (h < 1)
|
||||||
h = 1;
|
h = 1;
|
||||||
|
|
||||||
if ((ewin->mini_w != w) || (ewin->mini_h != h))
|
if ((ewin->mini_w == w) && (ewin->mini_h == h))
|
||||||
|
return;
|
||||||
|
|
||||||
|
FreePmapMask(&ewin->mini_pmm);
|
||||||
|
|
||||||
|
ewin->mini_w = w;
|
||||||
|
ewin->mini_h = h;
|
||||||
|
|
||||||
|
use_iclass = 1;
|
||||||
|
if (Conf.pagers.snap)
|
||||||
{
|
{
|
||||||
FreePmapMask(&ewin->mini_pmm);
|
draw = EoGetPixmap(ewin);
|
||||||
|
if (draw == None && EwinIsOnScreen(ewin))
|
||||||
|
draw = EoGetWin(ewin);
|
||||||
|
use_iclass = draw == None;
|
||||||
|
}
|
||||||
|
|
||||||
ewin->mini_w = w;
|
if (use_iclass)
|
||||||
ewin->mini_h = h;
|
{
|
||||||
|
ImageClass *ic = NULL;
|
||||||
|
|
||||||
if (!Conf.pagers.snap || !EwinIsOnScreen(ewin))
|
ic = ImageclassFind("PAGER_WIN", 0);
|
||||||
{
|
if (ic)
|
||||||
ImageClass *ic = NULL;
|
ImageclassApplyCopy(ic, EoGetWin(ewin), w, h, 0, 0,
|
||||||
|
STATE_NORMAL, &ewin->mini_pmm, 1, ST_UNKNWN);
|
||||||
ic = ImageclassFind("PAGER_WIN", 0);
|
}
|
||||||
if (ic)
|
else
|
||||||
ImageclassApplyCopy(ic, EoGetWin(ewin), w, h, 0, 0,
|
{
|
||||||
STATE_NORMAL, &ewin->mini_pmm, 1,
|
ewin->mini_pmm.type = 1;
|
||||||
ST_UNKNWN);
|
ewin->mini_pmm.mask = None;
|
||||||
}
|
ScaleRect(draw, None, &ewin->mini_pmm.pmap, 0, 0,
|
||||||
else
|
EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, Conf.pagers.hiq);
|
||||||
{
|
|
||||||
ewin->mini_pmm.type = 1;
|
|
||||||
ewin->mini_pmm.mask = None;
|
|
||||||
ScaleRect(EoGetWin(ewin), None, &ewin->mini_pmm.pmap, 0, 0,
|
|
||||||
EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, Conf.pagers.hiq);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* FIXME - Remove? */
|
#if 0 /* FIXME - Remove? */
|
||||||
|
@ -746,6 +746,8 @@ PagersCheckUpdate(void)
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
PagerCheckUpdate(pl[i]);
|
PagerCheckUpdate(pl[i]);
|
||||||
|
|
||||||
|
pager_update_pending = 0;
|
||||||
|
|
||||||
Efree(pl);
|
Efree(pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,8 +819,8 @@ PagersUpdateEwin(EWin * ewin, int gone)
|
||||||
if (!gone && (!EoIsShown(ewin) || ewin->state.animated))
|
if (!gone && (!EoIsShown(ewin) || ewin->state.animated))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gone && ewin == PagerHiwinEwin(0))
|
if (gone && ewin == HiwinGetEwin(hiwin, 0))
|
||||||
PagerHiwinHide(NULL);
|
PagerHiwinHide();
|
||||||
|
|
||||||
desk = (EoIsFloating(ewin)) ? DesksGetCurrent() : EoGetDesk(ewin);
|
desk = (EoIsFloating(ewin)) ? DesksGetCurrent() : EoGetDesk(ewin);
|
||||||
PagersUpdate(desk, EwinGetVX(ewin), EwinGetVY(ewin),
|
PagersUpdate(desk, EwinGetVX(ewin), EwinGetVY(ewin),
|
||||||
|
@ -900,18 +902,20 @@ PagerMenuShow(Pager * p, int x, int y)
|
||||||
mi = MenuItemCreate(_("Pager Settings..."), NULL, "pg cfg", NULL);
|
mi = MenuItemCreate(_("Pager Settings..."), NULL, "pg cfg", NULL);
|
||||||
MenuAddItem(p_menu, mi);
|
MenuAddItem(p_menu, mi);
|
||||||
|
|
||||||
mi = MenuItemCreate(_("Snapshotting On"), NULL, "pg snap on", NULL);
|
|
||||||
MenuAddItem(p_menu, mi);
|
|
||||||
|
|
||||||
mi = MenuItemCreate(_("Snapshotting Off"), NULL, "pg snap off", NULL);
|
|
||||||
MenuAddItem(p_menu, mi);
|
|
||||||
|
|
||||||
if (Conf.pagers.snap)
|
if (Conf.pagers.snap)
|
||||||
{
|
{
|
||||||
mi = MenuItemCreate(_("High Quality On"), NULL, "pg hiq on", NULL);
|
mi = MenuItemCreate(_("Snapshotting Off"), NULL, "pg snap off", NULL);
|
||||||
MenuAddItem(p_menu, mi);
|
MenuAddItem(p_menu, mi);
|
||||||
|
|
||||||
mi = MenuItemCreate(_("High Quality Off"), NULL, "pg hiq off", NULL);
|
if (Conf.pagers.hiq)
|
||||||
|
mi = MenuItemCreate(_("High Quality Off"), NULL, "pg hiq off", NULL);
|
||||||
|
else
|
||||||
|
mi = MenuItemCreate(_("High Quality On"), NULL, "pg hiq on", NULL);
|
||||||
|
MenuAddItem(p_menu, mi);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mi = MenuItemCreate(_("Snapshotting On"), NULL, "pg snap on", NULL);
|
||||||
MenuAddItem(p_menu, mi);
|
MenuAddItem(p_menu, mi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -986,66 +990,18 @@ PagerShowTt(EWin * ewin)
|
||||||
tt_ewin = ewin;
|
tt_ewin = ewin;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PagerHiwin *
|
|
||||||
PagerHiwinCreate(void)
|
|
||||||
{
|
|
||||||
PagerHiwin *phi;
|
|
||||||
|
|
||||||
phi = Ecalloc(1, sizeof(PagerHiwin));
|
|
||||||
if (!phi)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
EobjInit(EoObj(phi), EOBJ_TYPE_MISC, None, 0, 0, 3, 3, 1, "HiWin");
|
|
||||||
EoSetShadow(phi, 0);
|
|
||||||
EoSetFloating(phi, 1);
|
|
||||||
EoSetLayer(phi, 19);
|
|
||||||
EventCallbackRegister(EoGetWin(phi), 0, PagerHiwinEvent, phi);
|
|
||||||
ESelectInput(EoGetWin(phi),
|
|
||||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
|
||||||
EnterWindowMask | LeaveWindowMask);
|
|
||||||
|
|
||||||
hiwin = phi;
|
|
||||||
return phi;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerHiwinHide(Pager * p __UNUSED__)
|
PagerHiwinInit(Pager * p, EWin * ewin)
|
||||||
{
|
{
|
||||||
PagerHiwin *phi = hiwin;
|
Hiwin *phi = hiwin;
|
||||||
|
|
||||||
#if DEBUG_PAGER
|
|
||||||
Eprintf("PagerHiwinHide\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (phi)
|
|
||||||
{
|
|
||||||
if (EoIsShown(phi))
|
|
||||||
{
|
|
||||||
GrabPointerRelease();
|
|
||||||
EoUnmap(phi);
|
|
||||||
}
|
|
||||||
phi->ewin = NULL;
|
|
||||||
phi->p = NULL;
|
|
||||||
if (Mode_pagers.zoom_old <= 2)
|
|
||||||
Mode_pagers.zoom_old = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
PagerShowTt(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerHiwinShow(Pager * p, EWin * ewin)
|
|
||||||
{
|
|
||||||
PagerHiwin *phi = hiwin;
|
|
||||||
int wx, wy, ww, wh, px, py;
|
int wx, wy, ww, wh, px, py;
|
||||||
|
|
||||||
PagerHiwinHide(p);
|
|
||||||
|
|
||||||
if (!phi)
|
if (!phi)
|
||||||
{
|
{
|
||||||
phi = PagerHiwinCreate();
|
phi = HiwinCreate();
|
||||||
if (!phi)
|
if (!phi)
|
||||||
return;
|
return;
|
||||||
|
hiwin = phi;
|
||||||
}
|
}
|
||||||
|
|
||||||
wx = (EwinGetVX(ewin) * p->dw) / VRoot.w;
|
wx = (EwinGetVX(ewin) * p->dw) / VRoot.w;
|
||||||
|
@ -1053,294 +1009,44 @@ PagerHiwinShow(Pager * p, EWin * ewin)
|
||||||
ww = (EoGetW(ewin) * p->dw) / VRoot.w;
|
ww = (EoGetW(ewin) * p->dw) / VRoot.w;
|
||||||
wh = (EoGetH(ewin) * p->dh) / VRoot.h;
|
wh = (EoGetH(ewin) * p->dh) / VRoot.h;
|
||||||
ETranslateCoordinates(p->win, VRoot.win, 0, 0, &px, &py, NULL);
|
ETranslateCoordinates(p->win, VRoot.win, 0, 0, &px, &py, NULL);
|
||||||
EoMoveResize(phi, px + wx, py + wy, ww, wh);
|
|
||||||
ESetWindowBackgroundPixmap(EoGetWin(phi), ewin->mini_pmm.pmap);
|
|
||||||
EoMap(phi, 0);
|
|
||||||
GrabPointerSet(EoGetWin(phi), ECSR_ACT_MOVE, !Mode.wm.window);
|
|
||||||
phi->ewin = ewin;
|
|
||||||
phi->p = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
HiwinInit(phi, ewin);
|
||||||
{
|
HiwinSetGeom(phi, px + wx, py + wy, ww, wh);
|
||||||
void (*init) (PagerHiwin * phi, void *data);
|
HiwinSetCallback(phi, PagerHiwinEvent, p);
|
||||||
void (*draw) (PagerHiwin * phi, void *data);
|
|
||||||
void (*fini) (PagerHiwin * phi, void *data, int shown);
|
|
||||||
} PagerZoom;
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomImageInit(PagerHiwin * phi __UNUSED__, void *data)
|
|
||||||
{
|
|
||||||
EWin *ewin = data;
|
|
||||||
Imlib_Image *im;
|
|
||||||
Pixmap pmap;
|
|
||||||
|
|
||||||
pmap = (Mode_pagers.zoom > 2) ? EoGetPixmap(ewin) : None;
|
|
||||||
if (pmap)
|
|
||||||
{
|
|
||||||
imlib_context_set_drawable(pmap);
|
|
||||||
im = imlib_create_image_from_drawable(0, 0, 0,
|
|
||||||
EoGetW(ewin), EoGetH(ewin), 0);
|
|
||||||
}
|
|
||||||
else if (Mode_pagers.zoom > 2 && EwinIsOnScreen(ewin))
|
|
||||||
{
|
|
||||||
imlib_context_set_drawable(EoGetWin(ewin));
|
|
||||||
im = imlib_create_image_from_drawable(0, 0, 0,
|
|
||||||
EoGetW(ewin), EoGetH(ewin), 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
imlib_context_set_drawable(ewin->mini_pmm.pmap);
|
|
||||||
im = imlib_create_image_from_drawable(0, 0, 0,
|
|
||||||
ewin->mini_w, ewin->mini_h, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
imlib_context_set_image(im);
|
|
||||||
imlib_context_set_drawable(EoGetWin(phi));
|
|
||||||
ESetWindowBackgroundPixmap(EoGetWin(phi), None);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerZoomImageDraw(PagerHiwin * phi, void *data __UNUSED__)
|
PagerHiwinHide(void)
|
||||||
{
|
{
|
||||||
imlib_render_image_on_drawable_at_size(0, 0, EoGetW(phi), EoGetH(phi));
|
#if DEBUG_PAGER
|
||||||
|
Eprintf("PagerHiwinHide\n");
|
||||||
|
#endif
|
||||||
|
HiwinHide(hiwin);
|
||||||
|
PagerShowTt(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerZoomImageFini(PagerHiwin * phi, void *data __UNUSED__, int shown)
|
PagerHiwinShow(Pager * p, EWin * ewin, int zoom, int confine)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
Hiwin *phi = hiwin;
|
||||||
|
|
||||||
if (shown)
|
|
||||||
{
|
|
||||||
pmap =
|
|
||||||
ECreatePixmap(EoGetWin(phi), EoGetW(phi), EoGetH(phi), VRoot.depth);
|
|
||||||
imlib_context_set_drawable(pmap);
|
|
||||||
imlib_render_image_on_drawable_at_size(0, 0, EoGetW(phi), EoGetH(phi));
|
|
||||||
ESetWindowBackgroundPixmap(EoGetWin(phi), pmap);
|
|
||||||
EFreePixmap(pmap);
|
|
||||||
EClearWindow(EoGetWin(phi));
|
|
||||||
}
|
|
||||||
imlib_free_image_and_decache();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const PagerZoom PagerZoomImage = {
|
|
||||||
PagerZoomImageInit, PagerZoomImageDraw, PagerZoomImageFini
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomIclassInit(PagerHiwin * phi __UNUSED__, void *data __UNUSED__)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomIclassDraw(PagerHiwin * phi, void *data)
|
|
||||||
{
|
|
||||||
ImageclassApply(data, EoGetWin(phi), EoGetW(phi), EoGetH(phi), 0, 0,
|
|
||||||
STATE_NORMAL, 0, ST_PAGER);
|
|
||||||
EClearWindow(EoGetWin(phi));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomIclassFini(PagerHiwin * phi __UNUSED__, void *data __UNUSED__,
|
|
||||||
int shown __UNUSED__)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static const PagerZoom PagerZoomIclass = {
|
|
||||||
PagerZoomIclassInit, PagerZoomIclassDraw, PagerZoomIclassFini
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
Pixmap pmap;
|
|
||||||
GC gc;
|
|
||||||
} PagerZoomPixmapData;
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomPixmapInit(PagerHiwin * phi, void *data)
|
|
||||||
{
|
|
||||||
PagerZoomPixmapData *pd = data;
|
|
||||||
|
|
||||||
pd->pmap = ECreatePixmap(EoGetWin(phi), 2 * EoGetW(phi), 2 * EoGetH(phi),
|
|
||||||
VRoot.depth);
|
|
||||||
ESetWindowBackgroundPixmap(EoGetWin(phi), pd->pmap);
|
|
||||||
pd->gc = ECreateGC(pd->pmap, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomPixmapDraw(PagerHiwin * phi, void *data)
|
|
||||||
{
|
|
||||||
PagerZoomPixmapData *pd = data;
|
|
||||||
|
|
||||||
XSetForeground(disp, pd->gc, BlackPixel(disp, VRoot.scr));
|
|
||||||
XFillRectangle(disp, pd->pmap, pd->gc, 0, 0, EoGetW(phi), EoGetH(phi));
|
|
||||||
XSetForeground(disp, pd->gc, WhitePixel(disp, VRoot.scr));
|
|
||||||
XFillRectangle(disp, pd->pmap, pd->gc, 1, 1, EoGetW(phi) - 2,
|
|
||||||
EoGetH(phi) - 2);
|
|
||||||
EClearWindow(EoGetWin(phi));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerZoomPixmapFini(PagerHiwin * phi __UNUSED__, void *data,
|
|
||||||
int shown __UNUSED__)
|
|
||||||
{
|
|
||||||
PagerZoomPixmapData *pd = data;
|
|
||||||
|
|
||||||
PagerZoomPixmapDraw(phi, data);
|
|
||||||
|
|
||||||
EFreePixmap(pd->pmap);
|
|
||||||
EFreeGC(pd->gc);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const PagerZoom PagerZoomPixmap = {
|
|
||||||
PagerZoomPixmapInit, PagerZoomPixmapDraw, PagerZoomPixmapFini
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
|
||||||
PagerHiwinZoom(Pager * p, EWin * ewin)
|
|
||||||
{
|
|
||||||
ImageClass *ic;
|
|
||||||
PagerHiwin *phi = hiwin;
|
|
||||||
const PagerZoom *pz;
|
|
||||||
int x, y, w, h;
|
|
||||||
int xx, yy, ww, hh, i, i1, i2, step, px, py, z0;
|
|
||||||
XID pzd[2];
|
|
||||||
void *data;
|
|
||||||
|
|
||||||
if (MenusActive()) /* Don't show HiWin when menu is up */
|
if (MenusActive()) /* Don't show HiWin when menu is up */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!phi)
|
if (!phi || ewin)
|
||||||
{
|
{
|
||||||
phi = PagerHiwinCreate();
|
PagerHiwinInit(p, ewin);
|
||||||
|
phi = hiwin;
|
||||||
if (!phi)
|
if (!phi)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
phi->ewin = ewin;
|
HiwinShow(phi, ewin, zoom, confine);
|
||||||
phi->p = p;
|
|
||||||
|
|
||||||
if (ewin->mini_pmm.pmap)
|
|
||||||
{
|
|
||||||
pz = &PagerZoomImage;
|
|
||||||
data = ewin;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ic = ImageclassFind("PAGER_WIN", 0);
|
|
||||||
if (ic)
|
|
||||||
{
|
|
||||||
pz = &PagerZoomIclass;
|
|
||||||
data = ic;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pz = &PagerZoomPixmap;
|
|
||||||
data = pzd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
z0 = Mode_pagers.zoom_old;
|
|
||||||
if (z0 <= 1)
|
|
||||||
{
|
|
||||||
Window cw;
|
|
||||||
|
|
||||||
z0 = 1;
|
|
||||||
Mode_pagers.zoom_old = z0 = 1;
|
|
||||||
Mode_pagers.zoom = 2;
|
|
||||||
|
|
||||||
x = (EwinGetVX(ewin) * p->dw) / VRoot.w;
|
|
||||||
y = (EwinGetVY(ewin) * p->dh) / VRoot.h;
|
|
||||||
w = (EoGetW(ewin) * p->dw) / VRoot.w;
|
|
||||||
h = (EoGetH(ewin) * p->dh) / VRoot.h;
|
|
||||||
ETranslateCoordinates(p->win, VRoot.win, x, y, &px, &py, &cw);
|
|
||||||
|
|
||||||
phi->xo = x = px;
|
|
||||||
phi->yo = y = py;
|
|
||||||
phi->wo = w;
|
|
||||||
phi->ho = h;
|
|
||||||
EoMoveResize(phi, x, y, w, h);
|
|
||||||
step = Mode_pagers.zoom - Mode_pagers.zoom_old;
|
|
||||||
}
|
|
||||||
else if (Mode_pagers.zoom <= 2)
|
|
||||||
{
|
|
||||||
w = Mode_pagers.zoom * phi->wo;
|
|
||||||
h = Mode_pagers.zoom * phi->ho;
|
|
||||||
x = phi->xo + phi->wo / 2;
|
|
||||||
y = phi->yo + phi->ho / 2;
|
|
||||||
step = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
w = Mode_pagers.zoom * EoGetW(phi->ewin) / 4;
|
|
||||||
h = Mode_pagers.zoom * EoGetH(phi->ewin) / 4;
|
|
||||||
x = VRoot.w / 2;
|
|
||||||
y = VRoot.h / 2;
|
|
||||||
step = 0;
|
|
||||||
}
|
|
||||||
#if DEBUG_PAGER
|
|
||||||
Eprintf("Zoom %d->%d\n", Mode_pagers.zoom_old, Mode_pagers.zoom);
|
|
||||||
#endif
|
|
||||||
Mode_pagers.zoom_old = Mode_pagers.zoom;
|
|
||||||
|
|
||||||
pz->init(phi, data);
|
|
||||||
|
|
||||||
EoMap(phi, 0);
|
|
||||||
GrabPointerSet(EoGetWin(phi), ECSR_ACT_MOVE, 0);
|
|
||||||
|
|
||||||
if (step)
|
|
||||||
{
|
|
||||||
if (w > h)
|
|
||||||
{
|
|
||||||
i1 = w * z0;
|
|
||||||
i2 = w * Mode_pagers.zoom;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i1 = h * z0;
|
|
||||||
i2 = h * Mode_pagers.zoom;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = i1; i != i2; i += step)
|
|
||||||
{
|
|
||||||
if (w > h)
|
|
||||||
{
|
|
||||||
ww = i;
|
|
||||||
hh = (ww * h) / w;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hh = i;
|
|
||||||
ww = (hh * w) / h;
|
|
||||||
}
|
|
||||||
xx = x + ((w - ww) / 2);
|
|
||||||
yy = y + ((h - hh) / 2);
|
|
||||||
EoMoveResize(phi, xx, yy, ww, hh);
|
|
||||||
pz->draw(phi, data);
|
|
||||||
|
|
||||||
PointerAt(&px, &py);
|
|
||||||
if ((px < x) || (py < y) || (px >= (x + w)) || (py >= (y + h)))
|
|
||||||
{
|
|
||||||
pz->fini(phi, data, 0);
|
|
||||||
EoUnmap(phi);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
EoMoveResize(phi, x - w / 2, y - h / 2, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
pz->fini(phi, data, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerZoomChange(int delta)
|
PagerZoomChange(Pager * p, int delta)
|
||||||
{
|
{
|
||||||
PagerHiwin *phi = hiwin;
|
|
||||||
|
|
||||||
#if DEBUG_PAGER
|
#if DEBUG_PAGER
|
||||||
Eprintf("PagerZoomChange delta=%d\n", delta);
|
Eprintf("PagerZoomChange delta=%d\n", delta);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1360,25 +1066,7 @@ PagerZoomChange(int delta)
|
||||||
return;
|
return;
|
||||||
Mode_pagers.zoom--;
|
Mode_pagers.zoom--;
|
||||||
}
|
}
|
||||||
PagerHiwinZoom(phi->p, phi->ewin);
|
PagerHiwinShow(p, NULL, Mode_pagers.zoom, 0);
|
||||||
}
|
|
||||||
|
|
||||||
static EWin *
|
|
||||||
PagerHiwinEwin(int check)
|
|
||||||
{
|
|
||||||
EWin *ewin;
|
|
||||||
PagerHiwin *phi = hiwin;
|
|
||||||
|
|
||||||
if (!phi)
|
|
||||||
return NULL;
|
|
||||||
if (!check || !phi->ewin)
|
|
||||||
return phi->ewin;
|
|
||||||
|
|
||||||
ewin = EwinFindByPtr(phi->ewin);
|
|
||||||
if (!ewin)
|
|
||||||
phi->ewin = NULL;
|
|
||||||
|
|
||||||
return ewin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1410,7 +1098,7 @@ PagerHandleMotion(Pager * p, int x, int y, int in)
|
||||||
|
|
||||||
if (ewin == NULL)
|
if (ewin == NULL)
|
||||||
{
|
{
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1420,13 +1108,15 @@ PagerHandleMotion(Pager * p, int x, int y, int in)
|
||||||
}
|
}
|
||||||
else if ((in == PAGER_EVENT_MOTION) && EoGetLayer(ewin) <= 0)
|
else if ((in == PAGER_EVENT_MOTION) && EoGetLayer(ewin) <= 0)
|
||||||
{
|
{
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
PagerShowTt(ewin);
|
PagerShowTt(ewin);
|
||||||
}
|
}
|
||||||
else if ((in == PAGER_EVENT_MOTION) && (!hiwin || ewin != hiwin->ewin))
|
else if ((in == PAGER_EVENT_MOTION)
|
||||||
|
&& (!hiwin || ewin != HiwinGetEwin(hiwin, 0)))
|
||||||
{
|
{
|
||||||
PagerHiwinHide(p);
|
if (Mode_pagers.zoom < 2)
|
||||||
PagerHiwinZoom(p, ewin);
|
Mode_pagers.zoom = 2;
|
||||||
|
PagerHiwinShow(p, ewin, Mode_pagers.zoom, 0);
|
||||||
PagerShowTt(ewin);
|
PagerShowTt(ewin);
|
||||||
}
|
}
|
||||||
else if (in == PAGER_EVENT_MOTION)
|
else if (in == PAGER_EVENT_MOTION)
|
||||||
|
@ -1466,10 +1156,7 @@ PagersUpdateBackground(int desk)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
pl[i]->do_newbg = 1;
|
||||||
PagerHiwinHide(pl[i]);
|
|
||||||
pl[i]->do_newbg = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Efree(pl);
|
Efree(pl);
|
||||||
|
|
||||||
|
@ -1545,7 +1232,7 @@ PagerEwinGroupSet(void)
|
||||||
int i, num;
|
int i, num;
|
||||||
EWin *ewin, **gwins;
|
EWin *ewin, **gwins;
|
||||||
|
|
||||||
ewin = PagerHiwinEwin(0);
|
ewin = HiwinGetEwin(hiwin, 0);
|
||||||
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE,
|
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE,
|
||||||
Mode.nogroup, &num);
|
Mode.nogroup, &num);
|
||||||
if (!gwins)
|
if (!gwins)
|
||||||
|
@ -1571,9 +1258,9 @@ PagerEwinGroupUnset(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerEventUnmap(Pager * p)
|
PagerEventUnmap(Pager * p __UNUSED__)
|
||||||
{
|
{
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1607,31 +1294,31 @@ EwinGroupMove(EWin * ewin, int desk, int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerEwinMove(Pager * p __UNUSED__, Pager * pd)
|
PagerEwinMove(Pager * p __UNUSED__, Pager * pd, EWin * ewin)
|
||||||
{
|
{
|
||||||
int x, y, dx, dy, px, py;
|
int x, y, dx, dy, px, py;
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
PagerHiwin *phi = hiwin;
|
Hiwin *phi = hiwin;
|
||||||
|
|
||||||
DeskGetArea(pd->desktop, &cx, &cy);
|
|
||||||
|
|
||||||
/* Delta in pager coords */
|
/* Delta in pager coords */
|
||||||
dx = Mode.x - Mode.px;
|
dx = Mode.x - Mode.px;
|
||||||
dy = Mode.y - Mode.py;
|
dy = Mode.y - Mode.py;
|
||||||
|
|
||||||
if (dx || dy)
|
if (dx == 0 && dy == 0)
|
||||||
{
|
return;
|
||||||
/* Move mini window */
|
|
||||||
EoMove(phi, EoGetX(phi) + dx, EoGetY(phi) + dy);
|
/* Move mini window */
|
||||||
}
|
HiwinGetXY(phi, &x, &y);
|
||||||
|
HiwinMove(phi, x + dx, y + dy);
|
||||||
|
|
||||||
/* Find real window position */
|
/* Find real window position */
|
||||||
ETranslateCoordinates(EoGetWin(phi), pd->win, 0, 0, &px, &py, NULL);
|
ETranslateCoordinates(VRoot.win, pd->win, x, y, &px, &py, NULL);
|
||||||
|
DeskGetArea(pd->desktop, &cx, &cy);
|
||||||
x = (px * VRoot.w) / pd->dw - cx * VRoot.w;
|
x = (px * VRoot.w) / pd->dw - cx * VRoot.w;
|
||||||
y = (py * VRoot.h) / pd->dh - cy * VRoot.h;
|
y = (py * VRoot.h) / pd->dh - cy * VRoot.h;
|
||||||
|
|
||||||
/* Move all group members */
|
/* Move all group members */
|
||||||
EwinGroupMove(phi->ewin, pd->desktop, x, y);
|
EwinGroupMove(ewin, pd->desktop, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1646,7 +1333,7 @@ PagerHandleMouseDown(Pager * p, int px, int py, int button)
|
||||||
|
|
||||||
if (button == Conf.pagers.menu_button)
|
if (button == Conf.pagers.menu_button)
|
||||||
{
|
{
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
PagerMenuShow(p, px, py);
|
PagerMenuShow(p, px, py);
|
||||||
}
|
}
|
||||||
else if (button == Conf.pagers.win_button)
|
else if (button == Conf.pagers.win_button)
|
||||||
|
@ -1654,7 +1341,7 @@ PagerHandleMouseDown(Pager * p, int px, int py, int button)
|
||||||
ewin = EwinInPagerAt(p, px, py);
|
ewin = EwinInPagerAt(p, px, py);
|
||||||
if ((ewin) && (ewin->type != EWIN_TYPE_PAGER))
|
if ((ewin) && (ewin->type != EWIN_TYPE_PAGER))
|
||||||
{
|
{
|
||||||
PagerHiwinShow(p, ewin);
|
PagerHiwinShow(p, ewin, 1, !Mode.wm.window);
|
||||||
Mode.mode = MODE_PAGER_DRAG_PENDING;
|
Mode.mode = MODE_PAGER_DRAG_PENDING;
|
||||||
PagerEwinGroupSet();
|
PagerEwinGroupSet();
|
||||||
}
|
}
|
||||||
|
@ -1713,13 +1400,14 @@ PagerHiwinHandleMouseUp(Pager * p, int px, int py, int button)
|
||||||
{
|
{
|
||||||
if (Mode.mode == MODE_PAGER_DRAG_PENDING)
|
if (Mode.mode == MODE_PAGER_DRAG_PENDING)
|
||||||
Mode.mode = MODE_NONE;
|
Mode.mode = MODE_NONE;
|
||||||
|
PagerHiwinHide();
|
||||||
PagerHandleMouseUp(p, px, py, button);
|
PagerHandleMouseUp(p, px, py, button);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mode.mode = MODE_NONE;
|
Mode.mode = MODE_NONE;
|
||||||
|
|
||||||
ewin = PagerHiwinEwin(1);
|
ewin = HiwinGetEwin(hiwin, 1);
|
||||||
if (!ewin)
|
if (!ewin)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -1734,7 +1422,7 @@ PagerHiwinHandleMouseUp(Pager * p, int px, int py, int button)
|
||||||
ewin2 = GetEwinPointerInClient();
|
ewin2 = GetEwinPointerInClient();
|
||||||
if ((ewin2) && (ewin2->type == EWIN_TYPE_PAGER))
|
if ((ewin2) && (ewin2->type == EWIN_TYPE_PAGER))
|
||||||
{
|
{
|
||||||
PagerEwinMove(p, ewin2->data);
|
PagerEwinMove(p, ewin2->data, ewin);
|
||||||
}
|
}
|
||||||
else if ((ewin2) && (ewin2->type == EWIN_TYPE_ICONBOX))
|
else if ((ewin2) && (ewin2->type == EWIN_TYPE_ICONBOX))
|
||||||
{
|
{
|
||||||
|
@ -1774,7 +1462,7 @@ PagerHiwinHandleMouseUp(Pager * p, int px, int py, int button)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PagerHiwinHide(p);
|
PagerHiwinHide();
|
||||||
|
|
||||||
done:
|
done:
|
||||||
/* unallocate the space that was holding the old positions of the */
|
/* unallocate the space that was holding the old positions of the */
|
||||||
|
@ -1835,8 +1523,7 @@ PagerEvent(XEvent * ev, void *prm)
|
||||||
static void
|
static void
|
||||||
PagerHiwinEvent(XEvent * ev, void *prm)
|
PagerHiwinEvent(XEvent * ev, void *prm)
|
||||||
{
|
{
|
||||||
PagerHiwin *phi = (PagerHiwin *) prm;
|
Pager *p = prm;
|
||||||
Pager *p = phi->p;
|
|
||||||
int px, py;
|
int px, py;
|
||||||
EWin *ewin;
|
EWin *ewin;
|
||||||
|
|
||||||
|
@ -1855,12 +1542,12 @@ PagerHiwinEvent(XEvent * ev, void *prm)
|
||||||
case 4:
|
case 4:
|
||||||
if (Mode.mode != MODE_NONE)
|
if (Mode.mode != MODE_NONE)
|
||||||
break;
|
break;
|
||||||
PagerZoomChange(1);
|
PagerZoomChange(p, 1);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (Mode.mode != MODE_NONE)
|
if (Mode.mode != MODE_NONE)
|
||||||
break;
|
break;
|
||||||
PagerZoomChange(-1);
|
PagerZoomChange(p, -1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Translate x,y to pager window coordinates */
|
/* Translate x,y to pager window coordinates */
|
||||||
|
@ -1898,7 +1585,7 @@ PagerHiwinEvent(XEvent * ev, void *prm)
|
||||||
|
|
||||||
case MODE_PAGER_DRAG_PENDING:
|
case MODE_PAGER_DRAG_PENDING:
|
||||||
case MODE_PAGER_DRAG:
|
case MODE_PAGER_DRAG:
|
||||||
ewin = PagerHiwinEwin(1);
|
ewin = HiwinGetEwin(hiwin, 1);
|
||||||
if (!ewin || ewin->type == EWIN_TYPE_PAGER)
|
if (!ewin || ewin->type == EWIN_TYPE_PAGER)
|
||||||
{
|
{
|
||||||
Mode.mode = MODE_NONE;
|
Mode.mode = MODE_NONE;
|
||||||
|
@ -1906,7 +1593,7 @@ PagerHiwinEvent(XEvent * ev, void *prm)
|
||||||
}
|
}
|
||||||
|
|
||||||
Mode.mode = MODE_PAGER_DRAG;
|
Mode.mode = MODE_PAGER_DRAG;
|
||||||
PagerEwinMove(p, p);
|
PagerEwinMove(p, p, ewin);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2316,15 +2003,14 @@ PagersSighan(int sig, void *prm)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESIGNAL_IDLE:
|
case ESIGNAL_IDLE:
|
||||||
if (!Conf.pagers.snap)
|
PagersCheckUpdate();
|
||||||
PagersCheckUpdate();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESIGNAL_AREA_CONFIGURED:
|
case ESIGNAL_AREA_CONFIGURED:
|
||||||
PagersReconfigure();
|
PagersReconfigure();
|
||||||
break;
|
break;
|
||||||
case ESIGNAL_AREA_SWITCH_START:
|
case ESIGNAL_AREA_SWITCH_START:
|
||||||
PagerHiwinHide(NULL);
|
PagerHiwinHide();
|
||||||
break;
|
break;
|
||||||
case ESIGNAL_AREA_SWITCH_DONE:
|
case ESIGNAL_AREA_SWITCH_DONE:
|
||||||
PagersUpdate(DesksGetCurrent(), 0, 0, 99999, 99999);
|
PagersUpdate(DesksGetCurrent(), 0, 0, 99999, 99999);
|
||||||
|
@ -2338,7 +2024,7 @@ PagersSighan(int sig, void *prm)
|
||||||
PagersDisableForDesktop((long)(prm));
|
PagersDisableForDesktop((long)(prm));
|
||||||
break;
|
break;
|
||||||
case ESIGNAL_DESK_SWITCH_START:
|
case ESIGNAL_DESK_SWITCH_START:
|
||||||
PagerHiwinHide(NULL);
|
PagerHiwinHide();
|
||||||
break;
|
break;
|
||||||
case ESIGNAL_DESK_SWITCH_DONE:
|
case ESIGNAL_DESK_SWITCH_DONE:
|
||||||
UpdatePagerSel();
|
UpdatePagerSel();
|
||||||
|
|
Loading…
Reference in New Issue