Wrap XID and some other X types.
Mostly to change longs to ints to reduce memory footprint a bit on 64 bit systems.
This commit is contained in:
parent
c74b331998
commit
4d1bde02ae
28
src/E.h
28
src/E.h
|
@ -3,7 +3,7 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -210,7 +210,7 @@ typedef struct {
|
||||||
char show_icons;
|
char show_icons;
|
||||||
int icon_size;
|
int icon_size;
|
||||||
struct {
|
struct {
|
||||||
KeySym left, right, up, down, escape, ret;
|
EX_KeySym left, right, up, down, escape, ret;
|
||||||
} key;
|
} key;
|
||||||
} menus;
|
} menus;
|
||||||
struct {
|
struct {
|
||||||
|
@ -345,18 +345,18 @@ typedef struct {
|
||||||
char xinerama_active;
|
char xinerama_active;
|
||||||
#endif
|
#endif
|
||||||
#if USE_XSYNC
|
#if USE_XSYNC
|
||||||
XID server_time;
|
EX_ID server_time;
|
||||||
#endif
|
#endif
|
||||||
} display;
|
} display;
|
||||||
struct {
|
struct {
|
||||||
unsigned int time_ms; /* Local ms time */
|
unsigned int time_ms; /* Local ms time */
|
||||||
Time time; /* Latest X event time */
|
EX_Time time; /* Latest X event time */
|
||||||
int cx, cy; /* Any detected pointer movement */
|
int cx, cy; /* Any detected pointer movement */
|
||||||
int mx, my; /* Motion event */
|
int mx, my; /* Motion event */
|
||||||
int px, py; /* Previous motion event */
|
int px, py; /* Previous motion event */
|
||||||
Time last_btime;
|
EX_Time last_btime;
|
||||||
Window last_bpress;
|
EX_Window last_bpress;
|
||||||
Window last_bpress2;
|
EX_Window last_bpress2;
|
||||||
unsigned int last_button;
|
unsigned int last_button;
|
||||||
unsigned int last_keycode;
|
unsigned int last_keycode;
|
||||||
unsigned int last_keystate;
|
unsigned int last_keystate;
|
||||||
|
@ -373,7 +373,7 @@ typedef struct {
|
||||||
} events;
|
} events;
|
||||||
struct {
|
struct {
|
||||||
char pointer_grab_active;
|
char pointer_grab_active;
|
||||||
Window pointer_grab_window;
|
EX_Window pointer_grab_window;
|
||||||
} grabs;
|
} grabs;
|
||||||
struct {
|
struct {
|
||||||
const char *lang;
|
const char *lang;
|
||||||
|
@ -403,7 +403,7 @@ typedef struct {
|
||||||
unsigned int extensions;
|
unsigned int extensions;
|
||||||
} server;
|
} server;
|
||||||
struct {
|
struct {
|
||||||
Pixmap ext_pmap;
|
EX_Pixmap ext_pmap;
|
||||||
char ext_pmap_valid;
|
char ext_pmap_valid;
|
||||||
} root;
|
} root;
|
||||||
struct {
|
struct {
|
||||||
|
@ -438,12 +438,12 @@ typedef struct {
|
||||||
EWin *focuswin;
|
EWin *focuswin;
|
||||||
EWin *mouse_over_ewin;
|
EWin *mouse_over_ewin;
|
||||||
EWin *context_ewin;
|
EWin *context_ewin;
|
||||||
Colormap current_cmap;
|
EX_Colormap current_cmap;
|
||||||
Win context_win;
|
Win context_win;
|
||||||
char constrained;
|
char constrained;
|
||||||
char nogroup;
|
char nogroup;
|
||||||
char showing_desktop;
|
char showing_desktop;
|
||||||
Window button_proxy_win;
|
EX_Window button_proxy_win;
|
||||||
char firsttime;
|
char firsttime;
|
||||||
char debug_exit;
|
char debug_exit;
|
||||||
} EMode;
|
} EMode;
|
||||||
|
@ -520,9 +520,9 @@ void EdgeWindowsShow(void);
|
||||||
void EdgeWindowsHide(void);
|
void EdgeWindowsHide(void);
|
||||||
|
|
||||||
/* extinitwin.c */
|
/* extinitwin.c */
|
||||||
Window ExtInitWinCreate(void);
|
EX_Window ExtInitWinCreate(void);
|
||||||
void ExtInitWinSet(Window win);
|
void ExtInitWinSet(EX_Window win);
|
||||||
Window ExtInitWinGet(void);
|
EX_Window ExtInitWinGet(void);
|
||||||
void ExtInitWinKill(void);
|
void ExtInitWinKill(void);
|
||||||
|
|
||||||
/* fonts.c */
|
/* fonts.c */
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct _action {
|
||||||
char anybutton;
|
char anybutton;
|
||||||
int button;
|
int button;
|
||||||
char anykey;
|
char anykey;
|
||||||
KeyCode keycode;
|
EX_KeyCode keycode;
|
||||||
char *key_str;
|
char *key_str;
|
||||||
char *tooltipstring;
|
char *tooltipstring;
|
||||||
ActionType *action;
|
ActionType *action;
|
||||||
|
@ -989,7 +989,7 @@ handleAction(EWin * ewin, ActionType * action)
|
||||||
int
|
int
|
||||||
ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
|
ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
|
||||||
{
|
{
|
||||||
KeyCode keycode;
|
EX_KeyCode keycode;
|
||||||
int i, type, button, modifiers, ok, mouse, mask, val = 0;
|
int i, type, button, modifiers, ok, mouse, mask, val = 0;
|
||||||
Action *aa;
|
Action *aa;
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ AnimatorAdd(EObj * eo, animation_category category, AnimCbFunc * func,
|
||||||
if (!an)
|
if (!an)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
|
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
|
||||||
current_frame_num, skip_to_frame_num, EOW(eo), an, category);
|
current_frame_num, skip_to_frame_num, EOW(eo), an, category);
|
||||||
|
|
||||||
if (!Mode_anim.timer)
|
if (!Mode_anim.timer)
|
||||||
|
@ -203,7 +203,7 @@ AnimatorSetDoneFunc(Animator * an, AnimDoneFunc * done)
|
||||||
static void
|
static void
|
||||||
_AnimatorDel(Animator * an)
|
_AnimatorDel(Animator * an)
|
||||||
{
|
{
|
||||||
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
|
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
|
||||||
current_frame_num, skip_to_frame_num, EOW(an->eo), an, an->category);
|
current_frame_num, skip_to_frame_num, EOW(an->eo), an, an->category);
|
||||||
Efree(an);
|
Efree(an);
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
|
||||||
|
|
||||||
for (first = 1, pprev = head, an = *head; an; an = next)
|
for (first = 1, pprev = head, an = *head; an; an = next)
|
||||||
{
|
{
|
||||||
D3printf("%s: %#lx %p\n", __func__, EOW(an->eo), an);
|
D3printf("%s: %#x %p\n", __func__, EOW(an->eo), an);
|
||||||
next = an->next;
|
next = an->next;
|
||||||
|
|
||||||
if (an->cancelled)
|
if (an->cancelled)
|
||||||
|
@ -255,7 +255,7 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
|
||||||
/* Start when other non-forever animations have run */
|
/* Start when other non-forever animations have run */
|
||||||
if (!first)
|
if (!first)
|
||||||
goto do_next;
|
goto do_next;
|
||||||
Dprintf("%s: %#lx %p C%d: De-serialize\n", __func__, EOW(an->eo),
|
Dprintf("%s: %#x %p C%d: De-serialize\n", __func__, EOW(an->eo),
|
||||||
an, an->category);
|
an, an->category);
|
||||||
an->next_frame = frame_num;
|
an->next_frame = frame_num;
|
||||||
an->start_frame = an->next_frame;
|
an->start_frame = an->next_frame;
|
||||||
|
@ -312,14 +312,14 @@ _AnimatorsRun(Animator ** head, unsigned int frame_num, unsigned int next_frame)
|
||||||
{
|
{
|
||||||
if (an->duration > 0 && remaining <= 0)
|
if (an->duration > 0 && remaining <= 0)
|
||||||
{
|
{
|
||||||
Dprintf("%s: %#lx %p C%d: autocancelling\n", __func__,
|
Dprintf("%s: %#x %p C%d: autocancelling\n", __func__,
|
||||||
EOW(an->eo), an, an->category);
|
EOW(an->eo), an, an->category);
|
||||||
res = ANIM_RET_CANCEL_ANIM;
|
res = ANIM_RET_CANCEL_ANIM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dprintf("%s: %#lx %p C%d: self cancelling\n", __func__,
|
Dprintf("%s: %#x %p C%d: self cancelling\n", __func__,
|
||||||
EOW(an->eo), an, an->category);
|
EOW(an->eo), an, an->category);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ AnimatorDel(EObj * eo, Animator * anx)
|
||||||
{
|
{
|
||||||
if (an != anx)
|
if (an != anx)
|
||||||
continue;
|
continue;
|
||||||
Dprintf("%s: %u/%u: %#lx %p C%d\n", __func__,
|
Dprintf("%s: %u/%u: %#x %p C%d\n", __func__,
|
||||||
current_frame_num, skip_to_frame_num, EOW(an->eo), an,
|
current_frame_num, skip_to_frame_num, EOW(an->eo), an,
|
||||||
an->category);
|
an->category);
|
||||||
an->cancelled = 1;
|
an->cancelled = 1;
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef struct {
|
||||||
struct _background {
|
struct _background {
|
||||||
dlist_t list;
|
dlist_t list;
|
||||||
char *name;
|
char *name;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
time_t last_viewed;
|
time_t last_viewed;
|
||||||
unsigned int bg_solid;
|
unsigned int bg_solid;
|
||||||
char bg_tile;
|
char bg_tile;
|
||||||
|
@ -180,10 +180,10 @@ BackgroundGetUniqueString(Background * bg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BackgroundPixmapSet(Background * bg, Pixmap pmap)
|
BackgroundPixmapSet(Background * bg, EX_Pixmap pmap)
|
||||||
{
|
{
|
||||||
if (bg->pmap != NoXID && bg->pmap != pmap)
|
if (bg->pmap != NoXID && bg->pmap != pmap)
|
||||||
Eprintf("*** BackgroundPixmapSet %s: pmap was set %#lx/%#lx\n",
|
Eprintf("*** BackgroundPixmapSet %s: pmap was set %#x/%#x\n",
|
||||||
bg->name, bg->pmap, pmap);
|
bg->name, bg->pmap, pmap);
|
||||||
bg->pmap = pmap;
|
bg->pmap = pmap;
|
||||||
}
|
}
|
||||||
|
@ -529,10 +529,10 @@ BgFindImageSize(BgPart * bgp, unsigned int rw, unsigned int rh,
|
||||||
*ph = (unsigned int)h;
|
*ph = (unsigned int)h;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Pixmap
|
static EX_Pixmap
|
||||||
BackgroundCreatePixmap(Win win, unsigned int w, unsigned int h)
|
BackgroundCreatePixmap(Win win, unsigned int w, unsigned int h)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stupid hack to avoid that a new root pixmap has the same ID as the now
|
* Stupid hack to avoid that a new root pixmap has the same ID as the now
|
||||||
|
@ -550,11 +550,11 @@ BackgroundCreatePixmap(Win win, unsigned int w, unsigned int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BackgroundRealize(Background * bg, Win win, Drawable draw, unsigned int rw,
|
BackgroundRealize(Background * bg, Win win, EX_Drawable draw,
|
||||||
unsigned int rh, int is_win, Pixmap * ppmap,
|
unsigned int rw, unsigned int rh, int is_win,
|
||||||
unsigned int *ppixel)
|
EX_Pixmap * ppmap, unsigned int *ppixel)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
int x, y, ww, hh;
|
int x, y, ww, hh;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
char *file, hasbg, hasfg;
|
char *file, hasbg, hasfg;
|
||||||
|
@ -680,7 +680,7 @@ BackgroundRealize(Background * bg, Win win, Drawable draw, unsigned int rw,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BackgroundApplyPmap(Background * bg, Win win, Drawable draw,
|
BackgroundApplyPmap(Background * bg, Win win, EX_Drawable draw,
|
||||||
unsigned int w, unsigned int h)
|
unsigned int w, unsigned int h)
|
||||||
{
|
{
|
||||||
BackgroundRealize(bg, win, draw, w, h, 0, NULL, NULL);
|
BackgroundRealize(bg, win, draw, w, h, 0, NULL, NULL);
|
||||||
|
@ -690,7 +690,7 @@ static void
|
||||||
BackgroundApplyWin(Background * bg, Win win)
|
BackgroundApplyWin(Background * bg, Win win)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
unsigned int pixel;
|
unsigned int pixel;
|
||||||
|
|
||||||
if (!EGetGeometry(win, NULL, NULL, NULL, &w, &h, NULL, NULL))
|
if (!EGetGeometry(win, NULL, NULL, NULL, &w, &h, NULL, NULL))
|
||||||
|
@ -716,7 +716,7 @@ BackgroundApplyWin(Background * bg, Win win)
|
||||||
void
|
void
|
||||||
BackgroundSet(Background * bg, Win win, unsigned int w, unsigned int h)
|
BackgroundSet(Background * bg, Win win, unsigned int w, unsigned int h)
|
||||||
{
|
{
|
||||||
Pixmap pmap = NoXID;
|
EX_Pixmap pmap = NoXID;
|
||||||
unsigned int pixel = 0;
|
unsigned int pixel = 0;
|
||||||
|
|
||||||
if (bg->pmap)
|
if (bg->pmap)
|
||||||
|
@ -893,7 +893,7 @@ BackgroundGetFgFile(const Background * bg)
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_DIALOGS */
|
#endif /* ENABLE_DIALOGS */
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
BackgroundGetPixmap(const Background * bg)
|
BackgroundGetPixmap(const Background * bg)
|
||||||
{
|
{
|
||||||
return (bg) ? bg->pmap : NoXID;
|
return (bg) ? bg->pmap : NoXID;
|
||||||
|
@ -917,7 +917,7 @@ BackgroundCacheMini(Background * bg, int keep, int nuke)
|
||||||
{
|
{
|
||||||
char s[4096];
|
char s[4096];
|
||||||
EImage *im;
|
EImage *im;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
int mini_w = Mode.backgrounds.mini_w;
|
int mini_w = Mode.backgrounds.mini_w;
|
||||||
int mini_h = Mode.backgrounds.mini_h;
|
int mini_h = Mode.backgrounds.mini_h;
|
||||||
|
|
||||||
|
@ -1452,7 +1452,7 @@ CB_DesktopMiniDisplayRedraw(Dialog * d __UNUSED__, int val __UNUSED__,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
Background *bg;
|
Background *bg;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
int w, h;
|
int w, h;
|
||||||
DItem *di = (DItem *) data;
|
DItem *di = (DItem *) data;
|
||||||
Win win;
|
Win win;
|
||||||
|
@ -1621,7 +1621,7 @@ BG_RedrawView(void)
|
||||||
Background *bg;
|
Background *bg;
|
||||||
int x, w, h, num;
|
int x, w, h, num;
|
||||||
Win win;
|
Win win;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
ImageClass *ic;
|
ImageClass *ic;
|
||||||
int mini_w = Mode.backgrounds.mini_w;
|
int mini_w = Mode.backgrounds.mini_w;
|
||||||
int mini_h = Mode.backgrounds.mini_h;
|
int mini_h = Mode.backgrounds.mini_h;
|
||||||
|
@ -2395,7 +2395,7 @@ BackgroundsIpc(const char *params)
|
||||||
}
|
}
|
||||||
else if (!strncmp(cmd, "apply", 2))
|
else if (!strncmp(cmd, "apply", 2))
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Win win;
|
Win win;
|
||||||
|
|
||||||
bg = BackgroundFind(prm);
|
bg = BackgroundFind(prm);
|
||||||
|
@ -2403,7 +2403,7 @@ BackgroundsIpc(const char *params)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xwin = NoXID;
|
xwin = NoXID;
|
||||||
sscanf(p, "%lx", &xwin);
|
sscanf(p, "%x", &xwin);
|
||||||
|
|
||||||
win = ECreateWinFromXwin(xwin);
|
win = ECreateWinFromXwin(xwin);
|
||||||
if (!win)
|
if (!win)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2012 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -28,14 +28,15 @@
|
||||||
Background *BackgroundFind(const char *name);
|
Background *BackgroundFind(const char *name);
|
||||||
|
|
||||||
char *BackgroundGetUniqueString(Background * bg);
|
char *BackgroundGetUniqueString(Background * bg);
|
||||||
void BackgroundPixmapSet(Background * bg, Pixmap pmap);
|
void BackgroundPixmapSet(Background * bg, EX_Pixmap pmap);
|
||||||
void BackgroundDestroyByName(const char *name);
|
void BackgroundDestroyByName(const char *name);
|
||||||
void BackgroundRealize(Background * bg, Win win, Drawable draw,
|
void BackgroundRealize(Background * bg, Win win,
|
||||||
unsigned int rw, unsigned int rh,
|
EX_Drawable draw, unsigned int rw,
|
||||||
int is_win, Pixmap * ppmap,
|
unsigned int rh, int is_win,
|
||||||
unsigned int *ppixel);
|
EX_Pixmap * ppmap, unsigned int *ppixel);
|
||||||
void BackgroundApplyPmap(Background * bg, Win win, Drawable draw,
|
void BackgroundApplyPmap(Background * bg, Win win,
|
||||||
unsigned int rw, unsigned int rh);
|
EX_Drawable draw, unsigned int rw,
|
||||||
|
unsigned int rh);
|
||||||
void BackgroundSet(Background * bg, Win win, unsigned int rw,
|
void BackgroundSet(Background * bg, Win win, unsigned int rw,
|
||||||
unsigned int rh);
|
unsigned int rh);
|
||||||
void BackgroundIncRefcount(Background * bg);
|
void BackgroundIncRefcount(Background * bg);
|
||||||
|
@ -43,7 +44,7 @@ void BackgroundDecRefcount(Background * bg);
|
||||||
|
|
||||||
void BackgroundTouch(Background * bg);
|
void BackgroundTouch(Background * bg);
|
||||||
const char *BackgroundGetName(const Background * bg);
|
const char *BackgroundGetName(const Background * bg);
|
||||||
Pixmap BackgroundGetPixmap(const Background * bg);
|
EX_Pixmap BackgroundGetPixmap(const Background * bg);
|
||||||
unsigned int BackgroundGetSeqNo(const Background * bg);
|
unsigned int BackgroundGetSeqNo(const Background * bg);
|
||||||
int BackgroundIsNone(const Background * bg);
|
int BackgroundIsNone(const Background * bg);
|
||||||
Background *BrackgroundCreateFromImage(const char *bgid,
|
Background *BrackgroundCreateFromImage(const char *bgid,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -128,7 +128,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
|
||||||
im = EwinIconImageGet(ewin, 16, Conf.warplist.icon_mode);
|
im = EwinIconImageGet(ewin, 16, Conf.warplist.icon_mode);
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
EImageBorder *pad;
|
EImageBorder *pad;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
|
|
||||||
|
@ -597,10 +597,10 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Window *wl;
|
EX_Window *wl;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
wl = EMALLOC(Window, b->num_winparts + 1);
|
wl = EMALLOC(EX_Window, b->num_winparts + 1);
|
||||||
if (!wl)
|
if (!wl)
|
||||||
return;
|
return;
|
||||||
for (i = b->num_winparts - 1; i >= 0; i--)
|
for (i = b->num_winparts - 1; i >= 0; i--)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -70,8 +70,8 @@ struct _button {
|
||||||
void *cb_prm;
|
void *cb_prm;
|
||||||
|
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
Window inside_win;
|
EX_Window inside_win;
|
||||||
Window event_win;
|
EX_Window event_win;
|
||||||
#endif
|
#endif
|
||||||
unsigned int ref_count;
|
unsigned int ref_count;
|
||||||
};
|
};
|
||||||
|
@ -387,7 +387,7 @@ ButtonDoShowDefault(const Button * b)
|
||||||
|
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
int
|
int
|
||||||
ButtonEmbedWindow(Button * b, Window WindowToEmbed)
|
ButtonEmbedWindow(Button * b, EX_Window WindowToEmbed)
|
||||||
{
|
{
|
||||||
|
|
||||||
int w, h;
|
int w, h;
|
||||||
|
@ -495,7 +495,7 @@ ButtonEventMouseDown(Button * b, XEvent * ev)
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
if (b->inside_win)
|
if (b->inside_win)
|
||||||
{
|
{
|
||||||
Window win = ev->xbutton.window;
|
EX_Window win = ev->xbutton.window;
|
||||||
|
|
||||||
ev->xbutton.window = b->inside_win;
|
ev->xbutton.window = b->inside_win;
|
||||||
EXSendEvent(b->inside_win, ButtonPressMask, ev);
|
EXSendEvent(b->inside_win, ButtonPressMask, ev);
|
||||||
|
@ -525,7 +525,7 @@ ButtonEventMouseUp(Button * b, XEvent * ev)
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
if (b->inside_win && !Mode_buttons.action_inhibit)
|
if (b->inside_win && !Mode_buttons.action_inhibit)
|
||||||
{
|
{
|
||||||
Window win = ev->xbutton.window;
|
EX_Window win = ev->xbutton.window;
|
||||||
|
|
||||||
ev->xbutton.window = b->inside_win;
|
ev->xbutton.window = b->inside_win;
|
||||||
EXSendEvent(b->inside_win, ButtonReleaseMask, ev);
|
EXSendEvent(b->inside_win, ButtonReleaseMask, ev);
|
||||||
|
@ -1044,7 +1044,7 @@ ButtonsIpc(const char *params)
|
||||||
{
|
{
|
||||||
IpcPrintf("Win d s l x y w h name\n");
|
IpcPrintf("Win d s l x y w h name\n");
|
||||||
LIST_FOR_EACH(Button, &button_list, b)
|
LIST_FOR_EACH(Button, &button_list, b)
|
||||||
IpcPrintf("%#lx %2d %2d %2d %5d+%5d %5dx%5d %s\n",
|
IpcPrintf("%#x %2d %2d %2d %5d+%5d %5dx%5d %s\n",
|
||||||
EoGetXwin(b), EoGetDeskNum(b), EoIsSticky(b),
|
EoGetXwin(b), EoGetDeskNum(b), EoIsSticky(b),
|
||||||
EoGetLayer(b), EoGetX(b), EoGetY(b), EoGetW(b), EoGetH(b),
|
EoGetLayer(b), EoGetX(b), EoGetY(b), EoGetW(b), EoGetH(b),
|
||||||
EoGetName(b));
|
EoGetName(b));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -49,7 +49,7 @@ void ButtonSetCallback(Button * b,
|
||||||
ButtonCbFunc * func, void *prm);
|
ButtonCbFunc * func, void *prm);
|
||||||
int ButtonDoShowDefault(const Button * b);
|
int ButtonDoShowDefault(const Button * b);
|
||||||
int ButtonEmbedWindow(Button * ButtonToUse,
|
int ButtonEmbedWindow(Button * ButtonToUse,
|
||||||
Window WindowToEmbed);
|
EX_Window WindowToEmbed);
|
||||||
|
|
||||||
void ButtonsForeach(int id, Desk * dsk,
|
void ButtonsForeach(int id, Desk * dsk,
|
||||||
void (*func) (Button * b));
|
void (*func) (Button * b));
|
||||||
|
|
23
src/comms.c
23
src/comms.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
dlist_t list;
|
dlist_t list;
|
||||||
char *name;
|
char *name;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
char *msg;
|
char *msg;
|
||||||
char *clientname;
|
char *clientname;
|
||||||
char *version;
|
char *version;
|
||||||
|
@ -47,7 +47,7 @@ static LIST_HEAD(client_list);
|
||||||
static Win comms_win = NULL;
|
static Win comms_win = NULL;
|
||||||
|
|
||||||
static Client *
|
static Client *
|
||||||
ClientCreate(Window xwin)
|
ClientCreate(EX_Window xwin)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
char st[32];
|
char st[32];
|
||||||
|
@ -134,13 +134,14 @@ ClientConfigure(Client * c, const char *str)
|
||||||
static int
|
static int
|
||||||
ClientMatchWindow(const void *data, const void *match)
|
ClientMatchWindow(const void *data, const void *match)
|
||||||
{
|
{
|
||||||
return ((const Client *)data)->xwin != (Window) match;
|
return ((const Client *)data)->xwin != (EX_Window) (long)match;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Client *
|
static Client *
|
||||||
ClientFind(Window xwin)
|
ClientFind(EX_Window xwin)
|
||||||
{
|
{
|
||||||
return LIST_FIND(Client, &client_list, ClientMatchWindow, (void *)xwin);
|
return LIST_FIND(Client, &client_list, ClientMatchWindow,
|
||||||
|
(void *)(long)xwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -148,7 +149,7 @@ ClientCommsGet(Client ** c, XClientMessageEvent * ev)
|
||||||
{
|
{
|
||||||
char s[13], s2[9], *msg;
|
char s[13], s2[9], *msg;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Client *cl;
|
Client *cl;
|
||||||
|
|
||||||
if ((!ev) || (!c))
|
if ((!ev) || (!c))
|
||||||
|
@ -163,7 +164,7 @@ ClientCommsGet(Client ** c, XClientMessageEvent * ev)
|
||||||
for (i = 0; i < 12; i++)
|
for (i = 0; i < 12; i++)
|
||||||
s[i] = ev->data.b[i + 8];
|
s[i] = ev->data.b[i + 8];
|
||||||
xwin = NoXID;
|
xwin = NoXID;
|
||||||
sscanf(s2, "%lx", &xwin);
|
sscanf(s2, "%x", &xwin);
|
||||||
if (xwin == NoXID)
|
if (xwin == NoXID)
|
||||||
return NULL;
|
return NULL;
|
||||||
cl = ClientFind(xwin);
|
cl = ClientFind(xwin);
|
||||||
|
@ -296,13 +297,13 @@ CommsInit(void)
|
||||||
EventCallbackRegister(comms_win, ClientHandleCommsEvents, NULL);
|
EventCallbackRegister(comms_win, ClientHandleCommsEvents, NULL);
|
||||||
EventCallbackRegister(VROOT, ClientHandleRootEvents, NULL);
|
EventCallbackRegister(VROOT, ClientHandleRootEvents, NULL);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "WINID %8lx", WinGetXwin(comms_win));
|
Esnprintf(s, sizeof(s), "WINID %8x", WinGetXwin(comms_win));
|
||||||
ex_window_prop_string_set(WinGetXwin(comms_win), E16_ATOM_COMMS_WIN, s);
|
ex_window_prop_string_set(WinGetXwin(comms_win), E16_ATOM_COMMS_WIN, s);
|
||||||
ex_window_prop_string_set(WinGetXwin(VROOT), E16_ATOM_COMMS_WIN, s);
|
ex_window_prop_string_set(WinGetXwin(VROOT), E16_ATOM_COMMS_WIN, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CommsDoSend(Window win, const char *s)
|
CommsDoSend(EX_Window win, const char *s)
|
||||||
{
|
{
|
||||||
char ss[21];
|
char ss[21];
|
||||||
int i, j, k, len;
|
int i, j, k, len;
|
||||||
|
@ -320,7 +321,7 @@ CommsDoSend(Window win, const char *s)
|
||||||
ev.xclient.format = 8;
|
ev.xclient.format = 8;
|
||||||
for (i = 0; i < len + 1; i += 12)
|
for (i = 0; i < len + 1; i += 12)
|
||||||
{
|
{
|
||||||
Esnprintf(ss, sizeof(ss), "%8lx", WinGetXwin(comms_win));
|
Esnprintf(ss, sizeof(ss), "%8x", WinGetXwin(comms_win));
|
||||||
for (j = 0; j < 12; j++)
|
for (j = 0; j < 12; j++)
|
||||||
{
|
{
|
||||||
ss[8 + j] = s[i + j];
|
ss[8 + j] = s[i + j];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -1183,7 +1183,7 @@ ContainerShowMenu(Container * ct)
|
||||||
mi = MenuItemCreate(_("Settings..."), NULL, s, NULL);
|
mi = MenuItemCreate(_("Settings..."), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx cl", WinGetXwin(ct->win));
|
Esnprintf(s, sizeof(s), "wop %#x cl", WinGetXwin(ct->win));
|
||||||
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
struct _ecursor {
|
struct _ecursor {
|
||||||
dlist_t list;
|
dlist_t list;
|
||||||
char *name;
|
char *name;
|
||||||
Cursor cursor;
|
EX_Cursor cursor;
|
||||||
unsigned int ref_count;
|
unsigned int ref_count;
|
||||||
char *file;
|
char *file;
|
||||||
unsigned int bg;
|
unsigned int bg;
|
||||||
|
@ -47,13 +47,14 @@ static LIST_HEAD(cursor_list);
|
||||||
|
|
||||||
#if USE_XRENDER
|
#if USE_XRENDER
|
||||||
/* Assuming we have XRenderCreateCursor (render >= 0.5) */
|
/* Assuming we have XRenderCreateCursor (render >= 0.5) */
|
||||||
static Cursor
|
static EX_Cursor
|
||||||
ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask, unsigned int w, unsigned int h,
|
ECreatePixmapCursor(EX_Pixmap cpmap, EX_Pixmap cmask, unsigned int w,
|
||||||
int xh, int yh, unsigned int fg, unsigned int bg)
|
unsigned int h, int xh, int yh, unsigned int fg,
|
||||||
|
unsigned int bg)
|
||||||
{
|
{
|
||||||
Cursor curs;
|
EX_Cursor curs;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
XRenderColor c;
|
XRenderColor c;
|
||||||
|
@ -87,12 +88,12 @@ ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask, unsigned int w, unsigned int h,
|
||||||
return curs;
|
return curs;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static Cursor
|
static EX_Cursor
|
||||||
ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask,
|
ECreatePixmapCursor(EX_Pixmap cpmap, EX_Pixmap cmask,
|
||||||
unsigned int w __UNUSED__, unsigned int h __UNUSED__,
|
unsigned int w __UNUSED__, unsigned int h __UNUSED__,
|
||||||
int xh, int yh, unsigned int fg, unsigned int bg)
|
int xh, int yh, unsigned int fg, unsigned int bg)
|
||||||
{
|
{
|
||||||
Cursor curs;
|
EX_Cursor curs;
|
||||||
XColor fgxc, bgxc;
|
XColor fgxc, bgxc;
|
||||||
|
|
||||||
COLOR32_TO_RGB16(fg, fgxc.red, fgxc.green, fgxc.blue);
|
COLOR32_TO_RGB16(fg, fgxc.red, fgxc.green, fgxc.blue);
|
||||||
|
@ -337,7 +338,7 @@ ECursorApply(ECursor * ec, Win win)
|
||||||
XDefineCursor(disp, WinGetXwin(win), ec->cursor);
|
XDefineCursor(disp, WinGetXwin(win), ec->cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Cursor
|
static EX_Cursor
|
||||||
ECursorGetByName(const char *name, const char *name2, unsigned int fallback)
|
ECursorGetByName(const char *name, const char *name2, unsigned int fallback)
|
||||||
{
|
{
|
||||||
ECursor *ec;
|
ECursor *ec;
|
||||||
|
@ -371,11 +372,11 @@ static const ECDataRec ECData[ECSR_COUNT] = {
|
||||||
{"RESIZE_BR", "RESIZE_TL", XC_bottom_right_corner},
|
{"RESIZE_BR", "RESIZE_TL", XC_bottom_right_corner},
|
||||||
};
|
};
|
||||||
|
|
||||||
static Cursor ECsrs[ECSR_COUNT] = {
|
static EX_Cursor ECsrs[ECSR_COUNT] = {
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||||
};
|
};
|
||||||
|
|
||||||
Cursor
|
EX_Cursor
|
||||||
ECsrGet(int which)
|
ECsrGet(int which)
|
||||||
{
|
{
|
||||||
if (which < 0 || which >= ECSR_COUNT)
|
if (which < 0 || which >= ECSR_COUNT)
|
||||||
|
@ -388,7 +389,7 @@ ECsrGet(int which)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ECsrApply(int which, Window win)
|
ECsrApply(int which, EX_Window win)
|
||||||
{
|
{
|
||||||
XDefineCursor(disp, win, ECsrGet(which));
|
XDefineCursor(disp, win, ECsrGet(which));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2006-2009 Kim Woelders
|
* Copyright (C) 2006-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -43,8 +43,8 @@
|
||||||
ECursor *ECursorAlloc(const char *name);
|
ECursor *ECursorAlloc(const char *name);
|
||||||
void ECursorFree(ECursor * ec);
|
void ECursorFree(ECursor * ec);
|
||||||
void ECursorApply(ECursor * ec, Win win);
|
void ECursorApply(ECursor * ec, Win win);
|
||||||
Cursor ECsrGet(int which);
|
EX_Cursor ECsrGet(int which);
|
||||||
void ECsrApply(int which, Window win);
|
void ECsrApply(int which, EX_Window win);
|
||||||
|
|
||||||
int ECursorConfigLoad(FILE * fs);
|
int ECursorConfigLoad(FILE * fs);
|
||||||
|
|
||||||
|
|
|
@ -487,7 +487,7 @@ DeskGetBackgroundObj(const Desk * dsk)
|
||||||
return (dsk) ? dsk->bg.o : NULL;
|
return (dsk) ? dsk->bg.o : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
DeskGetBackgroundPixmap(const Desk * dsk)
|
DeskGetBackgroundPixmap(const Desk * dsk)
|
||||||
{
|
{
|
||||||
if (!dsk)
|
if (!dsk)
|
||||||
|
@ -505,12 +505,12 @@ static void
|
||||||
DeskBackgroundConfigure(Desk * dsk)
|
DeskBackgroundConfigure(Desk * dsk)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
Pixmap pmap = dsk->bg.pmap;
|
EX_Pixmap pmap = dsk->bg.pmap;
|
||||||
unsigned int pixel = dsk->bg.pixel;
|
unsigned int pixel = dsk->bg.pixel;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_DESKS))
|
if (EDebug(EDBUG_TYPE_DESKS))
|
||||||
Eprintf
|
Eprintf
|
||||||
("DeskBackgroundConfigure %d v=%d %#lx/%#lx: ext=%d pmap=%#lx/%#lx pixel=%#x/%#x\n",
|
("DeskBackgroundConfigure %d v=%d %#x/%#x: ext=%d pmap=%#x/%#x pixel=%#x/%#x\n",
|
||||||
dsk->num, dsk->viewable, EoGetXwin(dsk), EobjGetXwin(dsk->bg.o),
|
dsk->num, dsk->viewable, EoGetXwin(dsk), EobjGetXwin(dsk->bg.o),
|
||||||
BackgroundIsNone(dsk->bg.bg), pmap, dsk->bg.pmap_set, pixel,
|
BackgroundIsNone(dsk->bg.bg), pmap, dsk->bg.pmap_set, pixel,
|
||||||
dsk->bg.pixel);
|
dsk->bg.pixel);
|
||||||
|
@ -576,13 +576,13 @@ static void
|
||||||
DeskBackgroundRefresh(Desk * dsk, int why)
|
DeskBackgroundRefresh(Desk * dsk, int why)
|
||||||
{
|
{
|
||||||
Background *bg = dsk->bg.bg;
|
Background *bg = dsk->bg.bg;
|
||||||
Pixmap pmap = dsk->bg.pmap;
|
EX_Pixmap pmap = dsk->bg.pmap;
|
||||||
unsigned int pixel = dsk->bg.pixel;
|
unsigned int pixel = dsk->bg.pixel;
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
int reconfigure = 0;
|
int reconfigure = 0;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_DESKS))
|
if (EDebug(EDBUG_TYPE_DESKS))
|
||||||
Eprintf("DeskBackgroundRefresh %d v=%d why=%d pmap=%#lx pixel=%#x\n",
|
Eprintf("DeskBackgroundRefresh %d v=%d why=%d pmap=%#x pixel=%#x\n",
|
||||||
dsk->num, dsk->viewable, why, pmap, pixel);
|
dsk->num, dsk->viewable, why, pmap, pixel);
|
||||||
|
|
||||||
switch (why)
|
switch (why)
|
||||||
|
@ -1422,7 +1422,7 @@ DeskRestackSimple(Desk * dsk)
|
||||||
eo->stacked = 1;
|
eo->stacked = 1;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_STACKING))
|
if (EDebug(EDBUG_TYPE_STACKING))
|
||||||
Eprintf("DeskRestackSimple %#lx %s\n", EobjGetXwin(eo), EobjGetName(eo));
|
Eprintf("DeskRestackSimple %#x %s\n", EobjGetXwin(eo), EobjGetName(eo));
|
||||||
|
|
||||||
if (i < num - 1)
|
if (i < num - 1)
|
||||||
{
|
{
|
||||||
|
@ -1436,20 +1436,20 @@ DeskRestackSimple(Desk * dsk)
|
||||||
}
|
}
|
||||||
value_mask = CWSibling | CWStackMode;
|
value_mask = CWSibling | CWStackMode;
|
||||||
if (EDebug(EDBUG_TYPE_STACKING))
|
if (EDebug(EDBUG_TYPE_STACKING))
|
||||||
Eprintf("DeskRestackSimple %#10lx %s %#10lx\n", EobjGetXwin(eo),
|
Eprintf("DeskRestackSimple %#10x %s %#10lx\n", EobjGetXwin(eo),
|
||||||
(xwc.stack_mode == Above) ? "Above" : "Below", xwc.sibling);
|
(xwc.stack_mode == Above) ? "Above" : "Below", xwc.sibling);
|
||||||
XConfigureWindow(disp, EobjGetXwin(eo), value_mask, &xwc);
|
XConfigureWindow(disp, EobjGetXwin(eo), value_mask, &xwc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _APPEND_TO_WIN_LIST(win) \
|
#define _APPEND_TO_WIN_LIST(win) \
|
||||||
{ \
|
{ \
|
||||||
wl = EREALLOC(Window, wl, ++tot); \
|
wl = EREALLOC(EX_Window, wl, ++tot); \
|
||||||
wl[tot - 1] = win; \
|
wl[tot - 1] = win; \
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
DeskRestack(Desk * dsk)
|
DeskRestack(Desk * dsk)
|
||||||
{
|
{
|
||||||
Window *wl;
|
EX_Window *wl;
|
||||||
int i, num, tot;
|
int i, num, tot;
|
||||||
EObj *const *lst, *eo;
|
EObj *const *lst, *eo;
|
||||||
|
|
||||||
|
@ -1480,7 +1480,7 @@ DeskRestack(Desk * dsk)
|
||||||
{
|
{
|
||||||
Eprintf("DeskRestack %d (%d):\n", dsk->num, dsk->stack.dirty);
|
Eprintf("DeskRestack %d (%d):\n", dsk->num, dsk->stack.dirty);
|
||||||
for (i = 0; i < tot; i++)
|
for (i = 0; i < tot; i++)
|
||||||
Eprintf(" win=%#10lx parent=%#10lx\n", wl[i],
|
Eprintf(" win=%#10x parent=%#10x\n", wl[i],
|
||||||
EXWindowGetParent(wl[i]));
|
EXWindowGetParent(wl[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2054,14 +2054,14 @@ DeskGetAclass(void *data __UNUSED__)
|
||||||
static void
|
static void
|
||||||
DeskPropertyChange(Desk * dsk, XEvent * ev)
|
DeskPropertyChange(Desk * dsk, XEvent * ev)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
if (ev->xproperty.atom == E_XROOTPMAP_ID)
|
if (ev->xproperty.atom == E_XROOTPMAP_ID)
|
||||||
{
|
{
|
||||||
/* Possible race here? */
|
/* Possible race here? */
|
||||||
pmap = HintsGetRootPixmap(EoGetWin(dsk));
|
pmap = HintsGetRootPixmap(EoGetWin(dsk));
|
||||||
if (EDebug(EDBUG_TYPE_DESKS))
|
if (EDebug(EDBUG_TYPE_DESKS))
|
||||||
Eprintf("DeskPropertyChange win=%#lx _XROOTPMAP_ID=%#lx\n",
|
Eprintf("DeskPropertyChange win=%#lx _XROOTPMAP_ID=%#x\n",
|
||||||
ev->xany.window, pmap);
|
ev->xany.window, pmap);
|
||||||
if (ev->xany.window != WinGetXwin(VROOT))
|
if (ev->xany.window != WinGetXwin(VROOT))
|
||||||
return;
|
return;
|
||||||
|
@ -2415,7 +2415,7 @@ CB_DesktopDisplayRedraw(Dialog * d, int val, void *data)
|
||||||
bg = DeskBackgroundGet(DeskGet(i));
|
bg = DeskBackgroundGet(DeskGet(i));
|
||||||
if (bg)
|
if (bg)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
pmap = EGetWindowBackgroundPixmap(dd->wins[i]);
|
pmap = EGetWindowBackgroundPixmap(dd->wins[i]);
|
||||||
BackgroundApplyPmap(bg, dd->wins[i], pmap,
|
BackgroundApplyPmap(bg, dd->wins[i], pmap,
|
||||||
|
@ -2636,7 +2636,7 @@ CB_AreaDisplayRedraw(Dialog * d, int val, void *data)
|
||||||
if (val == 1)
|
if (val == 1)
|
||||||
{
|
{
|
||||||
ImageClass *ic;
|
ImageClass *ic;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
ic = ImageclassFind("SETTINGS_AREA_AREA", 1);
|
ic = ImageclassFind("SETTINGS_AREA_AREA", 1);
|
||||||
ImageclassApply(ic, win, 0, 0, STATE_NORMAL, ST_SOLID);
|
ImageclassApply(ic, win, 0, 0, STATE_NORMAL, ST_SOLID);
|
||||||
|
@ -2841,7 +2841,7 @@ DesksIpcDesk(const char *params)
|
||||||
{
|
{
|
||||||
dsk = _DeskGet(desk);
|
dsk = _DeskGet(desk);
|
||||||
IpcPrintf
|
IpcPrintf
|
||||||
("Desk %d: viewable=%d order=%d x,y=%4d,%4d wxh=%4dx%4d area x,y=%d,%d pmap=%#lx\n",
|
("Desk %d: viewable=%d order=%d x,y=%4d,%4d wxh=%4dx%4d area x,y=%d,%d pmap=%#x\n",
|
||||||
desk, dsk->viewable, desks.order[desk],
|
desk, dsk->viewable, desks.order[desk],
|
||||||
EoGetX(dsk), EoGetY(dsk), EoGetW(dsk), EoGetH(dsk),
|
EoGetX(dsk), EoGetY(dsk), EoGetW(dsk), EoGetH(dsk),
|
||||||
dsk->current_area_x, dsk->current_area_y, dsk->bg.pmap);
|
dsk->current_area_x, dsk->current_area_y, dsk->bg.pmap);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2012 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -48,8 +48,8 @@ struct _desk {
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
EObj *o_bg;
|
EObj *o_bg;
|
||||||
#endif
|
#endif
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Pixmap pmap_set;
|
EX_Pixmap pmap_set;
|
||||||
unsigned int pixel;
|
unsigned int pixel;
|
||||||
unsigned int seq_no;
|
unsigned int seq_no;
|
||||||
} bg;
|
} bg;
|
||||||
|
@ -71,7 +71,7 @@ void DeskGoto(Desk * dsk);
|
||||||
void DeskGotoNum(unsigned int desk);
|
void DeskGotoNum(unsigned int desk);
|
||||||
void DeskRestack(Desk * dsk);
|
void DeskRestack(Desk * dsk);
|
||||||
EObj *DeskGetBackgroundObj(const Desk * dsk);
|
EObj *DeskGetBackgroundObj(const Desk * dsk);
|
||||||
Pixmap DeskGetBackgroundPixmap(const Desk * dsk);
|
EX_Pixmap DeskGetBackgroundPixmap(const Desk * dsk);
|
||||||
|
|
||||||
Background *DeskBackgroundGet(const Desk * dsk);
|
Background *DeskBackgroundGet(const Desk * dsk);
|
||||||
void DeskBackgroundSet(Desk * dsk, Background * bg);
|
void DeskBackgroundSet(Desk * dsk, Background * bg);
|
||||||
|
|
|
@ -144,7 +144,7 @@ struct _ditem {
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
KeyCode keycode;
|
EX_KeyCode keycode;
|
||||||
DialogCallbackFunc *func;
|
DialogCallbackFunc *func;
|
||||||
int val;
|
int val;
|
||||||
void *data;
|
void *data;
|
||||||
|
|
13
src/draw.c
13
src/draw.c
|
@ -34,7 +34,7 @@
|
||||||
static Font font = NoXID; /* Used in mode 1 (technical) */
|
static Font font = NoXID; /* Used in mode 1 (technical) */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_h_arrow(Drawable dr, GC gc, int x1, int x2, int y1)
|
draw_h_arrow(EX_Drawable dr, GC gc, int x1, int x2, int y1)
|
||||||
{
|
{
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ draw_h_arrow(Drawable dr, GC gc, int x1, int x2, int y1)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_v_arrow(Drawable dr, GC gc, int y1, int y2, int x1)
|
draw_v_arrow(EX_Drawable dr, GC gc, int y1, int y2, int x1)
|
||||||
{
|
{
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ draw_v_arrow(Drawable dr, GC gc, int y1, int y2, int x1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
do_draw_technical(Drawable dr, GC gc,
|
do_draw_technical(EX_Drawable dr, GC gc,
|
||||||
int a, int b, int c, int d, int bl, int br, int bt, int bb)
|
int a, int b, int c, int d, int bl, int br, int bt, int bb)
|
||||||
{
|
{
|
||||||
if (!font)
|
if (!font)
|
||||||
|
@ -104,7 +104,7 @@ do_draw_technical(Drawable dr, GC gc,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_draw_boxy(Drawable dr, GC gc,
|
do_draw_boxy(EX_Drawable dr, GC gc,
|
||||||
int a, int b, int c, int d, int bl, int br, int bt, int bb)
|
int a, int b, int c, int d, int bl, int br, int bt, int bb)
|
||||||
{
|
{
|
||||||
if (c < 3)
|
if (c < 3)
|
||||||
|
@ -116,7 +116,7 @@ do_draw_boxy(Drawable dr, GC gc,
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Window root;
|
EX_Window root;
|
||||||
GC gc;
|
GC gc;
|
||||||
int xo, yo, wo, ho;
|
int xo, yo, wo, ho;
|
||||||
int bl, br, bt, bb;
|
int bl, br, bt, bb;
|
||||||
|
@ -147,7 +147,8 @@ _ShapeDrawNograb_tech_box(EWin * ewin, int md, int firstlast,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void (DrawFunc) (Drawable dr, GC gc, int a, int b, int c, int d,
|
typedef void (DrawFunc) (EX_Drawable dr, GC gc,
|
||||||
|
int a, int b, int c, int d,
|
||||||
int bl, int br, int bt, int bb);
|
int bl, int br, int bt, int bb);
|
||||||
|
|
||||||
static DrawFunc *const draw_functions[] = {
|
static DrawFunc *const draw_functions[] = {
|
||||||
|
|
168
src/ecompmgr.c
168
src/ecompmgr.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -99,7 +99,7 @@ typedef struct _cmhook ECmWinInfo;
|
||||||
struct _cmhook {
|
struct _cmhook {
|
||||||
EObj *next; /* Paint order */
|
EObj *next; /* Paint order */
|
||||||
EObj *prev; /* Paint order */
|
EObj *prev; /* Paint order */
|
||||||
Pixmap pixmap;
|
EX_Pixmap pixmap;
|
||||||
int rcx, rcy, rcw, rch;
|
int rcx, rcy, rcw, rch;
|
||||||
int mode;
|
int mode;
|
||||||
unsigned damaged:1;
|
unsigned damaged:1;
|
||||||
|
@ -109,15 +109,15 @@ struct _cmhook {
|
||||||
unsigned have_extents:1; /* Region validity - extents */
|
unsigned have_extents:1; /* Region validity - extents */
|
||||||
unsigned have_clip:1; /* Region validity - clip */
|
unsigned have_clip:1; /* Region validity - clip */
|
||||||
Damage damage;
|
Damage damage;
|
||||||
Picture picture;
|
EX_Picture picture;
|
||||||
Picture pict_alpha; /* Solid, current opacity */
|
EX_Picture pict_alpha; /* Solid, current opacity */
|
||||||
XserverRegion shape;
|
EX_SrvRegion shape;
|
||||||
XserverRegion extents;
|
EX_SrvRegion extents;
|
||||||
XserverRegion clip;
|
EX_SrvRegion clip;
|
||||||
int shape_x, shape_y;
|
int shape_x, shape_y;
|
||||||
#if ENABLE_SHADOWS
|
#if ENABLE_SHADOWS
|
||||||
Picture shadow_alpha; /* Solid, sharp * current opacity */
|
EX_Picture shadow_alpha; /* Solid, sharp * current opacity */
|
||||||
Picture shadow_pict; /* Blurred shaped shadow */
|
EX_Picture shadow_pict; /* Blurred shaped shadow */
|
||||||
int shadow_dx;
|
int shadow_dx;
|
||||||
int shadow_dy;
|
int shadow_dy;
|
||||||
int shadow_width;
|
int shadow_width;
|
||||||
|
@ -184,21 +184,21 @@ static struct {
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
int mode;
|
int mode;
|
||||||
Window root;
|
EX_Window root;
|
||||||
#if USE_COMPOSITE_OVERLAY_WINDOW
|
#if USE_COMPOSITE_OVERLAY_WINDOW
|
||||||
Window cow;
|
EX_Window cow;
|
||||||
#endif
|
#endif
|
||||||
Pixmap pmap; /* Compositing buffer */
|
EX_Pixmap pmap; /* Compositing buffer */
|
||||||
char active;
|
char active;
|
||||||
char use_pixmap;
|
char use_pixmap;
|
||||||
char reorder;
|
char reorder;
|
||||||
char ghosts;
|
char ghosts;
|
||||||
EObj *eo_first;
|
EObj *eo_first;
|
||||||
EObj *eo_last;
|
EObj *eo_last;
|
||||||
XserverRegion damage;
|
EX_SrvRegion damage;
|
||||||
char got_damage;
|
char got_damage;
|
||||||
XserverRegion rgn_screen;
|
EX_SrvRegion rgn_screen;
|
||||||
XserverRegion rgn_clip;
|
EX_SrvRegion rgn_clip;
|
||||||
int shadow_mode;
|
int shadow_mode;
|
||||||
float opac_blur; /* 0. -> 1. */
|
float opac_blur; /* 0. -> 1. */
|
||||||
float opac_sharp; /* 0. -> 1. */
|
float opac_sharp; /* 0. -> 1. */
|
||||||
|
@ -209,11 +209,11 @@ static struct {
|
||||||
#define _ECM_SET_STACK_CHANGED() Mode_compmgr.reorder = 1
|
#define _ECM_SET_STACK_CHANGED() Mode_compmgr.reorder = 1
|
||||||
#define _ECM_SET_SHADOW_CHANGED() Mode_compmgr.reorder = 1
|
#define _ECM_SET_SHADOW_CHANGED() Mode_compmgr.reorder = 1
|
||||||
|
|
||||||
static Picture rootPicture;
|
static EX_Picture rootPicture;
|
||||||
static Picture rootBuffer;
|
static EX_Picture rootBuffer;
|
||||||
|
|
||||||
static XserverRegion rgn_tmp; /* Region for temporary use */
|
static EX_SrvRegion rgn_tmp; /* Region for temporary use */
|
||||||
static XserverRegion rgn_tmp2; /* Region for temporary use */
|
static EX_SrvRegion rgn_tmp2; /* Region for temporary use */
|
||||||
|
|
||||||
static ESelection *wm_cm_sel = NULL;
|
static ESelection *wm_cm_sel = NULL;
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ static void ECompMgrWinSetPicts(EObj * eo);
|
||||||
static void ECompMgrWinFadeEnd(EObj * eo, int done);
|
static void ECompMgrWinFadeEnd(EObj * eo, int done);
|
||||||
static int ECompMgrDetermineOrder(EObj * const *lst, int num,
|
static int ECompMgrDetermineOrder(EObj * const *lst, int num,
|
||||||
EObj ** first, EObj ** last,
|
EObj ** first, EObj ** last,
|
||||||
Desk * dsk, XserverRegion clip);
|
Desk * dsk, EX_SrvRegion clip);
|
||||||
|
|
||||||
#define PIXMAP_DESTROY(pmap) \
|
#define PIXMAP_DESTROY(pmap) \
|
||||||
if (pmap != NoXID) { XFreePixmap(disp, pmap); pmap = NoXID; }
|
if (pmap != NoXID) { XFreePixmap(disp, pmap); pmap = NoXID; }
|
||||||
|
@ -245,7 +245,7 @@ static int ECompMgrDetermineOrder(EObj * const *lst, int num,
|
||||||
void
|
void
|
||||||
ECompMgrWinClipToGC(EObj * eo, GC gc)
|
ECompMgrWinClipToGC(EObj * eo, GC gc)
|
||||||
{
|
{
|
||||||
XserverRegion rgn = rgn_tmp2;
|
EX_SrvRegion rgn = rgn_tmp2;
|
||||||
|
|
||||||
if (!eo || !eo->cmhook)
|
if (!eo || !eo->cmhook)
|
||||||
return;
|
return;
|
||||||
|
@ -265,10 +265,10 @@ ECompMgrDeskConfigure(Desk * dsk)
|
||||||
{
|
{
|
||||||
EObj *eo;
|
EObj *eo;
|
||||||
ECmWinInfo *cw;
|
ECmWinInfo *cw;
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
eo = dsk->bg.o;
|
eo = dsk->bg.o;
|
||||||
cw = eo->cmhook;
|
cw = eo->cmhook;
|
||||||
|
@ -295,7 +295,7 @@ ECompMgrDeskConfigure(Desk * dsk)
|
||||||
cw->picture = pict;
|
cw->picture = pict;
|
||||||
|
|
||||||
D1printf
|
D1printf
|
||||||
("ECompMgrDeskConfigure: Desk %d: using pixmap %#lx picture=%#lx\n",
|
("ECompMgrDeskConfigure: Desk %d: using pixmap %#x picture=%#x\n",
|
||||||
dsk->num, pmap, cw->picture);
|
dsk->num, pmap, cw->picture);
|
||||||
|
|
||||||
/* New background, all must be repainted */
|
/* New background, all must be repainted */
|
||||||
|
@ -344,7 +344,7 @@ ECompMgrDeskVisibility(EObj * eo, XEvent * ev)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrDamageMerge(XserverRegion damage)
|
ECompMgrDamageMerge(EX_SrvRegion damage)
|
||||||
{
|
{
|
||||||
if (Mode_compmgr.got_damage)
|
if (Mode_compmgr.got_damage)
|
||||||
{
|
{
|
||||||
|
@ -368,7 +368,7 @@ ECompMgrDamageMerge(XserverRegion damage)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrDamageMergeObject(EObj * eo, XserverRegion damage)
|
ECompMgrDamageMergeObject(EObj * eo, EX_SrvRegion damage)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
Desk *dsk = eo->desk;
|
Desk *dsk = eo->desk;
|
||||||
|
@ -413,7 +413,7 @@ ECompMgrDamageAll(void)
|
||||||
|
|
||||||
#define M_2PI_F ((float)(2 * M_PI))
|
#define M_2PI_F ((float)(2 * M_PI))
|
||||||
|
|
||||||
static Picture transBlackPicture;
|
static EX_Picture transBlackPicture;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int size;
|
int size;
|
||||||
|
@ -624,12 +624,12 @@ make_shadow(float opacity, int width, int height)
|
||||||
return ximage;
|
return ximage;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Picture
|
static EX_Picture
|
||||||
shadow_picture(float opacity, int width, int height, int *wp, int *hp)
|
shadow_picture(float opacity, int width, int height, int *wp, int *hp)
|
||||||
{
|
{
|
||||||
XImage *shadowImage;
|
XImage *shadowImage;
|
||||||
Pixmap shadowPixmap;
|
EX_Pixmap shadowPixmap;
|
||||||
Picture shadowPicture;
|
EX_Picture shadowPicture;
|
||||||
GC gc;
|
GC gc;
|
||||||
|
|
||||||
shadowImage = make_shadow(opacity, width, height);
|
shadowImage = make_shadow(opacity, width, height);
|
||||||
|
@ -775,7 +775,7 @@ ECompMgrWinSetExtents(EObj * eo)
|
||||||
done:
|
done:
|
||||||
cw->have_extents = 1;
|
cw->have_extents = 1;
|
||||||
|
|
||||||
D1printf("extents %#lx %d %d %d %d\n", EobjGetXwin(eo), r.x, r.y, r.width,
|
D1printf("extents %#x %d %d %d %d\n", EobjGetXwin(eo), r.x, r.y, r.width,
|
||||||
r.height);
|
r.height);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
||||||
|
@ -821,12 +821,12 @@ ECompMgrWinSetShape(EObj * eo)
|
||||||
cw->shape_y = EobjGetY(eo) + EobjGetBW(eo);
|
cw->shape_y = EobjGetY(eo) + EobjGetBW(eo);
|
||||||
cw->have_shape = 1;
|
cw->have_shape = 1;
|
||||||
|
|
||||||
D1printf("shape %#lx: %d %d\n", EobjGetXwin(eo), cw->shape_x, cw->shape_y);
|
D1printf("shape %#x: %d %d\n", EobjGetXwin(eo), cw->shape_x, cw->shape_y);
|
||||||
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
||||||
ERegionShow("shape", cw->shape, NULL);
|
ERegionShow("shape", cw->shape, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
ECompMgrWinGetPixmap(const EObj * eo)
|
ECompMgrWinGetPixmap(const EObj * eo)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
@ -845,7 +845,7 @@ ECompMgrWinGetPixmap(const EObj * eo)
|
||||||
return cw->pixmap;
|
return cw->pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
Picture
|
EX_Picture
|
||||||
ECompMgrWinGetAlphaPict(const EObj * eo)
|
ECompMgrWinGetAlphaPict(const EObj * eo)
|
||||||
{
|
{
|
||||||
return (eo->cmhook) ? eo->cmhook->pict_alpha : NoXID;
|
return (eo->cmhook) ? eo->cmhook->pict_alpha : NoXID;
|
||||||
|
@ -859,7 +859,7 @@ ECompMgrWinInvalidate(EObj * eo, int what)
|
||||||
if (!cw)
|
if (!cw)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
D1printf("ECompMgrWinInvalidate %#lx: %#x\n", EobjGetXwin(eo), what);
|
D1printf("ECompMgrWinInvalidate %#x: %#x\n", EobjGetXwin(eo), what);
|
||||||
|
|
||||||
if ((what & (INV_SIZE | INV_PIXMAP)) && cw->pixmap != NoXID)
|
if ((what & (INV_SIZE | INV_PIXMAP)) && cw->pixmap != NoXID)
|
||||||
{
|
{
|
||||||
|
@ -908,7 +908,7 @@ ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity)
|
||||||
|
|
||||||
cw->opacity = opacity;
|
cw->opacity = opacity;
|
||||||
|
|
||||||
D1printf("ECompMgrWinSetOpacity: %#lx opacity=%#x\n", EobjGetXwin(eo),
|
D1printf("ECompMgrWinSetOpacity: %#x opacity=%#x\n", EobjGetXwin(eo),
|
||||||
cw->opacity);
|
cw->opacity);
|
||||||
|
|
||||||
if (eo->shown || cw->fadeout)
|
if (eo->shown || cw->fadeout)
|
||||||
|
@ -942,7 +942,7 @@ doECompMgrWinFade(EObj * eo, int run, void *data __UNUSED__)
|
||||||
op = cw->opacity_to;
|
op = cw->opacity_to;
|
||||||
|
|
||||||
#if DEBUG_OPACITY
|
#if DEBUG_OPACITY
|
||||||
Eprintf("%s %#lx: %u/%u, %#x->%#x\n", __func__, EobjGetXwin(eo),
|
Eprintf("%s %#x: %u/%u, %#x->%#x\n", __func__, EobjGetXwin(eo),
|
||||||
eo->fading, cw->fadeout, cw->opacity, op);
|
eo->fading, cw->fadeout, cw->opacity, op);
|
||||||
#endif
|
#endif
|
||||||
if (!eo->fading)
|
if (!eo->fading)
|
||||||
|
@ -977,7 +977,7 @@ doECompMgrWinFade(EObj * eo, int run, void *data __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_OPACITY
|
#if DEBUG_OPACITY
|
||||||
Eprintf("%s %#lx: %#x\n", __func__, EobjGetXwin(eo), op);
|
Eprintf("%s %#x: %#x\n", __func__, EobjGetXwin(eo), op);
|
||||||
#endif
|
#endif
|
||||||
ECompMgrWinSetOpacity(eo, op);
|
ECompMgrWinSetOpacity(eo, op);
|
||||||
|
|
||||||
|
@ -1017,7 +1017,7 @@ ECompMgrWinFadeIn(EObj * eo)
|
||||||
#if DEBUG_OPACITY
|
#if DEBUG_OPACITY
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
Eprintf("%s %#lx: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
|
Eprintf("%s %#x: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
|
||||||
eo->fading, cw->fadeout, eo->opacity, 0x10000000, cw->opacity);
|
eo->fading, cw->fadeout, eo->opacity, 0x10000000, cw->opacity);
|
||||||
#endif
|
#endif
|
||||||
ECompMgrWinFade(eo, 0x10000000, eo->opacity);
|
ECompMgrWinFade(eo, 0x10000000, eo->opacity);
|
||||||
|
@ -1029,7 +1029,7 @@ ECompMgrWinFadeOut(EObj * eo)
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
#if DEBUG_OPACITY
|
#if DEBUG_OPACITY
|
||||||
Eprintf("%s %#lx: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
|
Eprintf("%s %#x: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo),
|
||||||
eo->fading, cw->fadeout, eo->opacity, cw->opacity, 0x10000000);
|
eo->fading, cw->fadeout, eo->opacity, cw->opacity, 0x10000000);
|
||||||
#endif
|
#endif
|
||||||
cw->fadeout = 1;
|
cw->fadeout = 1;
|
||||||
|
@ -1042,7 +1042,7 @@ ECompMgrWinFadeEnd(EObj * eo, int done)
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
#if DEBUG_OPACITY
|
#if DEBUG_OPACITY
|
||||||
Eprintf("%s %#lx: done=%d\n", __func__, EobjGetXwin(eo), done);
|
Eprintf("%s %#x: done=%d\n", __func__, EobjGetXwin(eo), done);
|
||||||
#endif
|
#endif
|
||||||
if (cw->fadeout)
|
if (cw->fadeout)
|
||||||
{
|
{
|
||||||
|
@ -1083,7 +1083,7 @@ ECompMgrWinMap(EObj * eo)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
D1printf("ECompMgrWinMap %#lx\n", EobjGetXwin(eo));
|
D1printf("ECompMgrWinMap %#x\n", EobjGetXwin(eo));
|
||||||
|
|
||||||
if (!cw->have_extents)
|
if (!cw->have_extents)
|
||||||
ECompMgrWinSetExtents(eo);
|
ECompMgrWinSetExtents(eo);
|
||||||
|
@ -1100,7 +1100,7 @@ ECompMgrWinUnmap(EObj * eo)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
D1printf("ECompMgrWinUnmap %#lx shown=%d\n", EobjGetXwin(eo), eo->shown);
|
D1printf("ECompMgrWinUnmap %#x shown=%d\n", EobjGetXwin(eo), eo->shown);
|
||||||
if (!eo->shown) /* Sometimes we get a synthetic one too */
|
if (!eo->shown) /* Sometimes we get a synthetic one too */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1124,7 +1124,7 @@ ECompMgrWinSetPicts(EObj * eo)
|
||||||
(Mode_compmgr.use_pixmap || (eo->fade && Conf_compmgr.fading.enable)))
|
(Mode_compmgr.use_pixmap || (eo->fade && Conf_compmgr.fading.enable)))
|
||||||
{
|
{
|
||||||
cw->pixmap = EWindowGetPixmap(EobjGetWin(eo));
|
cw->pixmap = EWindowGetPixmap(EobjGetWin(eo));
|
||||||
D1printf("ECompMgrWinSetPicts %#lx: Pmap=%#lx\n", EobjGetXwin(eo),
|
D1printf("ECompMgrWinSetPicts %#x: Pmap=%#x\n", EobjGetXwin(eo),
|
||||||
cw->pixmap);
|
cw->pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1132,7 +1132,7 @@ ECompMgrWinSetPicts(EObj * eo)
|
||||||
{
|
{
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
Drawable draw = EobjGetXwin(eo);
|
EX_Drawable draw = EobjGetXwin(eo);
|
||||||
|
|
||||||
if ((cw->pixmap && Mode_compmgr.use_pixmap) || (cw->fadeout))
|
if ((cw->pixmap && Mode_compmgr.use_pixmap) || (cw->fadeout))
|
||||||
draw = cw->pixmap;
|
draw = cw->pixmap;
|
||||||
|
@ -1143,13 +1143,13 @@ ECompMgrWinSetPicts(EObj * eo)
|
||||||
pa.subwindow_mode = IncludeInferiors;
|
pa.subwindow_mode = IncludeInferiors;
|
||||||
cw->picture = XRenderCreatePicture(disp, draw,
|
cw->picture = XRenderCreatePicture(disp, draw,
|
||||||
pictfmt, CPSubwindowMode, &pa);
|
pictfmt, CPSubwindowMode, &pa);
|
||||||
D1printf("ECompMgrWinSetPicts %#lx: Pict=%#lx (drawable=%#lx)\n",
|
D1printf("ECompMgrWinSetPicts %#x: Pict=%#x (drawable=%#x)\n",
|
||||||
EobjGetXwin(eo), cw->picture, draw);
|
EobjGetXwin(eo), cw->picture, draw);
|
||||||
|
|
||||||
#if 0 /* Pixmap must be clipped by window shape */
|
#if 0 /* Pixmap must be clipped by window shape */
|
||||||
if (draw == cw->pixmap && WinIsShaped(EobjGetWin(eo)))
|
if (draw == cw->pixmap && WinIsShaped(EobjGetWin(eo)))
|
||||||
{
|
{
|
||||||
XserverRegion clip;
|
EX_SrvRegion clip;
|
||||||
|
|
||||||
clip = ERegionCreateFromWindow(EobjGetWin(eo));
|
clip = ERegionCreateFromWindow(EobjGetWin(eo));
|
||||||
EPictureSetClip(cw->picture, clip);
|
EPictureSetClip(cw->picture, clip);
|
||||||
|
@ -1177,7 +1177,7 @@ ECompMgrWinNew(EObj * eo)
|
||||||
if (!cw)
|
if (!cw)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
D1printf("ECompMgrWinNew %#lx\n", EobjGetXwin(eo));
|
D1printf("ECompMgrWinNew %#x\n", EobjGetXwin(eo));
|
||||||
|
|
||||||
eo->cmhook = cw;
|
eo->cmhook = cw;
|
||||||
|
|
||||||
|
@ -1241,7 +1241,7 @@ ECompMgrWinMoveResize(EObj * eo, int change_xy, int change_wh, int change_bw)
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
int invalidate;
|
int invalidate;
|
||||||
|
|
||||||
D1printf("ECompMgrWinMoveResize %#lx xy=%d wh=%d bw=%d\n",
|
D1printf("ECompMgrWinMoveResize %#x xy=%d wh=%d bw=%d\n",
|
||||||
EobjGetXwin(eo), change_xy, change_wh, change_bw);
|
EobjGetXwin(eo), change_xy, change_wh, change_bw);
|
||||||
|
|
||||||
invalidate = 0;
|
invalidate = 0;
|
||||||
|
@ -1350,7 +1350,7 @@ ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
D1printf("ECompMgrWinReparent %#lx %#lx d=%d->%d x,y=%d,%d %d\n",
|
D1printf("ECompMgrWinReparent %#x %#x d=%d->%d x,y=%d,%d %d\n",
|
||||||
EobjGetXwin(eo), cw->extents,
|
EobjGetXwin(eo), cw->extents,
|
||||||
(eo->desk) ? (int)eo->desk->num : -1, dsk->num,
|
(eo->desk) ? (int)eo->desk->num : -1, dsk->num,
|
||||||
EobjGetX(eo), EobjGetY(eo), change_xy);
|
EobjGetX(eo), EobjGetY(eo), change_xy);
|
||||||
|
@ -1382,7 +1382,7 @@ ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy)
|
||||||
static void
|
static void
|
||||||
ECompMgrWinCirculate(EObj * eo, XEvent * ev)
|
ECompMgrWinCirculate(EObj * eo, XEvent * ev)
|
||||||
{
|
{
|
||||||
D1printf("ECompMgrWinCirculate %#lx %#lx\n", ev->xany.window,
|
D1printf("ECompMgrWinCirculate %#lx %#x\n", ev->xany.window,
|
||||||
EobjGetXwin(eo));
|
EobjGetXwin(eo));
|
||||||
|
|
||||||
_ECM_SET_STACK_CHANGED();
|
_ECM_SET_STACK_CHANGED();
|
||||||
|
@ -1393,7 +1393,7 @@ ECompMgrWinChangeShape(EObj * eo)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
D1printf("ECompMgrWinChangeShape %#lx\n", EobjGetXwin(eo));
|
D1printf("ECompMgrWinChangeShape %#x\n", EobjGetXwin(eo));
|
||||||
|
|
||||||
EShapeUpdate(EobjGetWin(eo));
|
EShapeUpdate(EobjGetWin(eo));
|
||||||
|
|
||||||
|
@ -1412,7 +1412,7 @@ ECompMgrWinRaiseLower(EObj * eo, int delta)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
D1printf("ECompMgrWinRaiseLower %#lx delta=%d\n", EobjGetXwin(eo), delta);
|
D1printf("ECompMgrWinRaiseLower %#x delta=%d\n", EobjGetXwin(eo), delta);
|
||||||
|
|
||||||
if (delta < 0) /* Raise */
|
if (delta < 0) /* Raise */
|
||||||
_ECM_SET_STACK_CHANGED();
|
_ECM_SET_STACK_CHANGED();
|
||||||
|
@ -1429,7 +1429,7 @@ ECompMgrWinDel(EObj * eo)
|
||||||
if (!cw)
|
if (!cw)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
D1printf("ECompMgrWinDel %#lx\n", EobjGetXwin(eo));
|
D1printf("ECompMgrWinDel %#x\n", EobjGetXwin(eo));
|
||||||
|
|
||||||
if (eo->fading)
|
if (eo->fading)
|
||||||
ECompMgrWinFadeEnd(eo, 1);
|
ECompMgrWinFadeEnd(eo, 1);
|
||||||
|
@ -1473,9 +1473,9 @@ ECompMgrWinDamage(EObj * eo, XEvent * ev)
|
||||||
{
|
{
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
XDamageNotifyEvent *de = (XDamageNotifyEvent *) ev;
|
XDamageNotifyEvent *de = (XDamageNotifyEvent *) ev;
|
||||||
XserverRegion parts;
|
EX_SrvRegion parts;
|
||||||
|
|
||||||
D2printf("ECompMgrWinDamage %#lx %#lx damaged=%d %d,%d %dx%d\n",
|
D2printf("ECompMgrWinDamage %#lx %#x damaged=%d %d,%d %dx%d\n",
|
||||||
ev->xany.window, EobjGetXwin(eo), cw->damaged,
|
ev->xany.window, EobjGetXwin(eo), cw->damaged,
|
||||||
de->area.x, de->area.y, de->area.width, de->area.height);
|
de->area.x, de->area.y, de->area.width, de->area.height);
|
||||||
|
|
||||||
|
@ -1500,14 +1500,14 @@ ECompMgrWinDamage(EObj * eo, XEvent * ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrWinDumpInfo(const char *txt, EObj * eo, XserverRegion rgn, int ipc)
|
ECompMgrWinDumpInfo(const char *txt, EObj * eo, EX_SrvRegion rgn, int ipc)
|
||||||
{
|
{
|
||||||
void (*prf) (const char *fmt, ...);
|
void (*prf) (const char *fmt, ...);
|
||||||
ECmWinInfo *cw = eo->cmhook;
|
ECmWinInfo *cw = eo->cmhook;
|
||||||
|
|
||||||
prf = (ipc) ? IpcPrintf : Eprintf;
|
prf = (ipc) ? IpcPrintf : Eprintf;
|
||||||
|
|
||||||
prf("%s %#lx: %d,%d %dx%d: %s\n", txt, EobjGetXwin(eo),
|
prf("%s %#x: %d,%d %dx%d: %s\n", txt, EobjGetXwin(eo),
|
||||||
EobjGetX(eo), EobjGetY(eo), EobjGetW(eo), EobjGetH(eo), EobjGetName(eo));
|
EobjGetX(eo), EobjGetY(eo), EobjGetW(eo), EobjGetH(eo), EobjGetName(eo));
|
||||||
if (!cw)
|
if (!cw)
|
||||||
{
|
{
|
||||||
|
@ -1517,7 +1517,7 @@ ECompMgrWinDumpInfo(const char *txt, EObj * eo, XserverRegion rgn, int ipc)
|
||||||
|
|
||||||
if (ipc || EDebug(EDBUG_TYPE_COMPMGR3))
|
if (ipc || EDebug(EDBUG_TYPE_COMPMGR3))
|
||||||
{
|
{
|
||||||
prf(" - pict=%#lx pmap=%#lx\n", cw->picture, cw->pixmap);
|
prf(" - pict=%#x pmap=%#x\n", cw->picture, cw->pixmap);
|
||||||
|
|
||||||
ERegionShow("win extents", cw->extents, prf);
|
ERegionShow("win extents", cw->extents, prf);
|
||||||
ERegionShow("win shape ", cw->shape, prf);
|
ERegionShow("win shape ", cw->shape, prf);
|
||||||
|
@ -1547,7 +1547,7 @@ ECompMgrDestroyClip(void)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
EObj ** last, Desk * dsk, XserverRegion clip)
|
EObj ** last, Desk * dsk, EX_SrvRegion clip)
|
||||||
{
|
{
|
||||||
EObj *eo, *eo_prev, *eo_first;
|
EObj *eo, *eo_prev, *eo_first;
|
||||||
int i, stop;
|
int i, stop;
|
||||||
|
@ -1591,7 +1591,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
if (!cw->have_extents)
|
if (!cw->have_extents)
|
||||||
ECompMgrWinSetExtents(eo);
|
ECompMgrWinSetExtents(eo);
|
||||||
|
|
||||||
D3printf(" - %#lx desk=%d shown=%d fading=%d fadeout=%d\n",
|
D3printf(" - %#x desk=%d shown=%d fading=%d fadeout=%d\n",
|
||||||
EobjGetXwin(eo), eo->desk->num, eo->shown, eo->fading,
|
EobjGetXwin(eo), eo->desk->num, eo->shown, eo->fading,
|
||||||
cw->fadeout);
|
cw->fadeout);
|
||||||
|
|
||||||
|
@ -1636,7 +1636,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
|
|
||||||
ECompMgrWinSetPicts(eo);
|
ECompMgrWinSetPicts(eo);
|
||||||
|
|
||||||
D3printf(" - %#lx desk=%d shown=%d dam=%d pict=%#lx\n",
|
D3printf(" - %#x desk=%d shown=%d dam=%d pict=%#x\n",
|
||||||
EobjGetXwin(eo), eo->desk->num, eo->shown, cw->damaged,
|
EobjGetXwin(eo), eo->desk->num, eo->shown, cw->damaged,
|
||||||
cw->picture);
|
cw->picture);
|
||||||
|
|
||||||
|
@ -1654,7 +1654,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
}
|
}
|
||||||
|
|
||||||
D3printf
|
D3printf
|
||||||
("ECompMgrDetermineOrder hook in %d - %#lx desk=%d shown=%d\n",
|
("ECompMgrDetermineOrder hook in %d - %#x desk=%d shown=%d\n",
|
||||||
dsk->num, EobjGetXwin(eo), eo->desk->num, eo->shown);
|
dsk->num, EobjGetXwin(eo), eo->desk->num, eo->shown);
|
||||||
|
|
||||||
if (!eo_first)
|
if (!eo_first)
|
||||||
|
@ -1668,7 +1668,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
{
|
{
|
||||||
case WINDOW_UNREDIR:
|
case WINDOW_UNREDIR:
|
||||||
case WINDOW_SOLID:
|
case WINDOW_SOLID:
|
||||||
D3printf("- clip %#lx %#lx %d,%d %dx%d: %s\n", EobjGetXwin(eo),
|
D3printf("- clip %#x %#x %d,%d %dx%d: %s\n", EobjGetXwin(eo),
|
||||||
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
|
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
|
||||||
EobjGetH(eo), EobjGetName(eo));
|
EobjGetH(eo), EobjGetName(eo));
|
||||||
#if USE_CLIP_RELATIVE_TO_DESK
|
#if USE_CLIP_RELATIVE_TO_DESK
|
||||||
|
@ -1680,7 +1680,7 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
D3printf("- noclip %#lx %#lx %d,%d %dx%d: %s\n", EobjGetXwin(eo),
|
D3printf("- noclip %#x %#x %d,%d %dx%d: %s\n", EobjGetXwin(eo),
|
||||||
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
|
cw->clip, EobjGetX(eo), EobjGetY(eo), EobjGetW(eo),
|
||||||
EobjGetH(eo), EobjGetName(eo));
|
EobjGetH(eo), EobjGetName(eo));
|
||||||
break;
|
break;
|
||||||
|
@ -1705,9 +1705,9 @@ ECompMgrDetermineOrder(EObj * const *lst, int num, EObj ** first,
|
||||||
return stop;
|
return stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static XserverRegion
|
static EX_SrvRegion
|
||||||
ECompMgrRepaintObjSetClip(XserverRegion rgn, XserverRegion damage,
|
ECompMgrRepaintObjSetClip(EX_SrvRegion rgn, EX_SrvRegion damage,
|
||||||
XserverRegion clip, int x, int y)
|
EX_SrvRegion clip, int x, int y)
|
||||||
{
|
{
|
||||||
ERegionCopy(rgn, damage);
|
ERegionCopy(rgn, damage);
|
||||||
#if USE_CLIP_RELATIVE_TO_DESK
|
#if USE_CLIP_RELATIVE_TO_DESK
|
||||||
|
@ -1719,8 +1719,8 @@ ECompMgrRepaintObjSetClip(XserverRegion rgn, XserverRegion damage,
|
||||||
return rgn;
|
return rgn;
|
||||||
}
|
}
|
||||||
|
|
||||||
static XserverRegion
|
static EX_SrvRegion
|
||||||
ECompMgrRepaintObjSetClip2(EObj * eo, XserverRegion clip, int x, int y)
|
ECompMgrRepaintObjSetClip2(EObj * eo, EX_SrvRegion clip, int x, int y)
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
/* This is only needed when source clipping in XRenderComposite() is broken.
|
/* This is only needed when source clipping in XRenderComposite() is broken.
|
||||||
|
@ -1739,14 +1739,14 @@ ECompMgrRepaintObjSetClip2(EObj * eo, XserverRegion clip, int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrRepaintObj(Picture pbuf, XserverRegion region, EObj * eo, int mode)
|
ECompMgrRepaintObj(EX_Picture pbuf, EX_SrvRegion region, EObj * eo, int mode)
|
||||||
{
|
{
|
||||||
static XserverRegion rgn_clip = NoXID;
|
static EX_SrvRegion rgn_clip = NoXID;
|
||||||
ECmWinInfo *cw;
|
ECmWinInfo *cw;
|
||||||
Desk *dsk = eo->desk;
|
Desk *dsk = eo->desk;
|
||||||
int x, y;
|
int x, y;
|
||||||
XserverRegion clip, clip2;
|
EX_SrvRegion clip, clip2;
|
||||||
Picture alpha;
|
EX_Picture alpha;
|
||||||
|
|
||||||
cw = eo->cmhook;
|
cw = eo->cmhook;
|
||||||
|
|
||||||
|
@ -1866,7 +1866,7 @@ ECompMgrRepaintObj(Picture pbuf, XserverRegion region, EObj * eo, int mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrPaintGhosts(Picture pict, XserverRegion damage)
|
ECompMgrPaintGhosts(EX_Picture pict, EX_SrvRegion damage)
|
||||||
{
|
{
|
||||||
EObj *eo, *const *lst;
|
EObj *eo, *const *lst;
|
||||||
int i, num;
|
int i, num;
|
||||||
|
@ -1899,7 +1899,7 @@ void
|
||||||
ECompMgrRepaint(void)
|
ECompMgrRepaint(void)
|
||||||
{
|
{
|
||||||
EObj *eo;
|
EObj *eo;
|
||||||
Picture pbuf;
|
EX_Picture pbuf;
|
||||||
Desk *dsk = DeskGet(0);
|
Desk *dsk = DeskGet(0);
|
||||||
|
|
||||||
if (!Mode_compmgr.active || !Mode_compmgr.got_damage)
|
if (!Mode_compmgr.active || !Mode_compmgr.got_damage)
|
||||||
|
@ -1907,7 +1907,7 @@ ECompMgrRepaint(void)
|
||||||
|
|
||||||
ERegionIntersect(Mode_compmgr.damage, Mode_compmgr.rgn_screen);
|
ERegionIntersect(Mode_compmgr.damage, Mode_compmgr.rgn_screen);
|
||||||
|
|
||||||
Dprintf("ECompMgrRepaint rootBuffer=%#lx rootPicture=%#lx\n",
|
Dprintf("ECompMgrRepaint rootBuffer=%#x rootPicture=%#x\n",
|
||||||
rootBuffer, rootPicture);
|
rootBuffer, rootPicture);
|
||||||
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
||||||
ERegionShow("damage", Mode_compmgr.damage, NULL);
|
ERegionShow("damage", Mode_compmgr.damage, NULL);
|
||||||
|
@ -1927,7 +1927,7 @@ ECompMgrRepaint(void)
|
||||||
ECompMgrRepaintObj(pbuf, Mode_compmgr.damage, eo, 0);
|
ECompMgrRepaintObj(pbuf, Mode_compmgr.damage, eo, 0);
|
||||||
|
|
||||||
#if 0 /* FIXME - NoBg? */
|
#if 0 /* FIXME - NoBg? */
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
if (EDebug(EDBUG_TYPE_COMPMGR2))
|
||||||
ERegionShow("after opaque", region, NULL);
|
ERegionShow("after opaque", region, NULL);
|
||||||
|
@ -2009,7 +2009,7 @@ ECompMgrRootBufferDestroy(void)
|
||||||
REGION_DESTROY(Mode_compmgr.rgn_clip);
|
REGION_DESTROY(Mode_compmgr.rgn_clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
ECompMgrGetRootBuffer(void)
|
ECompMgrGetRootBuffer(void)
|
||||||
{
|
{
|
||||||
return (Mode_compmgr.pmap != NoXID) ? Mode_compmgr.pmap : WinGetXwin(VROOT);
|
return (Mode_compmgr.pmap != NoXID) ? Mode_compmgr.pmap : WinGetXwin(VROOT);
|
||||||
|
@ -2051,7 +2051,7 @@ ECompMgrRootExpose(void *prm __UNUSED__, XEvent * ev)
|
||||||
n_expose++;
|
n_expose++;
|
||||||
if (ev->xexpose.count == 0)
|
if (ev->xexpose.count == 0)
|
||||||
{
|
{
|
||||||
XserverRegion region;
|
EX_SrvRegion region;
|
||||||
|
|
||||||
region = ERegionCreateFromRects(expose_rects, n_expose);
|
region = ERegionCreateFromRects(expose_rects, n_expose);
|
||||||
|
|
||||||
|
@ -2148,7 +2148,7 @@ ECompMgrStart(void)
|
||||||
/* Pass all input events through */
|
/* Pass all input events through */
|
||||||
XShapeCombineRectangles(disp, Mode_compmgr.cow, ShapeInput, 0, 0,
|
XShapeCombineRectangles(disp, Mode_compmgr.cow, ShapeInput, 0, 0,
|
||||||
NULL, 0, ShapeSet, Unsorted);
|
NULL, 0, ShapeSet, Unsorted);
|
||||||
Dprintf("COW/CMroot=%#lx/%#lx\n",
|
Dprintf("COW/CMroot=%#x/%#x\n",
|
||||||
Mode_compmgr.cow, Mode_compmgr.root);
|
Mode_compmgr.cow, Mode_compmgr.root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2397,7 +2397,7 @@ ECompMgrHandleWindowEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
static void
|
static void
|
||||||
ECompMgrHandleRootEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
ECompMgrHandleRootEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
EObj *eo;
|
EObj *eo;
|
||||||
|
|
||||||
D2printf("ECompMgrHandleRootEvent: type=%d\n", ev->type);
|
D2printf("ECompMgrHandleRootEvent: type=%d\n", ev->type);
|
||||||
|
@ -2578,11 +2578,11 @@ CompMgrIpc(const char *params)
|
||||||
}
|
}
|
||||||
else if (!strncmp(cmd, "oi", 2))
|
else if (!strncmp(cmd, "oi", 2))
|
||||||
{
|
{
|
||||||
Window win;
|
EX_Window win;
|
||||||
EObj *eo;
|
EObj *eo;
|
||||||
|
|
||||||
win = NoXID;
|
win = NoXID;
|
||||||
sscanf(prm, "%lx", &win);
|
sscanf(prm, "%x", &win);
|
||||||
eo = EobjListStackFind(win);
|
eo = EobjListStackFind(win);
|
||||||
if (eo)
|
if (eo)
|
||||||
ECompMgrWinDumpInfo("EObj", eo, NoXID, 1);
|
ECompMgrWinDumpInfo("EObj", eo, NoXID, 1);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -42,7 +42,7 @@ int ECompMgrIsActive(void);
|
||||||
|
|
||||||
void ECompMgrDeskConfigure(Desk * dsk);
|
void ECompMgrDeskConfigure(Desk * dsk);
|
||||||
|
|
||||||
Pixmap ECompMgrGetRootBuffer(void);
|
EX_Pixmap ECompMgrGetRootBuffer(void);
|
||||||
|
|
||||||
void ECompMgrWinNew(EObj * eo);
|
void ECompMgrWinNew(EObj * eo);
|
||||||
void ECompMgrWinDel(EObj * eo);
|
void ECompMgrWinDel(EObj * eo);
|
||||||
|
@ -58,8 +58,8 @@ void ECompMgrWinChangeShape(EObj * eo);
|
||||||
void ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity);
|
void ECompMgrWinSetOpacity(EObj * eo, unsigned int opacity);
|
||||||
void ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
|
void ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
|
||||||
void ECompMgrWinChangeShadow(EObj * eo, int shadow);
|
void ECompMgrWinChangeShadow(EObj * eo, int shadow);
|
||||||
Pixmap ECompMgrWinGetPixmap(const EObj * eo);
|
EX_Pixmap ECompMgrWinGetPixmap(const EObj * eo);
|
||||||
Picture ECompMgrWinGetAlphaPict(const EObj * eo);
|
EX_Picture ECompMgrWinGetAlphaPict(const EObj * eo);
|
||||||
void ECompMgrWinClipToGC(EObj * eo, GC gc);
|
void ECompMgrWinClipToGC(EObj * eo, GC gc);
|
||||||
|
|
||||||
void ECompMgrConfigGet(cfg_composite * cfg);
|
void ECompMgrConfigGet(cfg_composite * cfg);
|
||||||
|
|
16
src/eglx.c
16
src/eglx.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2013 Kim Woelders
|
* Copyright (C) 2007-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -299,7 +299,7 @@ EGlGetDepth(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EGlWindowConnect(Window xwin)
|
EGlWindowConnect(EX_Window xwin)
|
||||||
{
|
{
|
||||||
glXMakeContextCurrent(disp, xwin, xwin, egl.ctx);
|
glXMakeContextCurrent(disp, xwin, xwin, egl.ctx);
|
||||||
|
|
||||||
|
@ -377,14 +377,14 @@ EGlTextureFromImage(EImage * im, int mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GLXPixmap
|
static GLXPixmap
|
||||||
GetGlPixmap(Window xwin, Drawable draw)
|
GetGlPixmap(EX_Window xwin, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
static const int attrs[] = {
|
static const int attrs[] = {
|
||||||
GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
|
GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
|
||||||
GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
|
GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
Pixmap pixmap;
|
EX_Pixmap pixmap;
|
||||||
GLXPixmap glxpixmap;
|
GLXPixmap glxpixmap;
|
||||||
|
|
||||||
if (xwin == NoXID && draw == NoXID)
|
if (xwin == NoXID && draw == NoXID)
|
||||||
|
@ -392,14 +392,14 @@ GetGlPixmap(Window xwin, Drawable draw)
|
||||||
|
|
||||||
pixmap = (draw) ? draw : XCompositeNameWindowPixmap(disp, xwin);
|
pixmap = (draw) ? draw : XCompositeNameWindowPixmap(disp, xwin);
|
||||||
glxpixmap = glXCreatePixmap(disp, egl.fbc, pixmap, attrs);
|
glxpixmap = glXCreatePixmap(disp, egl.fbc, pixmap, attrs);
|
||||||
Dprintf("GetGlPixmap: Window=%#lx Drawable=%#lx glxpixmap=%#lx\n",
|
Dprintf("GetGlPixmap: Window=%#x Drawable=%#x glxpixmap=%#lx\n",
|
||||||
xwin, draw, glxpixmap);
|
xwin, draw, glxpixmap);
|
||||||
|
|
||||||
return glxpixmap;
|
return glxpixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_EGlTextureFromDrawable(ETexture * et, Drawable draw, int mode)
|
_EGlTextureFromDrawable(ETexture * et, EX_Drawable draw, int mode)
|
||||||
{
|
{
|
||||||
if (!et || draw == NoXID)
|
if (!et || draw == NoXID)
|
||||||
return;
|
return;
|
||||||
|
@ -416,7 +416,7 @@ _EGlTextureFromDrawable(ETexture * et, Drawable draw, int mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
ETexture *
|
ETexture *
|
||||||
EGlTextureFromDrawable(Drawable draw, int mode)
|
EGlTextureFromDrawable(EX_Drawable draw, int mode)
|
||||||
{
|
{
|
||||||
ETexture *et;
|
ETexture *et;
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ EobjGetTexture(EObj * eo)
|
||||||
void
|
void
|
||||||
EobjTextureCreate(EObj * eo)
|
EobjTextureCreate(EObj * eo)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
pmap = EobjGetPixmap(eo);
|
pmap = EobjGetPixmap(eo);
|
||||||
if (pmap == NoXID)
|
if (pmap == NoXID)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2010 Kim Woelders
|
* Copyright (C) 2007-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -41,11 +41,11 @@ void EGlExit(void);
|
||||||
Visual *EGlGetVisual(void);
|
Visual *EGlGetVisual(void);
|
||||||
unsigned int EGlGetDepth(void);
|
unsigned int EGlGetDepth(void);
|
||||||
|
|
||||||
void EGlWindowConnect(Window xwin);
|
void EGlWindowConnect(EX_Window xwin);
|
||||||
void EGlWindowDisconnect(void);
|
void EGlWindowDisconnect(void);
|
||||||
|
|
||||||
ETexture *EGlTextureFromImage(EImage * im, int mode);
|
ETexture *EGlTextureFromImage(EImage * im, int mode);
|
||||||
ETexture *EGlTextureFromDrawable(Drawable draw, int mode);
|
ETexture *EGlTextureFromDrawable(EX_Drawable draw, int mode);
|
||||||
void EGlTextureDestroy(ETexture * et);
|
void EGlTextureDestroy(ETexture * et);
|
||||||
void EGlTextureInvalidate(ETexture * et);
|
void EGlTextureInvalidate(ETexture * et);
|
||||||
|
|
||||||
|
|
41
src/eimage.c
41
src/eimage.c
|
@ -373,11 +373,11 @@ EImageTile(EImage * im, EImage * tile, int flags, int tw, int th,
|
||||||
}
|
}
|
||||||
|
|
||||||
EImage *
|
EImage *
|
||||||
EImageGrabDrawable(Drawable draw, Pixmap mask, int x, int y, int w, int h,
|
EImageGrabDrawable(EX_Drawable draw, EX_Pixmap mask, int x, int y, int w,
|
||||||
int grab)
|
int h, int grab)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
Colormap cm;
|
EX_Colormap cm;
|
||||||
|
|
||||||
cm = imlib_context_get_colormap();
|
cm = imlib_context_get_colormap();
|
||||||
imlib_context_set_colormap(NoXID); /* Fix for grabbing bitmaps */
|
imlib_context_set_colormap(NoXID); /* Fix for grabbing bitmaps */
|
||||||
|
@ -389,7 +389,7 @@ EImageGrabDrawable(Drawable draw, Pixmap mask, int x, int y, int w, int h,
|
||||||
}
|
}
|
||||||
|
|
||||||
EImage *
|
EImage *
|
||||||
EImageGrabDrawableScaled(Win win, Drawable draw, Pixmap mask,
|
EImageGrabDrawableScaled(Win win, EX_Drawable draw, EX_Pixmap mask,
|
||||||
int x, int y, int w, int h,
|
int x, int y, int w, int h,
|
||||||
int iw, int ih, int grab, int get_mask_from_shape)
|
int iw, int ih, int grab, int get_mask_from_shape)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ EImageGrabDrawableScaled(Win win, Drawable draw, Pixmap mask,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EImageRenderOnDrawable(EImage * im, Win win, Drawable draw, int flags,
|
EImageRenderOnDrawable(EImage * im, Win win, EX_Drawable draw, int flags,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
Visual *vis;
|
Visual *vis;
|
||||||
|
@ -434,10 +434,10 @@ EImageRenderOnDrawable(EImage * im, Win win, Drawable draw, int flags,
|
||||||
|
|
||||||
void
|
void
|
||||||
EImageRenderPixmaps(EImage * im, Win win, int flags,
|
EImageRenderPixmaps(EImage * im, Win win, int flags,
|
||||||
Pixmap * pmap, Pixmap * mask, int w, int h)
|
EX_Pixmap * ppmap, EX_Pixmap * pmask, int w, int h)
|
||||||
{
|
{
|
||||||
Visual *vis;
|
Visual *vis;
|
||||||
Pixmap m;
|
Pixmap pmap, mask, *pm;
|
||||||
|
|
||||||
imlib_context_set_image(im);
|
imlib_context_set_image(im);
|
||||||
imlib_context_set_drawable((win) ? WinGetXwin(win) : WinGetXwin(VROOT));
|
imlib_context_set_drawable((win) ? WinGetXwin(win) : WinGetXwin(VROOT));
|
||||||
|
@ -445,27 +445,28 @@ EImageRenderPixmaps(EImage * im, Win win, int flags,
|
||||||
if (vis)
|
if (vis)
|
||||||
imlib_context_set_visual(vis);
|
imlib_context_set_visual(vis);
|
||||||
|
|
||||||
*pmap = NoXID;
|
pmap = mask = NoXID;
|
||||||
if (!mask) /* Imlib2 <= 1.3.0 needs a mask pointer */
|
pm = pmask ? &mask : NULL;
|
||||||
mask = &m; /* ... to avoid bogus error messages */
|
|
||||||
if (mask)
|
|
||||||
*mask = NoXID;
|
|
||||||
|
|
||||||
if (flags)
|
if (flags)
|
||||||
_EImageFlagsSet(flags);
|
_EImageFlagsSet(flags);
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
imlib_render_pixmaps_for_whole_image(pmap, mask);
|
imlib_render_pixmaps_for_whole_image(&pmap, pm);
|
||||||
else
|
else
|
||||||
imlib_render_pixmaps_for_whole_image_at_size(pmap, mask, w, h);
|
imlib_render_pixmaps_for_whole_image_at_size(&pmap, pm, w, h);
|
||||||
if (flags)
|
if (flags)
|
||||||
_EImageFlagsReset();
|
_EImageFlagsReset();
|
||||||
|
|
||||||
if (vis)
|
if (vis)
|
||||||
imlib_context_set_visual(WinGetVisual(VROOT));
|
imlib_context_set_visual(WinGetVisual(VROOT));
|
||||||
|
|
||||||
|
*ppmap = pmap;
|
||||||
|
if (pmask)
|
||||||
|
*pmask = mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EImagePixmapsFree(Pixmap pmap, Pixmap mask __UNUSED__)
|
EImagePixmapsFree(EX_Pixmap pmap, EX_Pixmap mask __UNUSED__)
|
||||||
{
|
{
|
||||||
imlib_free_pixmap_and_mask(pmap);
|
imlib_free_pixmap_and_mask(pmap);
|
||||||
}
|
}
|
||||||
|
@ -473,7 +474,7 @@ EImagePixmapsFree(Pixmap pmap, Pixmap mask __UNUSED__)
|
||||||
void
|
void
|
||||||
EImageApplyToWin(EImage * im, Win win, int flags, int w, int h)
|
EImageApplyToWin(EImage * im, Win win, int flags, int w, int h)
|
||||||
{
|
{
|
||||||
Pixmap pmap, mask;
|
EX_Pixmap pmap, mask;
|
||||||
|
|
||||||
EImageRenderPixmaps(im, win, flags, &pmap, &mask, w, h);
|
EImageRenderPixmaps(im, win, flags, &pmap, &mask, w, h);
|
||||||
ESetWindowBackgroundPixmap(win, pmap, 0);
|
ESetWindowBackgroundPixmap(win, pmap, 0);
|
||||||
|
@ -484,7 +485,7 @@ EImageApplyToWin(EImage * im, Win win, int flags, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
ScaleRect(Win wsrc, EX_Drawable src, Win wdst, EX_Pixmap dst,
|
||||||
int sx, int sy, int sw, int sh,
|
int sx, int sy, int sw, int sh,
|
||||||
int dx, int dy, int dw, int dh, int flags)
|
int dx, int dy, int dw, int dh, int flags)
|
||||||
{
|
{
|
||||||
|
@ -494,7 +495,7 @@ ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
XTransform tr;
|
XTransform tr;
|
||||||
Picture psrc, pdst;
|
EX_Picture psrc, pdst;
|
||||||
double scale_x, scale_y;
|
double scale_x, scale_y;
|
||||||
|
|
||||||
scale_x = (double)sw / (double)dw;
|
scale_x = (double)sw / (double)dw;
|
||||||
|
@ -544,7 +545,7 @@ ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
ScaleTile(Win wsrc, EX_Drawable src, Win wdst, EX_Pixmap dst,
|
||||||
int dx, int dy, int dw, int dh, int scale)
|
int dx, int dy, int dw, int dh, int scale)
|
||||||
{
|
{
|
||||||
Imlib_Image im, tim;
|
Imlib_Image im, tim;
|
||||||
|
@ -581,7 +582,7 @@ ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
||||||
|
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
void
|
void
|
||||||
EDrawableDumpImage(Drawable draw, const char *txt)
|
EDrawableDumpImage(EX_Drawable draw, const char *txt)
|
||||||
{
|
{
|
||||||
static int seqn = 0;
|
static int seqn = 0;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
33
src/eimage.h
33
src/eimage.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -75,22 +75,22 @@ void EImageTile(EImage * im, EImage * tile, int flags, int tw,
|
||||||
int th, int dx, int dy, int dw, int dh, int ox,
|
int th, int dx, int dy, int dw, int dh, int ox,
|
||||||
int oy);
|
int oy);
|
||||||
|
|
||||||
EImage *EImageGrabDrawable(Drawable draw, Pixmap mask,
|
EImage *EImageGrabDrawable(EX_Drawable draw, EX_Pixmap mask,
|
||||||
int x, int y, int w, int h, int grab);
|
int x, int y, int w, int h, int grab);
|
||||||
EImage *EImageGrabDrawableScaled(Win win,
|
EImage *EImageGrabDrawableScaled(Win win,
|
||||||
Drawable draw, Pixmap mask,
|
EX_Drawable draw,
|
||||||
int x, int y, int w, int h,
|
EX_Pixmap mask, int x, int y,
|
||||||
int iw, int ih, int grab,
|
int w, int h, int iw, int ih,
|
||||||
int get_mask_from_shape);
|
int grab, int get_mask_from_shape);
|
||||||
|
|
||||||
void EImageRenderOnDrawable(EImage * im, Win win, Drawable draw,
|
void EImageRenderOnDrawable(EImage * im, Win win,
|
||||||
int flags,
|
EX_Drawable draw, int flags,
|
||||||
int x, int y, int w, int h);
|
int x, int y, int w, int h);
|
||||||
|
|
||||||
void EImageRenderPixmaps(EImage * im, Win win, int flags,
|
void EImageRenderPixmaps(EImage * im, Win win, int flags,
|
||||||
Pixmap * pmap, Pixmap * mask,
|
EX_Pixmap * pmap,
|
||||||
int w, int h);
|
EX_Pixmap * mask, int w, int h);
|
||||||
void EImagePixmapsFree(Pixmap pmap, Pixmap mask);
|
void EImagePixmapsFree(EX_Pixmap pmap, EX_Pixmap mask);
|
||||||
|
|
||||||
void EImageApplyToWin(EImage * im, Win win, int flags,
|
void EImageApplyToWin(EImage * im, Win win, int flags,
|
||||||
int w, int h);
|
int w, int h);
|
||||||
|
@ -102,13 +102,14 @@ void EImageColorModifierSetTables(EImageColorModifier * icm,
|
||||||
unsigned char *b,
|
unsigned char *b,
|
||||||
unsigned char *a);
|
unsigned char *a);
|
||||||
|
|
||||||
void ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
void ScaleRect(Win wsrc, EX_Drawable src, Win wdst,
|
||||||
int sx, int sy, int sw, int sh,
|
EX_Pixmap dst, int sx, int sy, int sw, int sh,
|
||||||
int dx, int dy, int dw, int dh, int flags);
|
|
||||||
void ScaleTile(Win wsrc, Drawable src, Win wdst, Pixmap dst,
|
|
||||||
int dx, int dy, int dw, int dh, int flags);
|
int dx, int dy, int dw, int dh, int flags);
|
||||||
|
void ScaleTile(Win wsrc, EX_Drawable src, Win wdst,
|
||||||
|
EX_Pixmap dst, int dx, int dy, int dw, int dh,
|
||||||
|
int flags);
|
||||||
|
|
||||||
void EDrawableDumpImage(Drawable draw, const char *txt);
|
void EDrawableDumpImage(EX_Drawable draw, const char *txt);
|
||||||
|
|
||||||
EImage *ThemeImageLoad(const char *file);
|
EImage *ThemeImageLoad(const char *file);
|
||||||
|
|
||||||
|
|
18
src/eobj.c
18
src/eobj.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -235,14 +235,14 @@ EobjInit(EObj * eo, int type, Win win, int x, int y, int w, int h,
|
||||||
EobjListStackAdd(eo, 1);
|
EobjListStackAdd(eo, 1);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EobjFini(EObj * eo)
|
EobjFini(EObj * eo)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
||||||
|
|
||||||
EobjListStackDel(eo);
|
EobjListStackDel(eo);
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ void
|
||||||
EobjDestroy(EObj * eo)
|
EobjDestroy(EObj * eo)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s: %#lx %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
|
||||||
|
|
||||||
EobjFini(eo);
|
EobjFini(eo);
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ EobjWindowDestroy(EObj * eo)
|
||||||
}
|
}
|
||||||
|
|
||||||
EObj *
|
EObj *
|
||||||
EobjRegisterOR(Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
|
EobjRegisterOR(EX_Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
|
||||||
int mapped __UNUSED__)
|
int mapped __UNUSED__)
|
||||||
{
|
{
|
||||||
EObj *eo = NULL;
|
EObj *eo = NULL;
|
||||||
|
@ -371,7 +371,7 @@ EobjRegisterOR(Window xwin __UNUSED__, XWindowAttributes * pxwa __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s: %#lx depth=%d argb=%d %s\n", __func__,
|
Eprintf("%s: %#x depth=%d argb=%d %s\n", __func__,
|
||||||
EobjGetXwin(eo), win->depth, win->argb, EobjGetName(eo));
|
EobjGetXwin(eo), win->depth, win->argb, EobjGetName(eo));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ void
|
||||||
EobjUnregister(EObj * eo)
|
EobjUnregister(EObj * eo)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s: %#lx type=%d: %s\n", __func__, EobjGetXwin(eo), eo->type,
|
Eprintf("%s: %#x type=%d: %s\n", __func__, EobjGetXwin(eo), eo->type,
|
||||||
EobjGetName(eo));
|
EobjGetName(eo));
|
||||||
#endif
|
#endif
|
||||||
EobjDestroy(eo);
|
EobjDestroy(eo);
|
||||||
|
@ -576,13 +576,13 @@ EobjShapeUpdate(EObj * eo, int propagate)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EobjGetPixmap(const EObj * eo)
|
EobjGetPixmap(const EObj * eo)
|
||||||
{
|
{
|
||||||
return ECompMgrWinGetPixmap(eo);
|
return ECompMgrWinGetPixmap(eo);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EobjGetPixmap(const EObj * eo __UNUSED__)
|
EobjGetPixmap(const EObj * eo __UNUSED__)
|
||||||
{
|
{
|
||||||
return NoXID;
|
return NoXID;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -155,7 +155,7 @@ EObj *EobjWindowCreate(int type, int x, int y, int w, int h,
|
||||||
int su, const char *name);
|
int su, const char *name);
|
||||||
void EobjWindowDestroy(EObj * eo);
|
void EobjWindowDestroy(EObj * eo);
|
||||||
|
|
||||||
EObj *EobjRegisterOR(Window xwin, XWindowAttributes * pxwa,
|
EObj *EobjRegisterOR(EX_Window xwin, XWindowAttributes * pxwa,
|
||||||
int mapped);
|
int mapped);
|
||||||
void EobjUnregister(EObj * eo);
|
void EobjUnregister(EObj * eo);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ int EobjRaise(EObj * eo);
|
||||||
int EobjLower(EObj * eo);
|
int EobjLower(EObj * eo);
|
||||||
void EobjShapeUpdate(EObj * eo, int propagate);
|
void EobjShapeUpdate(EObj * eo, int propagate);
|
||||||
void EobjsRepaint(void);
|
void EobjsRepaint(void);
|
||||||
Pixmap EobjGetPixmap(const EObj * eo);
|
EX_Pixmap EobjGetPixmap(const EObj * eo);
|
||||||
|
|
||||||
#if USE_GLX
|
#if USE_GLX
|
||||||
void EobjTextureCreate(EObj * eo);
|
void EobjTextureCreate(EObj * eo);
|
||||||
|
@ -193,7 +193,7 @@ void EobjListStackDel(EObj * eo);
|
||||||
int EobjListStackRaise(EObj * eo, int test);
|
int EobjListStackRaise(EObj * eo, int test);
|
||||||
int EobjListStackLower(EObj * eo, int test);
|
int EobjListStackLower(EObj * eo, int test);
|
||||||
int EobjListStackCheck(EObj * eo);
|
int EobjListStackCheck(EObj * eo);
|
||||||
EObj *EobjListStackFind(Window win);
|
EObj *EobjListStackFind(EX_Window win);
|
||||||
EObj *const *EobjListStackGet(int *num);
|
EObj *const *EobjListStackGet(int *num);
|
||||||
EObj *const *EobjListStackGetForDesk(int *num, Desk * dsk);
|
EObj *const *EobjListStackGetForDesk(int *num, Desk * dsk);
|
||||||
void EobjListFocusAdd(EObj * eo, int ontop);
|
void EobjListFocusAdd(EObj * eo, int ontop);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -179,7 +179,7 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags)
|
||||||
call_depth++;
|
call_depth++;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_MOVERESIZE))
|
if (EDebug(EDBUG_TYPE_MOVERESIZE))
|
||||||
Eprintf("doEwinMoveResize(%d,%d) %#lx f=%x d=%d %d+%d %d*%d %s\n",
|
Eprintf("doEwinMoveResize(%d,%d) %#x f=%x d=%d %d+%d %d*%d %s\n",
|
||||||
call_depth, Mode.mode, EwinGetClientXwin(ewin), flags,
|
call_depth, Mode.mode, EwinGetClientXwin(ewin), flags,
|
||||||
(dsk) ? (int)dsk->num : -1, x, y, w, h, EwinGetTitle(ewin));
|
(dsk) ? (int)dsk->num : -1, x, y, w, h, EwinGetTitle(ewin));
|
||||||
|
|
||||||
|
|
74
src/ewins.c
74
src/ewins.c
|
@ -66,7 +66,7 @@ static void EwinHandleEventsClient(Win win, XEvent * ev, void *prm);
|
||||||
static void EwinUnmap1(EWin * ewin);
|
static void EwinUnmap1(EWin * ewin);
|
||||||
static void EwinUnmap2(EWin * ewin);
|
static void EwinUnmap2(EWin * ewin);
|
||||||
|
|
||||||
Window
|
EX_Window
|
||||||
EwinGetClientXwin(const EWin * ewin)
|
EwinGetClientXwin(const EWin * ewin)
|
||||||
{
|
{
|
||||||
Win win = EwinGetClientWin(ewin);
|
Win win = EwinGetClientWin(ewin);
|
||||||
|
@ -120,7 +120,8 @@ EwinCreate(int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
EwinGetAttributes(EWin * ewin, Win win, Window xwin, XWindowAttributes * pxwa)
|
EwinGetAttributes(EWin * ewin, Win win, EX_Window xwin,
|
||||||
|
XWindowAttributes * pxwa)
|
||||||
{
|
{
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
|
|
||||||
|
@ -141,7 +142,7 @@ EwinGetAttributes(EWin * ewin, Win win, Window xwin, XWindowAttributes * pxwa)
|
||||||
ewin->client.bw = xwa.border_width;
|
ewin->client.bw = xwa.border_width;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SNAPS))
|
if (EDebug(EDBUG_TYPE_SNAPS))
|
||||||
Eprintf("Snap get attr %#lx: %4d+%4d %4dx%4d: %s\n",
|
Eprintf("Snap get attr %#x: %4d+%4d %4dx%4d: %s\n",
|
||||||
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||||
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
||||||
|
|
||||||
|
@ -152,7 +153,7 @@ static void
|
||||||
EwinGetHints(EWin * ewin)
|
EwinGetHints(EWin * ewin)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx\n", __func__, EwinGetClientXwin(ewin));
|
Eprintf("%s %#x\n", __func__, EwinGetClientXwin(ewin));
|
||||||
|
|
||||||
ICCCM_GetTitle(ewin);
|
ICCCM_GetTitle(ewin);
|
||||||
ICCCM_GetHints(ewin);
|
ICCCM_GetHints(ewin);
|
||||||
|
@ -275,7 +276,7 @@ EwinManage(EWin * ewin)
|
||||||
ESelectInput(EwinGetClientWin(ewin), ewin->client.event_mask);
|
ESelectInput(EwinGetClientWin(ewin), ewin->client.event_mask);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx frame=%#lx cont=%#lx st=%d\n", __func__,
|
Eprintf("%s %#x frame=%#x cont=%#x st=%d\n", __func__,
|
||||||
EwinGetClientXwin(ewin), EoGetXwin(ewin),
|
EwinGetClientXwin(ewin), EoGetXwin(ewin),
|
||||||
EwinGetContainerXwin(ewin), ewin->state.state);
|
EwinGetContainerXwin(ewin), ewin->state.state);
|
||||||
|
|
||||||
|
@ -366,7 +367,7 @@ EwinConfigure(EWin * ewin)
|
||||||
HintsSetClientList();
|
HintsSetClientList();
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@ EwinDestroy(EWin * ewin)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
|
|
||||||
EventCallbackUnregister(EoGetWin(ewin), EwinHandleEventsToplevel, ewin);
|
EventCallbackUnregister(EoGetWin(ewin), EwinHandleEventsToplevel, ewin);
|
||||||
|
@ -540,7 +541,7 @@ GetContextEwin(void)
|
||||||
|
|
||||||
done:
|
done:
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s %#lx %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
EwinGetTitle(ewin));
|
EwinGetTitle(ewin));
|
||||||
#endif
|
#endif
|
||||||
return ewin;
|
return ewin;
|
||||||
|
@ -552,7 +553,7 @@ SetContextEwin(EWin * ewin)
|
||||||
if (ewin && ewin->type == EWIN_TYPE_MENU)
|
if (ewin && ewin->type == EWIN_TYPE_MENU)
|
||||||
return;
|
return;
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s %#lx %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
EwinGetTitle(ewin));
|
EwinGetTitle(ewin));
|
||||||
#endif
|
#endif
|
||||||
Mode.context_ewin = ewin;
|
Mode.context_ewin = ewin;
|
||||||
|
@ -670,7 +671,7 @@ EwinUpdateShapeInfo(EWin * ewin)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
||||||
Eprintf("%s %#lx cont=%#lx shaped=%d\n", __func__,
|
Eprintf("%s %#x cont=%#x shaped=%d\n", __func__,
|
||||||
EwinGetClientXwin(ewin), EwinGetContainerXwin(ewin),
|
EwinGetClientXwin(ewin), EwinGetContainerXwin(ewin),
|
||||||
ewin->state.shaped);
|
ewin->state.shaped);
|
||||||
}
|
}
|
||||||
|
@ -688,7 +689,7 @@ EwinPropagateShapes(EWin * ewin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
||||||
Eprintf("%s %#lx frame=%#lx shaped=%d\n", __func__,
|
Eprintf("%s %#x frame=%#x shaped=%d\n", __func__,
|
||||||
EwinGetClientXwin(ewin), EoGetXwin(ewin), ewin->state.shaped);
|
EwinGetClientXwin(ewin), EoGetXwin(ewin), ewin->state.shaped);
|
||||||
|
|
||||||
EoShapeUpdate(ewin, 1);
|
EoShapeUpdate(ewin, 1);
|
||||||
|
@ -733,7 +734,7 @@ EwinStateUpdate(EWin * ewin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
AddToFamily(EWin * ewin, Window xwin, XWindowAttributes * pxwa, int startup)
|
AddToFamily(EWin * ewin, EX_Window xwin, XWindowAttributes * pxwa, int startup)
|
||||||
{
|
{
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
EWin *ewin2;
|
EWin *ewin2;
|
||||||
|
@ -766,7 +767,7 @@ AddToFamily(EWin * ewin, Window xwin, XWindowAttributes * pxwa, int startup)
|
||||||
if (EwinGetAttributes(ewin, NULL, xwin, pxwa))
|
if (EwinGetAttributes(ewin, NULL, xwin, pxwa))
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("Window is gone %#lx\n", xwin);
|
Eprintf("Window is gone %#x\n", xwin);
|
||||||
/* We got here by MapRequest. DestroyNotify should follow. */
|
/* We got here by MapRequest. DestroyNotify should follow. */
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -1119,7 +1120,7 @@ EwinWithdraw(EWin * ewin, Win to)
|
||||||
/* Only external clients should go here */
|
/* Only external clients should go here */
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
|
|
||||||
EGrabServer();
|
EGrabServer();
|
||||||
|
@ -1147,7 +1148,7 @@ EwinWithdraw(EWin * ewin, Win to)
|
||||||
static void
|
static void
|
||||||
EwinEventMapRequest(EWin * ewin, XEvent * ev)
|
EwinEventMapRequest(EWin * ewin, XEvent * ev)
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
|
|
||||||
xwin = ev->xmaprequest.window;
|
xwin = ev->xmaprequest.window;
|
||||||
|
|
||||||
|
@ -1160,7 +1161,7 @@ EwinEventMapRequest(EWin * ewin, XEvent * ev)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s: Already managing %s %#lx\n", __func__, "A",
|
Eprintf("%s: Already managing %s %#x\n", __func__, "A",
|
||||||
EwinGetClientXwin(ewin));
|
EwinGetClientXwin(ewin));
|
||||||
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
|
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
|
||||||
0, 0);
|
0, 0);
|
||||||
|
@ -1175,7 +1176,7 @@ EwinEventMapRequest(EWin * ewin, XEvent * ev)
|
||||||
if (ewin)
|
if (ewin)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s: Already managing %s %#lx\n", __func__, "B",
|
Eprintf("%s: Already managing %s %#x\n", __func__, "B",
|
||||||
EwinGetClientXwin(ewin));
|
EwinGetClientXwin(ewin));
|
||||||
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
|
EReparentWindow(EwinGetClientWin(ewin), EwinGetContainerWin(ewin),
|
||||||
0, 0);
|
0, 0);
|
||||||
|
@ -1190,7 +1191,7 @@ static void
|
||||||
EwinEventDestroy(EWin * ewin)
|
EwinEventDestroy(EWin * ewin)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
|
|
||||||
EwinDestroy(ewin);
|
EwinDestroy(ewin);
|
||||||
|
@ -1199,14 +1200,14 @@ EwinEventDestroy(EWin * ewin)
|
||||||
static void
|
static void
|
||||||
EwinEventReparent(EWin * ewin, XEvent * ev)
|
EwinEventReparent(EWin * ewin, XEvent * ev)
|
||||||
{
|
{
|
||||||
Window parent;
|
EX_Window parent;
|
||||||
|
|
||||||
EGrabServer();
|
EGrabServer();
|
||||||
|
|
||||||
parent = EoIsGone(ewin) ? NoXID : ev->xreparent.parent;
|
parent = EoIsGone(ewin) ? NoXID : ev->xreparent.parent;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d parent=%#lx: %s\n", __func__,
|
Eprintf("%s %#x st=%d parent=%#x: %s\n", __func__,
|
||||||
EwinGetClientXwin(ewin), ewin->state.state, parent,
|
EwinGetClientXwin(ewin), ewin->state.state, parent,
|
||||||
EwinGetTitle(ewin));
|
EwinGetTitle(ewin));
|
||||||
|
|
||||||
|
@ -1229,7 +1230,7 @@ EwinEventMap(EWin * ewin, XEvent * ev)
|
||||||
ewin->state.state = EWIN_STATE_MAPPED;
|
ewin->state.state = EWIN_STATE_MAPPED;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
|
|
||||||
/* If first time we may want to focus it (unless during startup) */
|
/* If first time we may want to focus it (unless during startup) */
|
||||||
|
@ -1245,7 +1246,7 @@ static void
|
||||||
EwinEventUnmap(EWin * ewin, XEvent * ev)
|
EwinEventUnmap(EWin * ewin, XEvent * ev)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_EWINS))
|
if (EDebug(EDBUG_TYPE_EWINS))
|
||||||
Eprintf("%s %#lx st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
Eprintf("%s %#x st=%d: %s\n", __func__, EwinGetClientXwin(ewin),
|
||||||
ewin->state.state, EwinGetTitle(ewin));
|
ewin->state.state, EwinGetTitle(ewin));
|
||||||
|
|
||||||
if (ewin->state.state == EWIN_STATE_STARTUP ||
|
if (ewin->state.state == EWIN_STATE_STARTUP ||
|
||||||
|
@ -1254,7 +1255,7 @@ EwinEventUnmap(EWin * ewin, XEvent * ev)
|
||||||
#if 0
|
#if 0
|
||||||
/* We get here after reparenting to container and occasionally in
|
/* We get here after reparenting to container and occasionally in
|
||||||
* other(?) situations */
|
* other(?) situations */
|
||||||
Eprintf("%s %#lx: Ignoring bogus Unmap event\n", __func__,
|
Eprintf("%s %#x: Ignoring bogus Unmap event\n", __func__,
|
||||||
EwinGetClientXwin(ewin));
|
EwinGetClientXwin(ewin));
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -1298,7 +1299,7 @@ EwinEventUnmap(EWin * ewin, XEvent * ev)
|
||||||
static void
|
static void
|
||||||
EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
|
EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
|
||||||
{
|
{
|
||||||
Window winrel;
|
EX_Window winrel;
|
||||||
EWin *ewin2;
|
EWin *ewin2;
|
||||||
int x = 0, y = 0, w = 0, h = 0;
|
int x = 0, y = 0, w = 0, h = 0;
|
||||||
XWindowChanges xwc;
|
XWindowChanges xwc;
|
||||||
|
@ -1438,7 +1439,7 @@ EwinEventShapeChange(EWin * ewin, XEvent * ev)
|
||||||
XShapeEvent *se = (XShapeEvent *) ev;
|
XShapeEvent *se = (XShapeEvent *) ev;
|
||||||
|
|
||||||
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
if (EDebug(EX_EVENT_SHAPE_NOTIFY))
|
||||||
Eprintf("%s %#lx %s: state.shaped=%d ev->shaped=%d\n", __func__,
|
Eprintf("%s %#x %s: state.shaped=%d ev->shaped=%d\n", __func__,
|
||||||
EwinGetClientXwin(ewin), EoGetName(ewin), ewin->state.shaped,
|
EwinGetClientXwin(ewin), EoGetName(ewin), ewin->state.shaped,
|
||||||
se->shaped);
|
se->shaped);
|
||||||
if (!se->shaped && !ewin->state.shaped)
|
if (!se->shaped && !ewin->state.shaped)
|
||||||
|
@ -1474,7 +1475,7 @@ EwinRaise(EWin * ewin)
|
||||||
num = EoRaise(ewin);
|
num = EoRaise(ewin);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_RAISELOWER))
|
if (EDebug(EDBUG_TYPE_RAISELOWER))
|
||||||
Eprintf("%s(%d) %#lx %s n=%d\n", __func__, call_depth,
|
Eprintf("%s(%d) %#x %s n=%d\n", __func__, call_depth,
|
||||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
|
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
|
||||||
|
|
||||||
if (num == 0) /* Quit if stacking is unchanged */
|
if (num == 0) /* Quit if stacking is unchanged */
|
||||||
|
@ -1511,7 +1512,7 @@ EwinLower(EWin * ewin)
|
||||||
num = EoLower(ewin);
|
num = EoLower(ewin);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_RAISELOWER))
|
if (EDebug(EDBUG_TYPE_RAISELOWER))
|
||||||
Eprintf("%s(%d) %#lx %s n=%d\n", __func__, call_depth,
|
Eprintf("%s(%d) %#x %s n=%d\n", __func__, call_depth,
|
||||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
|
EwinGetClientXwin(ewin), EwinGetTitle(ewin), num);
|
||||||
|
|
||||||
if (num == 0) /* Quit if stacking is unchanged */
|
if (num == 0) /* Quit if stacking is unchanged */
|
||||||
|
@ -2241,7 +2242,8 @@ EwinsMoveStickyToDesk(Desk * dsk)
|
||||||
void
|
void
|
||||||
EwinsManage(void)
|
EwinsManage(void)
|
||||||
{
|
{
|
||||||
Window *xwins, xwin, par, rt;
|
Window *xwins, par, rt;
|
||||||
|
EX_Window xwin;
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
unsigned int i, num;
|
unsigned int i, num;
|
||||||
|
|
||||||
|
@ -2359,7 +2361,7 @@ _EwinEventEwinCheck(const char *txt, XEvent * ev, EWin * ewin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static EWin *
|
static EWin *
|
||||||
_EwinEventEwinFind(XEvent * ev, Window xwin)
|
_EwinEventEwinFind(XEvent * ev, EX_Window xwin)
|
||||||
{
|
{
|
||||||
EWin *ewin;
|
EWin *ewin;
|
||||||
|
|
||||||
|
@ -2373,7 +2375,7 @@ _EwinEventEwinFind(XEvent * ev, Window xwin)
|
||||||
static int
|
static int
|
||||||
EwinHandleContainerEvents(EWin * ewin, XEvent * ev)
|
EwinHandleContainerEvents(EWin * ewin, XEvent * ev)
|
||||||
{
|
{
|
||||||
Window xwin = EwinGetClientXwin(ewin);
|
EX_Window xwin = EwinGetClientXwin(ewin);
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
{
|
{
|
||||||
|
@ -2502,7 +2504,7 @@ EwinHandleEventsContainer(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
if (EwinHandleContainerEvents(ewin, ev))
|
if (EwinHandleContainerEvents(ewin, ev))
|
||||||
break;
|
break;
|
||||||
#if DEBUG_EWIN_EVENTS
|
#if DEBUG_EWIN_EVENTS
|
||||||
Eprintf("%s: type=%2d win=%#lx: %s\n", __func__,
|
Eprintf("%s: type=%2d win=%#x: %s\n", __func__,
|
||||||
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -2559,7 +2561,7 @@ EwinHandleEventsClient(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#if DEBUG_EWIN_EVENTS
|
#if DEBUG_EWIN_EVENTS
|
||||||
Eprintf("%s: type=%2d win=%#lx: %s\n", __func__,
|
Eprintf("%s: type=%2d win=%#x: %s\n", __func__,
|
||||||
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
ev->type, EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -2578,7 +2580,7 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
||||||
break;
|
break;
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s ConfigureRequest %#lx\n", __func__,
|
Eprintf("%s ConfigureRequest %#x\n", __func__,
|
||||||
ev->xconfigurerequest.window);
|
ev->xconfigurerequest.window);
|
||||||
#endif
|
#endif
|
||||||
ewin = EwinFindByClient(ev->xconfigurerequest.window);
|
ewin = EwinFindByClient(ev->xconfigurerequest.window);
|
||||||
|
@ -2586,14 +2588,14 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
||||||
break;
|
break;
|
||||||
case ResizeRequest:
|
case ResizeRequest:
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s ResizeRequest %#lx\n", __func__, ev->xresizerequest.window);
|
Eprintf("%s ResizeRequest %#x\n", __func__, ev->xresizerequest.window);
|
||||||
#endif
|
#endif
|
||||||
ewin = EwinFindByClient(ev->xresizerequest.window);
|
ewin = EwinFindByClient(ev->xresizerequest.window);
|
||||||
EwinEventResizeRequest(ewin, ev);
|
EwinEventResizeRequest(ewin, ev);
|
||||||
break;
|
break;
|
||||||
case CirculateRequest:
|
case CirculateRequest:
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s CirculateRequest %#lx\n", __func__,
|
Eprintf("%s CirculateRequest %#x\n", __func__,
|
||||||
ev->xcirculaterequest.window);
|
ev->xcirculaterequest.window);
|
||||||
#endif
|
#endif
|
||||||
EwinEventCirculateRequest(NULL, ev);
|
EwinEventCirculateRequest(NULL, ev);
|
||||||
|
@ -2634,7 +2636,7 @@ EwinHandleEventsRoot(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("%s: type=%2d win=%#lx\n", __func__, ev->type, ev->xany.window);
|
Eprintf("%s: type=%2d win=%#x\n", __func__, ev->type, ev->xany.window);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
14
src/ewins.h
14
src/ewins.h
|
@ -169,19 +169,19 @@ struct _ewin {
|
||||||
/* WM_HINTS */
|
/* WM_HINTS */
|
||||||
char need_input;
|
char need_input;
|
||||||
char start_iconified;
|
char start_iconified;
|
||||||
Pixmap icon_pmap, icon_mask;
|
EX_Pixmap icon_pmap, icon_mask;
|
||||||
Window icon_win;
|
EX_Window icon_win;
|
||||||
Window group;
|
EX_Window group;
|
||||||
char urgency;
|
char urgency;
|
||||||
/* WM_PROTOCOLS */
|
/* WM_PROTOCOLS */
|
||||||
char take_focus;
|
char take_focus;
|
||||||
char delete_window;
|
char delete_window;
|
||||||
/* WM_TRANSIENT_FOR */
|
/* WM_TRANSIENT_FOR */
|
||||||
signed char transient;
|
signed char transient;
|
||||||
Window transient_for; /* We are a transient for ... */
|
EX_Window transient_for; /* We are a transient for ... */
|
||||||
int transient_count; /* We have <N> transients */
|
int transient_count; /* We have <N> transients */
|
||||||
/* WM_CLIENT_LEADER */
|
/* WM_CLIENT_LEADER */
|
||||||
Window client_leader;
|
EX_Window client_leader;
|
||||||
|
|
||||||
/* WM_NORMAL_HINTS */
|
/* WM_NORMAL_HINTS */
|
||||||
int width_min, width_max;
|
int width_min, width_max;
|
||||||
|
@ -354,7 +354,7 @@ int DrawEwinShapeNeedsGrab(int mode);
|
||||||
#define EWIN_CHANGE_OPACITY (1<<5)
|
#define EWIN_CHANGE_OPACITY (1<<5)
|
||||||
#define EWIN_CHANGE_ATTENTION (1<<6)
|
#define EWIN_CHANGE_ATTENTION (1<<6)
|
||||||
|
|
||||||
Window EwinGetClientXwin(const EWin * ewin);
|
EX_Window EwinGetClientXwin(const EWin * ewin);
|
||||||
|
|
||||||
void EwinShapeSet(EWin * ewin);
|
void EwinShapeSet(EWin * ewin);
|
||||||
int EwinRaise(EWin * ewin);
|
int EwinRaise(EWin * ewin);
|
||||||
|
@ -458,7 +458,7 @@ void EwinOpFullscreen(EWin * ewin, int source, int on);
|
||||||
|
|
||||||
/* finders.c */
|
/* finders.c */
|
||||||
EWin *EwinFindByPtr(const EWin * ewin);
|
EWin *EwinFindByPtr(const EWin * ewin);
|
||||||
EWin *EwinFindByClient(Window win);
|
EWin *EwinFindByClient(EX_Window win);
|
||||||
EWin **EwinsFindByExpr(const char *match, int *pnum, int *pflags);
|
EWin **EwinsFindByExpr(const char *match, int *pnum, int *pflags);
|
||||||
EWin *EwinFindByExpr(const char *match);
|
EWin *EwinFindByExpr(const char *match);
|
||||||
|
|
||||||
|
|
16
src/ewmh.c
16
src/ewmh.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2013 Kim Woelders
|
* Copyright (C) 2003-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -93,7 +93,7 @@ atom_list_set(EX_Atom * atoms, int size, int *count, EX_Atom atom, int set)
|
||||||
* Initialize EWMH stuff
|
* Initialize EWMH stuff
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
EWMH_Init(Window win_wm_check)
|
EWMH_Init(EX_Window win_wm_check)
|
||||||
{
|
{
|
||||||
EX_Atom atom_list[64];
|
EX_Atom atom_list[64];
|
||||||
int atom_count;
|
int atom_count;
|
||||||
|
@ -341,9 +341,9 @@ EWMH_SetClientStacking(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EWMH_SetActiveWindow(Window win)
|
EWMH_SetActiveWindow(EX_Window win)
|
||||||
{
|
{
|
||||||
static Window win_last_set = NoXID;
|
static EX_Window win_last_set = NoXID;
|
||||||
|
|
||||||
if (win == win_last_set)
|
if (win == win_last_set)
|
||||||
return;
|
return;
|
||||||
|
@ -357,7 +357,7 @@ EWMH_SetActiveWindow(Window win)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
EWMH_SetWindowName(Window win, const char *name)
|
EWMH_SetWindowName(EX_Window win, const char *name)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ EWMH_DelWindowHints(const EWin * ewin)
|
||||||
* Process property change
|
* Process property change
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change)
|
EWMH_ProcessPropertyChange(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
if (atom_change == EX_ATOM_NET_WM_NAME)
|
if (atom_change == EX_ATOM_NET_WM_NAME)
|
||||||
{
|
{
|
||||||
|
@ -874,7 +874,7 @@ EWMH_ProcessClientClientMessage(EWin * ewin, XClientMessageEvent * ev)
|
||||||
{
|
{
|
||||||
int source;
|
int source;
|
||||||
|
|
||||||
/* Time ts; */
|
/* EX_Time ts; */
|
||||||
|
|
||||||
if (ev->message_type == EX_ATOM_NET_ACTIVE_WINDOW)
|
if (ev->message_type == EX_ATOM_NET_ACTIVE_WINDOW)
|
||||||
{
|
{
|
||||||
|
@ -915,7 +915,7 @@ EWMH_ProcessClientClientMessage(EWin * ewin, XClientMessageEvent * ev)
|
||||||
* in one message.
|
* in one message.
|
||||||
*/
|
*/
|
||||||
unsigned int action;
|
unsigned int action;
|
||||||
Atom atom, atom2;
|
EX_Atom atom, atom2;
|
||||||
|
|
||||||
action = ev->data.l[0];
|
action = ev->data.l[0];
|
||||||
atom = ev->data.l[1];
|
atom = ev->data.l[1];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -34,20 +34,20 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Cursor curs;
|
EX_Cursor curs;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
Window cwin;
|
EX_Window cwin;
|
||||||
} EiwData;
|
} EiwData;
|
||||||
|
|
||||||
typedef void (EiwLoopFunc) (Window win, EImage * im, EiwData * d);
|
typedef void (EiwLoopFunc) (EX_Window win, EImage * im, EiwData * d);
|
||||||
|
|
||||||
#if USE_EIWC_RENDER
|
#if USE_EIWC_RENDER
|
||||||
#include <Imlib2.h>
|
#include <Imlib2.h>
|
||||||
|
|
||||||
static void _eiw_render_loop(Window win, EImage * im, EiwData * d);
|
static void _eiw_render_loop(EX_Window win, EImage * im, EiwData * d);
|
||||||
|
|
||||||
static EiwLoopFunc *
|
static EiwLoopFunc *
|
||||||
_eiw_render_init(Window win __UNUSED__, EiwData * d)
|
_eiw_render_init(EX_Window win __UNUSED__, EiwData * d)
|
||||||
{
|
{
|
||||||
Visual *vis;
|
Visual *vis;
|
||||||
|
|
||||||
|
@ -64,12 +64,12 @@ _eiw_render_init(Window win __UNUSED__, EiwData * d)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eiw_render_loop(Window win, EImage * im, EiwData * d)
|
_eiw_render_loop(EX_Window win, EImage * im, EiwData * d)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
|
|
||||||
EImageGetSize(im, &w, &h);
|
EImageGetSize(im, &w, &h);
|
||||||
|
|
||||||
|
@ -93,12 +93,12 @@ _eiw_render_loop(Window win, EImage * im, EiwData * d)
|
||||||
|
|
||||||
#if USE_EIWC_WINDOW
|
#if USE_EIWC_WINDOW
|
||||||
|
|
||||||
static void _eiw_window_loop(Window win, EImage * im, EiwData * d);
|
static void _eiw_window_loop(EX_Window win, EImage * im, EiwData * d);
|
||||||
|
|
||||||
static EiwLoopFunc *
|
static EiwLoopFunc *
|
||||||
_eiw_window_init(Window win, EiwData * d)
|
_eiw_window_init(EX_Window win, EiwData * d)
|
||||||
{
|
{
|
||||||
Pixmap pmap, mask;
|
EX_Pixmap pmap, mask;
|
||||||
XColor cl;
|
XColor cl;
|
||||||
|
|
||||||
d->cwin = XCreateWindow(disp, win, 0, 0, 32, 32, 0, CopyFromParent,
|
d->cwin = XCreateWindow(disp, win, 0, 0, 32, 32, 0, CopyFromParent,
|
||||||
|
@ -120,9 +120,9 @@ _eiw_window_init(Window win, EiwData * d)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_eiw_window_loop(Window win, EImage * im, EiwData * d)
|
_eiw_window_loop(EX_Window win, EImage * im, EiwData * d)
|
||||||
{
|
{
|
||||||
Pixmap pmap, mask;
|
EX_Pixmap pmap, mask;
|
||||||
Window ww;
|
Window ww;
|
||||||
int dd, x, y, w, h;
|
int dd, x, y, w, h;
|
||||||
unsigned int mm;
|
unsigned int mm;
|
||||||
|
@ -140,14 +140,14 @@ _eiw_window_loop(Window win, EImage * im, EiwData * d)
|
||||||
|
|
||||||
#endif /* USE_EIWC_WINDOW */
|
#endif /* USE_EIWC_WINDOW */
|
||||||
|
|
||||||
static Window
|
static EX_Window
|
||||||
ExtInitWinMain(void)
|
ExtInitWinMain(void)
|
||||||
{
|
{
|
||||||
int i, loop, err;
|
int i, loop, err;
|
||||||
EX_Window win;
|
EX_Window win;
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
GC gc;
|
GC gc;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
EX_Atom a;
|
EX_Atom a;
|
||||||
EiwData eiwd;
|
EiwData eiwd;
|
||||||
EiwLoopFunc *eiwc_loop_func;
|
EiwLoopFunc *eiwc_loop_func;
|
||||||
|
@ -248,11 +248,11 @@ ExtInitWinMain(void)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Window
|
EX_Window
|
||||||
ExtInitWinCreate(void)
|
ExtInitWinCreate(void)
|
||||||
{
|
{
|
||||||
EX_Window win_ex; /* Hmmm.. */
|
EX_Window win_ex; /* Hmmm.. */
|
||||||
Window win;
|
EX_Window win;
|
||||||
EX_Atom a;
|
EX_Atom a;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SESSION))
|
if (EDebug(EDBUG_TYPE_SESSION))
|
||||||
|
@ -281,7 +281,7 @@ ExtInitWinCreate(void)
|
||||||
|
|
||||||
win = win_ex;
|
win = win_ex;
|
||||||
if (EDebug(EDBUG_TYPE_SESSION))
|
if (EDebug(EDBUG_TYPE_SESSION))
|
||||||
Eprintf("ExtInitWinCreate - parent - %#lx\n", win);
|
Eprintf("ExtInitWinCreate - parent - %#x\n", win);
|
||||||
|
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
@ -304,15 +304,15 @@ ExtInitWinCreate(void)
|
||||||
return NoXID;
|
return NoXID;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Window init_win_ext = NoXID;
|
static EX_Window init_win_ext = NoXID;
|
||||||
|
|
||||||
void
|
void
|
||||||
ExtInitWinSet(Window win)
|
ExtInitWinSet(EX_Window win)
|
||||||
{
|
{
|
||||||
init_win_ext = win;
|
init_win_ext = win;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window
|
EX_Window
|
||||||
ExtInitWinGet(void)
|
ExtInitWinGet(void)
|
||||||
{
|
{
|
||||||
return init_win_ext;
|
return init_win_ext;
|
||||||
|
@ -325,7 +325,7 @@ ExtInitWinKill(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SESSION))
|
if (EDebug(EDBUG_TYPE_SESSION))
|
||||||
Eprintf("Kill init window %#lx\n", init_win_ext);
|
Eprintf("Kill init window %#x\n", init_win_ext);
|
||||||
XUnmapWindow(disp, init_win_ext);
|
XUnmapWindow(disp, init_win_ext);
|
||||||
init_win_ext = NoXID;
|
init_win_ext = NoXID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2008-2010 Kim Woelders
|
* Copyright (C) 2008-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -45,7 +45,7 @@ EwinFindByPtr(const EWin * ewin)
|
||||||
}
|
}
|
||||||
|
|
||||||
EWin *
|
EWin *
|
||||||
EwinFindByClient(Window win)
|
EwinFindByClient(EX_Window win)
|
||||||
{
|
{
|
||||||
EWin *const *ewins;
|
EWin *const *ewins;
|
||||||
int i, num;
|
int i, num;
|
||||||
|
@ -60,7 +60,7 @@ EwinFindByClient(Window win)
|
||||||
}
|
}
|
||||||
|
|
||||||
static EWin *
|
static EWin *
|
||||||
EwinFindByChildren(Window win)
|
EwinFindByChildren(EX_Window win)
|
||||||
{
|
{
|
||||||
EWin *const *ewins;
|
EWin *const *ewins;
|
||||||
int i, j, num;
|
int i, j, num;
|
||||||
|
|
22
src/focus.c
22
src/focus.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -74,7 +74,7 @@ FocusEwinValid(EWin * ewin, int want_on_screen, int click, int want_visible)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Eprintf("FocusEwinValid %#lx %s: st=%d sh=%d inh=%d cl=%d(%d) vis=%d(%d)\n",
|
Eprintf("FocusEwinValid %#x %s: st=%d sh=%d inh=%d cl=%d(%d) vis=%d(%d)\n",
|
||||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin),
|
EwinGetClientXwin(ewin), EwinGetTitle(ewin),
|
||||||
ewin->state.state, EoIsShown(ewin), ewin->state.inhibit_focus,
|
ewin->state.state, EoIsShown(ewin), ewin->state.inhibit_focus,
|
||||||
click, ewin->props.focusclick, want_visible, ewin->state.visibility);
|
click, ewin->props.focusclick, want_visible, ewin->state.visibility);
|
||||||
|
@ -224,7 +224,7 @@ ClickGrabsSet(EWin * ewin)
|
||||||
GrabButtonSet(AnyButton, AnyModifier, EwinGetClientConWin(ewin),
|
GrabButtonSet(AnyButton, AnyModifier, EwinGetClientConWin(ewin),
|
||||||
ButtonPressMask, ECSR_PGRAB, 1);
|
ButtonPressMask, ECSR_PGRAB, 1);
|
||||||
if (EDebug(EDBUG_TYPE_GRABS))
|
if (EDebug(EDBUG_TYPE_GRABS))
|
||||||
Eprintf("ClickGrabsSet: %#lx set %s\n",
|
Eprintf("ClickGrabsSet: %#x set %s\n",
|
||||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
||||||
ewin->state.click_grab_isset = 1;
|
ewin->state.click_grab_isset = 1;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ ClickGrabsSet(EWin * ewin)
|
||||||
GrabButtonRelease(AnyButton, AnyModifier,
|
GrabButtonRelease(AnyButton, AnyModifier,
|
||||||
EwinGetClientConWin(ewin));
|
EwinGetClientConWin(ewin));
|
||||||
if (EDebug(EDBUG_TYPE_GRABS))
|
if (EDebug(EDBUG_TYPE_GRABS))
|
||||||
Eprintf("ClickGrabsSet: %#lx unset %s\n",
|
Eprintf("ClickGrabsSet: %#x unset %s\n",
|
||||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
||||||
ewin->state.click_grab_isset = 0;
|
ewin->state.click_grab_isset = 0;
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ doFocusToEwin(EWin * ewin, int why)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_FOCUS))
|
if (EDebug(EDBUG_TYPE_FOCUS))
|
||||||
Eprintf("doFocusToEWin %#lx %s why=%d\n",
|
Eprintf("doFocusToEWin %#x %s why=%d\n",
|
||||||
(ewin) ? EwinGetClientXwin(ewin) : 0,
|
(ewin) ? EwinGetClientXwin(ewin) : 0,
|
||||||
(ewin) ? EwinGetTitle(ewin) : "None", why);
|
(ewin) ? EwinGetTitle(ewin) : "None", why);
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ void
|
||||||
FocusToEWin(EWin * ewin, int why)
|
FocusToEWin(EWin * ewin, int why)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_FOCUS))
|
if (EDebug(EDBUG_TYPE_FOCUS))
|
||||||
Eprintf("FocusToEWin(%d) %#lx %s why=%d\n", focus_inhibit,
|
Eprintf("FocusToEWin(%d) %#x %s why=%d\n", focus_inhibit,
|
||||||
(ewin) ? EwinGetClientXwin(ewin) : 0,
|
(ewin) ? EwinGetClientXwin(ewin) : 0,
|
||||||
(ewin) ? EwinGetTitle(ewin) : "None", why);
|
(ewin) ? EwinGetTitle(ewin) : "None", why);
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ FocusNewDesk(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_FocusScreenSendEvent(Window xwin, int x, int y, Time t, int enter)
|
_FocusScreenSendEvent(EX_Window xwin, int x, int y, EX_Time t, int enter)
|
||||||
{
|
{
|
||||||
XEvent xe;
|
XEvent xe;
|
||||||
|
|
||||||
|
@ -562,8 +562,8 @@ _FocusScreenSendEvent(Window xwin, int x, int y, Time t, int enter)
|
||||||
void
|
void
|
||||||
FocusScreen(int scr)
|
FocusScreen(int scr)
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Time t;
|
EX_Time t;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (scr < 0 || scr >= ScreenCount(disp))
|
if (scr < 0 || scr >= ScreenCount(disp))
|
||||||
|
@ -701,7 +701,7 @@ FocusHandleClick(EWin * ewin, Win win)
|
||||||
|
|
||||||
/* Allow click to pass thorugh */
|
/* Allow click to pass thorugh */
|
||||||
if (EDebug(EDBUG_TYPE_GRABS))
|
if (EDebug(EDBUG_TYPE_GRABS))
|
||||||
Eprintf("FocusHandleClick %#lx %#lx\n", WinGetXwin(win),
|
Eprintf("FocusHandleClick %#x %#x\n", WinGetXwin(win),
|
||||||
EwinGetContainerXwin(ewin));
|
EwinGetContainerXwin(ewin));
|
||||||
if (win == EwinGetClientConWin(ewin))
|
if (win == EwinGetClientConWin(ewin))
|
||||||
{
|
{
|
||||||
|
@ -1067,7 +1067,7 @@ FocusIpc(const char *params)
|
||||||
|
|
||||||
ewin = GetFocusEwin();
|
ewin = GetFocusEwin();
|
||||||
if (ewin)
|
if (ewin)
|
||||||
IpcPrintf("Focused: %#lx\n", EwinGetClientXwin(ewin));
|
IpcPrintf("Focused: %#x\n", EwinGetClientXwin(ewin));
|
||||||
else
|
else
|
||||||
IpcPrintf("Focused: none\n");
|
IpcPrintf("Focused: none\n");
|
||||||
}
|
}
|
||||||
|
|
6
src/fx.c
6
src/fx.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -62,7 +62,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Win win;
|
Win win;
|
||||||
Pixmap above;
|
EX_Pixmap above;
|
||||||
int count;
|
int count;
|
||||||
float incv, inch;
|
float incv, inch;
|
||||||
GC gc1;
|
GC gc1;
|
||||||
|
@ -172,7 +172,7 @@ FX_Ripple_Ops(int op)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Win win;
|
Win win;
|
||||||
Pixmap above;
|
EX_Pixmap above;
|
||||||
int count;
|
int count;
|
||||||
float incv, inch, incx;
|
float incv, inch, incx;
|
||||||
GC gc1;
|
GC gc1;
|
||||||
|
|
|
@ -474,7 +474,7 @@ GlwinRun(EObj * eobj __UNUSED__, int remaining __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
GlwinKeyPress(GLWindow * gw, KeySym keysym)
|
GlwinKeyPress(GLWindow * gw, EX_KeySym keysym)
|
||||||
{
|
{
|
||||||
switch (keysym)
|
switch (keysym)
|
||||||
{
|
{
|
||||||
|
@ -576,7 +576,7 @@ static void
|
||||||
GlwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
GlwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
{
|
{
|
||||||
GLWindow *gw = (GLWindow *) prm;
|
GLWindow *gw = (GLWindow *) prm;
|
||||||
KeySym keysym;
|
EX_KeySym keysym;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
|
|
28
src/gnome.c
28
src/gnome.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -287,13 +287,13 @@
|
||||||
|
|
||||||
#if 0 /* Does nothing useful */
|
#if 0 /* Does nothing useful */
|
||||||
static void
|
static void
|
||||||
GNOME_GetHintIcons(EWin * ewin, Atom atom_change)
|
GNOME_GetHintIcons(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num, i;
|
int num, i;
|
||||||
EX_ID *plst;
|
EX_ID *plst;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
|
|
||||||
if (EwinIsInternal(ewin))
|
if (EwinIsInternal(ewin))
|
||||||
return;
|
return;
|
||||||
|
@ -318,7 +318,7 @@ GNOME_GetHintIcons(EWin * ewin, Atom atom_change)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GNOME_GetHintLayer(EWin * ewin, Atom atom_change)
|
GNOME_GetHintLayer(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -342,7 +342,7 @@ GNOME_GetHintLayer(EWin * ewin, Atom atom_change)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GNOME_GetHintState(EWin * ewin, Atom atom_change)
|
GNOME_GetHintState(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -373,7 +373,7 @@ GNOME_GetHintState(EWin * ewin, Atom atom_change)
|
||||||
|
|
||||||
#if 0 /* Does nothing */
|
#if 0 /* Does nothing */
|
||||||
static void
|
static void
|
||||||
GNOME_GetHintAppState(EWin * ewin, Atom atom_change)
|
GNOME_GetHintAppState(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -397,7 +397,7 @@ GNOME_GetHintAppState(EWin * ewin, Atom atom_change)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GNOME_GetHintDesktop(EWin * ewin, Atom atom_change)
|
GNOME_GetHintDesktop(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -420,7 +420,7 @@ GNOME_GetHintDesktop(EWin * ewin, Atom atom_change)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GNOME_GetHint(EWin * ewin, Atom atom_change)
|
GNOME_GetHint(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -502,7 +502,7 @@ GNOME_SetEwinDesk(const EWin * ewin)
|
||||||
|
|
||||||
#if 0 /* Does nothing */
|
#if 0 /* Does nothing */
|
||||||
static void
|
static void
|
||||||
GNOME_GetExpandedSize(EWin * ewin, Atom atom_change)
|
GNOME_GetExpandedSize(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get = 0;
|
static EX_Atom atom_get = 0;
|
||||||
int num;
|
int num;
|
||||||
|
@ -578,7 +578,7 @@ GNOME_SetCurrentDesk(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GNOME_SetWMCheck(Window win_wm_check)
|
GNOME_SetWMCheck(EX_Window win_wm_check)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_set = 0;
|
static EX_Atom atom_set = 0;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
|
@ -692,7 +692,7 @@ void
|
||||||
GNOME_DelHints(const EWin * ewin)
|
GNOME_DelHints(const EWin * ewin)
|
||||||
{
|
{
|
||||||
static EX_Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 };
|
static EX_Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 };
|
||||||
Window win;
|
EX_Window win;
|
||||||
|
|
||||||
if (!atom_get[0])
|
if (!atom_get[0])
|
||||||
{
|
{
|
||||||
|
@ -714,7 +714,7 @@ GNOME_DelHints(const EWin * ewin)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GNOME_GetHints(EWin * ewin, Atom atom_change)
|
GNOME_GetHints(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
GNOME_GetHintDesktop(ewin, atom_change);
|
GNOME_GetHintDesktop(ewin, atom_change);
|
||||||
GNOME_GetHintLayer(ewin, atom_change);
|
GNOME_GetHintLayer(ewin, atom_change);
|
||||||
|
@ -728,7 +728,7 @@ GNOME_GetHints(EWin * ewin, Atom atom_change)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GNOME_SetHints(Window win_wm_check)
|
GNOME_SetHints(EX_Window win_wm_check)
|
||||||
{
|
{
|
||||||
GNOME_SetWMNameVer();
|
GNOME_SetWMNameVer();
|
||||||
GNOME_SetUsedHints();
|
GNOME_SetUsedHints();
|
||||||
|
|
|
@ -98,7 +98,7 @@ GrabPointerSet(Win win, unsigned int csr, int confine __UNUSED__)
|
||||||
rc = XIGrabDevice(disp, DEV_PTR, WinGetXwin(win), CurrentTime, ECsrGet(csr),
|
rc = XIGrabDevice(disp, DEV_PTR, WinGetXwin(win), CurrentTime, ECsrGet(csr),
|
||||||
GrabModeAsync, GrabModeAsync, False, &em.em);
|
GrabModeAsync, GrabModeAsync, False, &em.em);
|
||||||
#else
|
#else
|
||||||
Window confine_to = (confine) ? WinGetXwin(VROOT) : NoXID;
|
EX_Window confine_to = (confine) ? WinGetXwin(VROOT) : NoXID;
|
||||||
|
|
||||||
rc = XGrabPointer(disp, WinGetXwin(win), False,
|
rc = XGrabPointer(disp, WinGetXwin(win), False,
|
||||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||||
|
@ -111,8 +111,7 @@ GrabPointerSet(Win win, unsigned int csr, int confine __UNUSED__)
|
||||||
Mode.grabs.pointer_grab_active = 1;
|
Mode.grabs.pointer_grab_active = 1;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_GRABS))
|
if (EDebug(EDBUG_TYPE_GRABS))
|
||||||
Eprintf("%s: %#lx, rc=%d\n", __func__, Mode.grabs.pointer_grab_window,
|
Eprintf("%s: %#x, rc=%d\n", __func__, Mode.grabs.pointer_grab_window, rc);
|
||||||
rc);
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +126,7 @@ GrabPointerRelease(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_GRABS))
|
if (EDebug(EDBUG_TYPE_GRABS))
|
||||||
Eprintf("%s: %#lx\n", __func__, Mode.grabs.pointer_grab_window);
|
Eprintf("%s: %#x\n", __func__, Mode.grabs.pointer_grab_window);
|
||||||
|
|
||||||
Mode.grabs.pointer_grab_active = 0;
|
Mode.grabs.pointer_grab_active = 0;
|
||||||
Mode.grabs.pointer_grab_window = NoXID;
|
Mode.grabs.pointer_grab_window = NoXID;
|
||||||
|
@ -182,7 +181,7 @@ GrabButtonSet(unsigned int button, unsigned int modifiers, Win win,
|
||||||
pointer_mode, keyboard_mode, owner_events,
|
pointer_mode, keyboard_mode, owner_events,
|
||||||
&em.em, num_modifiers, modifiers_inouts);
|
&em.em, num_modifiers, modifiers_inouts);
|
||||||
#else
|
#else
|
||||||
Window confine_to = (confine) ? WinGetXwin(win) : NoXID;
|
EX_Window confine_to = (confine) ? WinGetXwin(win) : NoXID;
|
||||||
|
|
||||||
if (modifiers == AnyModifier)
|
if (modifiers == AnyModifier)
|
||||||
{
|
{
|
||||||
|
|
18
src/hints.c
18
src/hints.c
|
@ -65,7 +65,7 @@ static unsigned int desk_info = 0;
|
||||||
void
|
void
|
||||||
HintsInit(void)
|
HintsInit(void)
|
||||||
{
|
{
|
||||||
Window win;
|
EX_Window win;
|
||||||
|
|
||||||
ex_atoms_get(atoms_misc_names, N_ITEMS(atoms_misc_names), atoms_misc);
|
ex_atoms_get(atoms_misc_names, N_ITEMS(atoms_misc_names), atoms_misc);
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ HintsSetDesktopViewport(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
HintsSetActiveWindow(Window win)
|
HintsSetActiveWindow(EX_Window win)
|
||||||
{
|
{
|
||||||
EWMH_SetActiveWindow(win);
|
EWMH_SetActiveWindow(win);
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ HintsProcessRootClientMessage(XClientMessageEvent * event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
HintsGetRootPixmap(Win win)
|
HintsGetRootPixmap(Win win)
|
||||||
{
|
{
|
||||||
EX_Pixmap pm;
|
EX_Pixmap pm;
|
||||||
|
@ -324,7 +324,7 @@ HintsGetRootPixmap(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
HintsSetRootInfo(Win win, Pixmap pmap, unsigned int color)
|
HintsSetRootInfo(Win win, EX_Pixmap pmap, unsigned int color)
|
||||||
{
|
{
|
||||||
EX_Pixmap pm;
|
EX_Pixmap pm;
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ EHintsSetInfo(const EWin * ewin)
|
||||||
ewin->normal_border->name);
|
ewin->normal_border->name);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SNAPS))
|
if (EDebug(EDBUG_TYPE_SNAPS))
|
||||||
Eprintf("Snap set einf %#lx: %4d+%4d %4dx%4d: %s\n",
|
Eprintf("Snap set einf %#x: %4d+%4d %4dx%4d: %s\n",
|
||||||
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||||
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,7 @@ EHintsGetInfo(EWin * ewin)
|
||||||
Efree(str);
|
Efree(str);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SNAPS))
|
if (EDebug(EDBUG_TYPE_SNAPS))
|
||||||
Eprintf("Snap get einf %#lx: %4d+%4d %4dx%4d: %s\n",
|
Eprintf("Snap get einf %#x: %4d+%4d %4dx%4d: %s\n",
|
||||||
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||||
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
||||||
}
|
}
|
||||||
|
@ -576,7 +576,7 @@ EHintsSetInfoOnAll(void)
|
||||||
|
|
||||||
struct _selection {
|
struct _selection {
|
||||||
EX_Atom atom;
|
EX_Atom atom;
|
||||||
Time time;
|
EX_Time time;
|
||||||
Win win;
|
Win win;
|
||||||
EventCallbackFunc *func;
|
EventCallbackFunc *func;
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -622,7 +622,7 @@ SelectionAcquire(const char *name, EventCallbackFunc * func, void *data)
|
||||||
WinGetXwin(sel->win), 0, 0);
|
WinGetXwin(sel->win), 0, 0);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SELECTION))
|
if (EDebug(EDBUG_TYPE_SELECTION))
|
||||||
Eprintf("Window %#lx is now %s owner, time=%lu\n",
|
Eprintf("Window %#x is now %s owner, time=%u\n",
|
||||||
WinGetXwin(sel->win), buf, sel->time);
|
WinGetXwin(sel->win), buf, sel->time);
|
||||||
|
|
||||||
return sel;
|
return sel;
|
||||||
|
@ -635,7 +635,7 @@ SelectionRelease(ESelection * sel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SELECTION))
|
if (EDebug(EDBUG_TYPE_SELECTION))
|
||||||
Eprintf("Window %#lx is no longer %s owner\n",
|
Eprintf("Window %#x is no longer %s owner\n",
|
||||||
WinGetXwin(sel->win), XGetAtomName(disp, sel->atom));
|
WinGetXwin(sel->win), XGetAtomName(disp, sel->atom));
|
||||||
|
|
||||||
XSetSelectionOwner(disp, sel->atom, NoXID, sel->time);
|
XSetSelectionOwner(disp, sel->atom, NoXID, sel->time);
|
||||||
|
|
27
src/hints.h
27
src/hints.h
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -48,7 +48,7 @@ extern EX_Atom atoms_misc[];
|
||||||
#define E16_ATOM_WIN_BORDER atoms_misc[9]
|
#define E16_ATOM_WIN_BORDER atoms_misc[9]
|
||||||
|
|
||||||
/* ewmh.c */
|
/* ewmh.c */
|
||||||
void EWMH_Init(Window win_wm_check);
|
void EWMH_Init(EX_Window win_wm_check);
|
||||||
void EWMH_SetDesktopCount(void);
|
void EWMH_SetDesktopCount(void);
|
||||||
void EWMH_SetDesktopRoots(void);
|
void EWMH_SetDesktopRoots(void);
|
||||||
void EWMH_SetDesktopNames(void);
|
void EWMH_SetDesktopNames(void);
|
||||||
|
@ -58,9 +58,9 @@ void EWMH_SetDesktopViewport(void);
|
||||||
void EWMH_SetWorkArea(void);
|
void EWMH_SetWorkArea(void);
|
||||||
void EWMH_SetClientList(void);
|
void EWMH_SetClientList(void);
|
||||||
void EWMH_SetClientStacking(void);
|
void EWMH_SetClientStacking(void);
|
||||||
void EWMH_SetActiveWindow(Window win);
|
void EWMH_SetActiveWindow(EX_Window win);
|
||||||
void EWMH_SetShowingDesktop(int on);
|
void EWMH_SetShowingDesktop(int on);
|
||||||
void EWMH_SetWindowName(Window win, const char *name);
|
void EWMH_SetWindowName(EX_Window win, const char *name);
|
||||||
void EWMH_SetWindowDesktop(const EWin * ewin);
|
void EWMH_SetWindowDesktop(const EWin * ewin);
|
||||||
void EWMH_SetWindowState(const EWin * ewin);
|
void EWMH_SetWindowState(const EWin * ewin);
|
||||||
void EWMH_SetWindowBorder(const EWin * ewin);
|
void EWMH_SetWindowBorder(const EWin * ewin);
|
||||||
|
@ -68,7 +68,8 @@ void EWMH_SetWindowOpacity(EWin * ewin);
|
||||||
void EWMH_SetWindowActions(const EWin * ewin);
|
void EWMH_SetWindowActions(const EWin * ewin);
|
||||||
void EWMH_GetWindowHints(EWin * ewin);
|
void EWMH_GetWindowHints(EWin * ewin);
|
||||||
void EWMH_DelWindowHints(const EWin * ewin);
|
void EWMH_DelWindowHints(const EWin * ewin);
|
||||||
int EWMH_ProcessPropertyChange(EWin * ewin, Atom atom_change);
|
int EWMH_ProcessPropertyChange(EWin * ewin,
|
||||||
|
EX_Atom atom_change);
|
||||||
int EWMH_ProcessClientClientMessage(EWin * ewin,
|
int EWMH_ProcessClientClientMessage(EWin * ewin,
|
||||||
XClientMessageEvent *
|
XClientMessageEvent *
|
||||||
event);
|
event);
|
||||||
|
@ -85,9 +86,9 @@ void GNOME_SetEwinArea(const EWin * ewin);
|
||||||
void GNOME_SetHint(const EWin * ewin);
|
void GNOME_SetHint(const EWin * ewin);
|
||||||
void GNOME_SetCurrentArea(void);
|
void GNOME_SetCurrentArea(void);
|
||||||
void GNOME_SetAreaCount(void);
|
void GNOME_SetAreaCount(void);
|
||||||
void GNOME_GetHints(EWin * ewin, Atom atom_change);
|
void GNOME_GetHints(EWin * ewin, EX_Atom atom_change);
|
||||||
void GNOME_DelHints(const EWin * ewin);
|
void GNOME_DelHints(const EWin * ewin);
|
||||||
void GNOME_SetHints(Window win_wm_check);
|
void GNOME_SetHints(EX_Window win_wm_check);
|
||||||
int GNOME_ProcessClientClientMessage(EWin * ewin,
|
int GNOME_ProcessClientClientMessage(EWin * ewin,
|
||||||
XClientMessageEvent *
|
XClientMessageEvent *
|
||||||
event);
|
event);
|
||||||
|
@ -102,7 +103,7 @@ void HintsSetCurrentDesktop(void);
|
||||||
void HintsSetDesktopViewport(void);
|
void HintsSetDesktopViewport(void);
|
||||||
void HintsSetClientList(void);
|
void HintsSetClientList(void);
|
||||||
void HintsSetClientStacking(void);
|
void HintsSetClientStacking(void);
|
||||||
void HintsSetActiveWindow(Window win);
|
void HintsSetActiveWindow(EX_Window win);
|
||||||
void HintsSetWindowName(Win win, const char *name);
|
void HintsSetWindowName(Win win, const char *name);
|
||||||
void HintsSetWindowClass(Win win, const char *name,
|
void HintsSetWindowClass(Win win, const char *name,
|
||||||
const char *clss);
|
const char *clss);
|
||||||
|
@ -119,9 +120,10 @@ void HintsProcessClientClientMessage(EWin * ewin,
|
||||||
event);
|
event);
|
||||||
void HintsProcessRootClientMessage(XClientMessageEvent * event);
|
void HintsProcessRootClientMessage(XClientMessageEvent * event);
|
||||||
|
|
||||||
Pixmap HintsGetRootPixmap(Win win);
|
EX_Pixmap HintsGetRootPixmap(Win win);
|
||||||
void HintsSetRootHints(Win win);
|
void HintsSetRootHints(Win win);
|
||||||
void HintsSetRootInfo(Win win, Pixmap pmap, unsigned int color);
|
void HintsSetRootInfo(Win win, EX_Pixmap pmap,
|
||||||
|
unsigned int color);
|
||||||
|
|
||||||
void EHintsSetInfo(const EWin * ewin);
|
void EHintsSetInfo(const EWin * ewin);
|
||||||
void EHintsGetInfo(EWin * ewin);
|
void EHintsGetInfo(EWin * ewin);
|
||||||
|
@ -166,10 +168,11 @@ void ICCCM_Focus(const EWin * ewin);
|
||||||
void ICCCM_GetGeoms(EWin * ewin);
|
void ICCCM_GetGeoms(EWin * ewin);
|
||||||
void ICCCM_GetInfo(EWin * ewin);
|
void ICCCM_GetInfo(EWin * ewin);
|
||||||
void ICCCM_GetHints(EWin * ewin);
|
void ICCCM_GetHints(EWin * ewin);
|
||||||
int ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change);
|
int ICCCM_ProcessPropertyChange(EWin * ewin,
|
||||||
|
EX_Atom atom_change);
|
||||||
|
|
||||||
/* mwm.c */
|
/* mwm.c */
|
||||||
void MWM_GetHints(EWin * ewin, Atom atom_change);
|
void MWM_GetHints(EWin * ewin, EX_Atom atom_change);
|
||||||
void MWM_SetInfo(void);
|
void MWM_SetInfo(void);
|
||||||
|
|
||||||
/* session.c */
|
/* session.c */
|
||||||
|
|
14
src/hiwin.c
14
src/hiwin.c
|
@ -54,10 +54,10 @@ static ImageClass *hiwin_ic = NULL;
|
||||||
|
|
||||||
/* TBD: Move elsewhere? */
|
/* TBD: Move elsewhere? */
|
||||||
static EImage *
|
static EImage *
|
||||||
EobjGetImage(EObj * eo, Drawable draw)
|
EobjGetImage(EObj * eo, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
|
|
||||||
mask = EWindowGetShapePixmap(EobjGetWin(eo));
|
mask = EWindowGetShapePixmap(EobjGetWin(eo));
|
||||||
im = EImageGrabDrawable(draw, mask, 0, 0, EobjGetW(eo), EobjGetH(eo), 0);
|
im = EImageGrabDrawable(draw, mask, 0, 0, EobjGetW(eo), EobjGetH(eo), 0);
|
||||||
|
@ -71,7 +71,7 @@ static void
|
||||||
HiwinRenderImageInit(Hiwin * phi)
|
HiwinRenderImageInit(Hiwin * phi)
|
||||||
{
|
{
|
||||||
EWin *ewin = phi->ewin;
|
EWin *ewin = phi->ewin;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
pmap = EoGetPixmap(ewin);
|
pmap = EoGetPixmap(ewin);
|
||||||
if (pmap)
|
if (pmap)
|
||||||
|
@ -99,7 +99,7 @@ HiwinRenderImageInit(Hiwin * phi)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
HiwinRenderImageDrawX(Hiwin * phi, Drawable draw __UNUSED__)
|
HiwinRenderImageDrawX(Hiwin * phi, EX_Drawable draw __UNUSED__)
|
||||||
{
|
{
|
||||||
EImageApplyToWin(phi->im, EoGetWin(phi), EIMAGE_ANTI_ALIAS,
|
EImageApplyToWin(phi->im, EoGetWin(phi), EIMAGE_ANTI_ALIAS,
|
||||||
EoGetW(phi), EoGetH(phi));
|
EoGetW(phi), EoGetH(phi));
|
||||||
|
@ -125,7 +125,7 @@ HiwinRenderImageFini(Hiwin * phi, int shown)
|
||||||
static void
|
static void
|
||||||
HiwinRenderImageUpdate(Hiwin * phi)
|
HiwinRenderImageUpdate(Hiwin * phi)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
EWin *ewin = phi->ewin;
|
EWin *ewin = phi->ewin;
|
||||||
|
|
||||||
pmap = EoGetPixmap(ewin);
|
pmap = EoGetPixmap(ewin);
|
||||||
|
@ -171,7 +171,7 @@ HiwinRenderPixmapInit(Hiwin * phi __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
HiwinRenderPixmapDrawX(Hiwin * phi, Drawable draw)
|
HiwinRenderPixmapDrawX(Hiwin * phi, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
EXPaintRectangle(draw, 0, 0, EoGetW(phi), EoGetH(phi),
|
EXPaintRectangle(draw, 0, 0, EoGetW(phi), EoGetH(phi),
|
||||||
Dpy.pixel_black, Dpy.pixel_white);
|
Dpy.pixel_black, Dpy.pixel_white);
|
||||||
|
@ -187,7 +187,7 @@ HiwinRenderPixmapDraw(Hiwin * phi)
|
||||||
static void
|
static void
|
||||||
HiwinRenderPixmapFini(Hiwin * phi, int shown)
|
HiwinRenderPixmapFini(Hiwin * phi, int shown)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
{
|
{
|
||||||
|
|
22
src/icccm.c
22
src/icccm.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -302,7 +302,7 @@ ICCCM_Configure(EWin * ewin)
|
||||||
void
|
void
|
||||||
ICCCM_AdoptStart(const EWin * ewin)
|
ICCCM_AdoptStart(const EWin * ewin)
|
||||||
{
|
{
|
||||||
Window win = EwinGetClientXwin(ewin);
|
EX_Window win = EwinGetClientXwin(ewin);
|
||||||
|
|
||||||
if (!EwinIsInternal(ewin))
|
if (!EwinIsInternal(ewin))
|
||||||
XAddToSaveSet(disp, win);
|
XAddToSaveSet(disp, win);
|
||||||
|
@ -311,7 +311,7 @@ ICCCM_AdoptStart(const EWin * ewin)
|
||||||
void
|
void
|
||||||
ICCCM_Adopt(const EWin * ewin)
|
ICCCM_Adopt(const EWin * ewin)
|
||||||
{
|
{
|
||||||
Window win = EwinGetClientXwin(ewin);
|
EX_Window win = EwinGetClientXwin(ewin);
|
||||||
|
|
||||||
if (ewin->icccm.start_iconified)
|
if (ewin->icccm.start_iconified)
|
||||||
ex_icccm_state_set_iconic(win);
|
ex_icccm_state_set_iconic(win);
|
||||||
|
@ -322,7 +322,7 @@ ICCCM_Adopt(const EWin * ewin)
|
||||||
void
|
void
|
||||||
ICCCM_Cmap(EWin * ewin)
|
ICCCM_Cmap(EWin * ewin)
|
||||||
{
|
{
|
||||||
Colormap ecmap, dcmap, ccmap;
|
EX_Colormap ecmap, dcmap, ccmap;
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
int i, num;
|
int i, num;
|
||||||
EX_Window *wlist;
|
EX_Window *wlist;
|
||||||
|
@ -369,7 +369,7 @@ ICCCM_Cmap(EWin * ewin)
|
||||||
|
|
||||||
set_cmap:
|
set_cmap:
|
||||||
if (EDebug(EDBUG_TYPE_FOCUS))
|
if (EDebug(EDBUG_TYPE_FOCUS))
|
||||||
Eprintf("ICCCM_Cmap %#lx\n", ccmap);
|
Eprintf("ICCCM_Cmap %#x\n", ccmap);
|
||||||
XInstallColormap(disp, ccmap);
|
XInstallColormap(disp, ccmap);
|
||||||
Mode.current_cmap = ccmap;
|
Mode.current_cmap = ccmap;
|
||||||
}
|
}
|
||||||
|
@ -380,12 +380,12 @@ ICCCM_Focus(const EWin * ewin)
|
||||||
if (EDebug(EDBUG_TYPE_FOCUS))
|
if (EDebug(EDBUG_TYPE_FOCUS))
|
||||||
{
|
{
|
||||||
if (ewin)
|
if (ewin)
|
||||||
Eprintf("ICCCM_Focus T=%#lx R=%#lx %#lx %s\n", Mode.events.time,
|
Eprintf("ICCCM_Focus T=%#x R=%#x %#x %s\n", Mode.events.time,
|
||||||
NextRequest(disp), EwinGetClientXwin(ewin),
|
(int)NextRequest(disp), EwinGetClientXwin(ewin),
|
||||||
EwinGetTitle(ewin));
|
EwinGetTitle(ewin));
|
||||||
else
|
else
|
||||||
Eprintf("ICCCM_Focus T=%#lx R=%#lx None\n", Mode.events.time,
|
Eprintf("ICCCM_Focus T=%#x R=%#x None\n", Mode.events.time,
|
||||||
NextRequest(disp));
|
(int)NextRequest(disp));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ewin)
|
if (!ewin)
|
||||||
|
@ -541,7 +541,7 @@ ICCCM_GetGeoms(EWin * ewin)
|
||||||
ewin->props.no_resize_v = (ewin->icccm.height_min == ewin->icccm.height_max);
|
ewin->props.no_resize_v = (ewin->icccm.height_min == ewin->icccm.height_max);
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SNAPS))
|
if (EDebug(EDBUG_TYPE_SNAPS))
|
||||||
Eprintf("Snap get icccm %#lx: %4d+%4d %4dx%4d: %s\n",
|
Eprintf("Snap get icccm %#x: %4d+%4d %4dx%4d: %s\n",
|
||||||
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||||
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
||||||
}
|
}
|
||||||
|
@ -799,7 +799,7 @@ ICCCM_SetIconSizes(void)
|
||||||
* Process received window property change
|
* Process received window property change
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ICCCM_ProcessPropertyChange(EWin * ewin, Atom atom_change)
|
ICCCM_ProcessPropertyChange(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
if (atom_change == EX_ATOM_WM_NAME)
|
if (atom_change == EX_ATOM_WM_NAME)
|
||||||
{
|
{
|
||||||
|
|
32
src/iclass.c
32
src/iclass.c
|
@ -780,7 +780,7 @@ pt_get_bg_image(Win win, int w, int h, int use_root)
|
||||||
{
|
{
|
||||||
EImage *ii = NULL;
|
EImage *ii = NULL;
|
||||||
Win cr;
|
Win cr;
|
||||||
Drawable bg;
|
EX_Drawable bg;
|
||||||
int xx, yy;
|
int xx, yy;
|
||||||
|
|
||||||
bg = DeskGetBackgroundPixmap(DesksGetCurrent());
|
bg = DeskGetBackgroundPixmap(DesksGetCurrent());
|
||||||
|
@ -887,7 +887,7 @@ ImagestateMakePmapMask(ImageState * is, Win win, PmapMask * pmm,
|
||||||
#ifdef ENABLE_TRANSPARENCY
|
#ifdef ENABLE_TRANSPARENCY
|
||||||
EImage *ii = NULL;
|
EImage *ii = NULL;
|
||||||
int flags;
|
int flags;
|
||||||
Pixmap pmap, mask;
|
EX_Pixmap pmap, mask;
|
||||||
|
|
||||||
flags = pt_type_to_flags(image_type);
|
flags = pt_type_to_flags(image_type);
|
||||||
|
|
||||||
|
@ -994,7 +994,8 @@ ImagestateMakePmapMask(ImageState * is, Win win, PmapMask * pmm,
|
||||||
XDrawRectangle(disp, win, gc, x, y, w, h);
|
XDrawRectangle(disp, win, gc, x, y, w, h);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ImagestateDrawBevel(ImageState * is, Drawable win, int x, int y, int w, int h)
|
ImagestateDrawBevel(ImageState * is, EX_Drawable win,
|
||||||
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
GC gc;
|
GC gc;
|
||||||
|
|
||||||
|
@ -1096,7 +1097,8 @@ ImagestateDrawBevel(ImageState * is, Drawable win, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ImagestateDrawNoImg(ImageState * is, Drawable draw, int x, int y, int w, int h)
|
ImagestateDrawNoImg(ImageState * is, EX_Drawable draw, int x, int y, int w,
|
||||||
|
int h)
|
||||||
{
|
{
|
||||||
ImagestateColorsAlloc(is);
|
ImagestateColorsAlloc(is);
|
||||||
|
|
||||||
|
@ -1144,7 +1146,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
|
||||||
|
|
||||||
if (pmm.pmap)
|
if (pmm.pmap)
|
||||||
{
|
{
|
||||||
Pixmap pmap = pmm.pmap;
|
EX_Pixmap pmap = pmm.pmap;
|
||||||
|
|
||||||
if ((ts && text) || (is->bevelstyle != BEVEL_NONE) ||
|
if ((ts && text) || (is->bevelstyle != BEVEL_NONE) ||
|
||||||
(flags & ITA_BGPMAP))
|
(flags & ITA_BGPMAP))
|
||||||
|
@ -1193,7 +1195,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
pmap = EGetWindowBackgroundPixmap(win);
|
pmap = EGetWindowBackgroundPixmap(win);
|
||||||
ImagestateDrawNoImg(is, pmap, 0, 0, w, h);
|
ImagestateDrawNoImg(is, pmap, 0, 0, w, h);
|
||||||
|
@ -1218,7 +1220,7 @@ ImageclassApply(ImageClass * ic, Win win, int active, int sticky, int state,
|
||||||
static void
|
static void
|
||||||
PmapMaskTile(PmapMask * pmm, Win win, unsigned int w, unsigned int h)
|
PmapMaskTile(PmapMask * pmm, Win win, unsigned int w, unsigned int h)
|
||||||
{
|
{
|
||||||
Pixmap pmap, mask;
|
EX_Pixmap pmap, mask;
|
||||||
|
|
||||||
pmap = ECreatePixmap(win, w, h, 0);
|
pmap = ECreatePixmap(win, w, h, 0);
|
||||||
if (pmap == NoXID)
|
if (pmap == NoXID)
|
||||||
|
@ -1296,7 +1298,7 @@ ImageclassApplyCopy(ImageClass * ic, Win win, int w, int h,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ImageclassApplySimple(ImageClass * ic, Win win, Drawable draw, int state,
|
ImageclassApplySimple(ImageClass * ic, Win win, EX_Drawable draw, int state,
|
||||||
int x, int y, int w, int h)
|
int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
|
@ -1414,9 +1416,9 @@ ImageclassIpc(const char *params)
|
||||||
|
|
||||||
if (!strcmp(param2, "free_pixmap"))
|
if (!strcmp(param2, "free_pixmap"))
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
pmap = (Pixmap) strtol(p, NULL, 0);
|
pmap = (EX_Pixmap) strtol(p, NULL, 0);
|
||||||
EImagePixmapsFree(pmap, NoXID);
|
EImagePixmapsFree(pmap, NoXID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1448,7 +1450,7 @@ ImageclassIpc(const char *params)
|
||||||
}
|
}
|
||||||
else if (!strcmp(param2, "apply"))
|
else if (!strcmp(param2, "apply"))
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Win win;
|
Win win;
|
||||||
char state[20];
|
char state[20];
|
||||||
int st, w, h;
|
int st, w, h;
|
||||||
|
@ -1457,7 +1459,7 @@ ImageclassIpc(const char *params)
|
||||||
xwin = NoXID;
|
xwin = NoXID;
|
||||||
state[0] = '\0';
|
state[0] = '\0';
|
||||||
w = h = -1;
|
w = h = -1;
|
||||||
sscanf(p, "%lx %16s %d %d", &xwin, state, &w, &h);
|
sscanf(p, "%x %16s %d %d", &xwin, state, &w, &h);
|
||||||
|
|
||||||
win = ECreateWinFromXwin(xwin);
|
win = ECreateWinFromXwin(xwin);
|
||||||
if (!win)
|
if (!win)
|
||||||
|
@ -1479,7 +1481,7 @@ ImageclassIpc(const char *params)
|
||||||
}
|
}
|
||||||
else if (!strcmp(param2, "apply_copy"))
|
else if (!strcmp(param2, "apply_copy"))
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Win win;
|
Win win;
|
||||||
char state[20];
|
char state[20];
|
||||||
int st, w, h;
|
int st, w, h;
|
||||||
|
@ -1489,7 +1491,7 @@ ImageclassIpc(const char *params)
|
||||||
xwin = NoXID;
|
xwin = NoXID;
|
||||||
state[0] = '\0';
|
state[0] = '\0';
|
||||||
w = h = -1;
|
w = h = -1;
|
||||||
sscanf(p, "%lx %16s %d %d", &xwin, state, &w, &h);
|
sscanf(p, "%x %16s %d %d", &xwin, state, &w, &h);
|
||||||
|
|
||||||
win = ECreateWinFromXwin(xwin);
|
win = ECreateWinFromXwin(xwin);
|
||||||
if (!win)
|
if (!win)
|
||||||
|
@ -1514,7 +1516,7 @@ ImageclassIpc(const char *params)
|
||||||
|
|
||||||
ImageclassApplyCopy(ic, win, w, h, 0, 0, st, &pmm,
|
ImageclassApplyCopy(ic, win, w, h, 0, 0, st, &pmm,
|
||||||
IC_FLAG_MAKE_MASK | IC_FLAG_FULL_SIZE, ST_SOLID);
|
IC_FLAG_MAKE_MASK | IC_FLAG_FULL_SIZE, ST_SOLID);
|
||||||
IpcPrintf("0x%08lx 0x%08lx\n", pmm.pmap, pmm.mask);
|
IpcPrintf("0x%08x 0x%08x\n", pmm.pmap, pmm.mask);
|
||||||
EDestroyWin(win);
|
EDestroyWin(win);
|
||||||
}
|
}
|
||||||
else if (!strcmp(param2, "query"))
|
else if (!strcmp(param2, "query"))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2009 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -99,7 +99,7 @@ ImageClass *ImageclassGetBlack(void);
|
||||||
EImage *ImageclassGetImage(ImageClass * ic, int active, int sticky,
|
EImage *ImageclassGetImage(ImageClass * ic, int active, int sticky,
|
||||||
int state);
|
int state);
|
||||||
void ImageclassApplySimple(ImageClass * ic, Win win,
|
void ImageclassApplySimple(ImageClass * ic, Win win,
|
||||||
Drawable draw, int state, int x,
|
EX_Drawable draw, int state, int x,
|
||||||
int y, int w, int h);
|
int y, int w, int h);
|
||||||
void ImageclassApply(ImageClass * ic, Win win,
|
void ImageclassApply(ImageClass * ic, Win win,
|
||||||
int active, int sticky, int state,
|
int active, int sticky, int state,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -66,7 +66,7 @@ IB_Animate_A(char iconify, EWin * ewin, EWin * ibox)
|
||||||
float a, aa, spd;
|
float a, aa, spd;
|
||||||
int x, y, x1, y1, x2, y2, x3, y3, x4, y4, w, h;
|
int x, y, x1, y1, x2, y2, x3, y3, x4, y4, w, h;
|
||||||
int fx, fy, fw, fh, tx, ty, tw, th;
|
int fx, fy, fw, fh, tx, ty, tw, th;
|
||||||
Window root = WinGetXwin(VROOT);
|
EX_Window root = WinGetXwin(VROOT);
|
||||||
GC gc;
|
GC gc;
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ IB_Animate_B(char iconify, EWin * ewin, EWin * ibox)
|
||||||
float a, spd;
|
float a, spd;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
int fx, fy, fw, fh, tx, ty, tw, th;
|
int fx, fy, fw, fh, tx, ty, tw, th;
|
||||||
Window root = WinGetXwin(VROOT);
|
EX_Window root = WinGetXwin(VROOT);
|
||||||
GC gc;
|
GC gc;
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -108,7 +108,7 @@ IB_SnapEWin(EWin * ewin, int size)
|
||||||
int w, h, ww, hh;
|
int w, h, ww, hh;
|
||||||
int was_shaded;
|
int was_shaded;
|
||||||
EImage *im;
|
EImage *im;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
|
|
||||||
if (!EoIsShown(ewin))
|
if (!EoIsShown(ewin))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -131,7 +131,7 @@ IB_SnapEWin(EWin * ewin, int size)
|
||||||
draw = EoGetPixmap(ewin);
|
draw = EoGetPixmap(ewin);
|
||||||
if (draw != NoXID)
|
if (draw != NoXID)
|
||||||
{
|
{
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
|
|
||||||
mask = EWindowGetShapePixmap(EoGetWin(ewin));
|
mask = EWindowGetShapePixmap(EoGetWin(ewin));
|
||||||
im = EImageGrabDrawableScaled(EoGetWin(ewin), draw, mask, 0, 0, ww, hh,
|
im = EImageGrabDrawableScaled(EoGetWin(ewin), draw, mask, 0, 0, ww, hh,
|
||||||
|
|
32
src/ipc.c
32
src/ipc.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -334,19 +334,19 @@ IPC_WinList(const char *params)
|
||||||
switch (format[0])
|
switch (format[0])
|
||||||
{
|
{
|
||||||
case '\0':
|
case '\0':
|
||||||
IpcPrintf("%#lx : %s\n", EwinGetClientXwin(e),
|
IpcPrintf("%#x : %s\n", EwinGetClientXwin(e),
|
||||||
SS(EwinGetIcccmName(e)));
|
SS(EwinGetIcccmName(e)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
IpcPrintf("%#lx : %s :: %d : %d %d : %d %d %dx%d\n",
|
IpcPrintf("%#x : %s :: %d : %d %d : %d %d %dx%d\n",
|
||||||
EwinGetClientXwin(e), SS(EwinGetIcccmName(e)),
|
EwinGetClientXwin(e), SS(EwinGetIcccmName(e)),
|
||||||
(EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), e->area_x,
|
(EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e), e->area_x,
|
||||||
e->area_y, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e));
|
e->area_y, EoGetX(e), EoGetY(e), EoGetW(e), EoGetH(e));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'a':
|
case 'a':
|
||||||
IpcPrintf("%#10lx : %5d %5d %4dx%4d :: %2d : %d %d : %s\n",
|
IpcPrintf("%#10x : %5d %5d %4dx%4d :: %2d : %d %d : %s\n",
|
||||||
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
||||||
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
||||||
e->area_x, e->area_y, SS(EwinGetIcccmName(e)));
|
e->area_x, e->area_y, SS(EwinGetIcccmName(e)));
|
||||||
|
@ -354,7 +354,7 @@ IPC_WinList(const char *params)
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
IpcPrintf
|
IpcPrintf
|
||||||
("%#10lx : %5d %5d %4dx%4d :: %2d : %s %4d,%4d %2d,%2d : %s\n",
|
("%#10x : %5d %5d %4dx%4d :: %2d : %s %4d,%4d %2d,%2d : %s\n",
|
||||||
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
||||||
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
||||||
TxtPG[e->place.gravity & 3], e->place.gx, e->place.gy,
|
TxtPG[e->place.gravity & 3], e->place.gx, e->place.gy,
|
||||||
|
@ -363,7 +363,7 @@ IPC_WinList(const char *params)
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
IpcPrintf
|
IpcPrintf
|
||||||
("%#10lx : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" : \"%s\" : \"%s\"\n",
|
("%#10x : %5d %5d %4dx%4d :: %2d : \"%s\" \"%s\" : \"%s\" : \"%s\"\n",
|
||||||
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
EwinGetClientXwin(e), EoGetX(e), EoGetY(e), EoGetW(e),
|
||||||
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
EoGetH(e), (EoIsSticky(e)) ? -1 : (int)EoGetDeskNum(e),
|
||||||
SS(EwinGetIcccmCName(e)), SS(EwinGetIcccmClass(e)),
|
SS(EwinGetIcccmCName(e)), SS(EwinGetIcccmClass(e)),
|
||||||
|
@ -1025,7 +1025,7 @@ IPC_Debug(const char *params)
|
||||||
|
|
||||||
if (!strcmp(param, "?"))
|
if (!strcmp(param, "?"))
|
||||||
{
|
{
|
||||||
IpcPrintf("Pointer grab on=%d win=%#lx\n",
|
IpcPrintf("Pointer grab on=%d win=%#x\n",
|
||||||
Mode.grabs.pointer_grab_active,
|
Mode.grabs.pointer_grab_active,
|
||||||
Mode.grabs.pointer_grab_window);
|
Mode.grabs.pointer_grab_window);
|
||||||
}
|
}
|
||||||
|
@ -1085,16 +1085,16 @@ EwinShowInfo(const EWin * ewin)
|
||||||
"WM_WINDOW_ROLE %s\n"
|
"WM_WINDOW_ROLE %s\n"
|
||||||
"WM_COMMAND %s\n"
|
"WM_COMMAND %s\n"
|
||||||
"WM_CLIENT_MACHINE %s\n"
|
"WM_CLIENT_MACHINE %s\n"
|
||||||
"Client window %#10lx x,y %4i,%4i wxh %4ix%4i\n"
|
"Client window %#10x x,y %4i,%4i wxh %4ix%4i\n"
|
||||||
"Container window %#10lx\n"
|
"Container window %#10x\n"
|
||||||
"Frame window %#10lx x,y %4i,%4i wxh %4ix%4i\n"
|
"Frame window %#10x x,y %4i,%4i wxh %4ix%4i\n"
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
"Named pixmap %#10lx\n"
|
"Named pixmap %#10x\n"
|
||||||
#endif
|
#endif
|
||||||
"Border %s lrtb %i,%i,%i,%i\n"
|
"Border %s lrtb %i,%i,%i,%i\n"
|
||||||
"Icon window, pixmap, mask %#10lx, %#10lx, %#10lx\n"
|
"Icon window, pixmap, mask %#10x, %#10x, %#10x\n"
|
||||||
"Is group leader %i Window group leader %#lx Client leader %#10lx\n"
|
"Is group leader %i Window group leader %#x Client leader %#10x\n"
|
||||||
"Has transients %i Transient type %i Transient for %#10lx\n"
|
"Has transients %i Transient type %i Transient for %#10x\n"
|
||||||
"No resize H/V %i/%i Shaped %i\n"
|
"No resize H/V %i/%i Shaped %i\n"
|
||||||
"Base, min, max, inc w/h %ix%i, %ix%i, %ix%i %ix%i\n"
|
"Base, min, max, inc w/h %ix%i, %ix%i, %ix%i %ix%i\n"
|
||||||
"Aspect min, max %5.5f, %5.5f\n"
|
"Aspect min, max %5.5f, %5.5f\n"
|
||||||
|
@ -1208,7 +1208,7 @@ IPC_ObjInfo(const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
eo = lst[i];
|
eo = lst[i];
|
||||||
IpcPrintf
|
IpcPrintf
|
||||||
(" %2d %#9lx %2d %d %d %2d/%2d %3d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
|
(" %2d %#9x %2d %d %d %2d/%2d %3d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
|
||||||
i, EobjGetXwin(eo), WinGetDepth(EobjGetWin(eo)), eo->type,
|
i, EobjGetXwin(eo), WinGetDepth(EobjGetWin(eo)), eo->type,
|
||||||
eo->shown, eo->shaped, EShapeCheck(EobjGetWin(eo)), eo->desk->num,
|
eo->shown, eo->shaped, EShapeCheck(EobjGetWin(eo)), eo->desk->num,
|
||||||
eo->sticky, eo->floating, eo->ilayer,
|
eo->sticky, eo->floating, eo->ilayer,
|
||||||
|
@ -1389,7 +1389,7 @@ static const struct _keyset ks[] = {
|
||||||
static void
|
static void
|
||||||
IPC_InsertKeys(const char *params, Client * c __UNUSED__)
|
IPC_InsertKeys(const char *params, Client * c __UNUSED__)
|
||||||
{
|
{
|
||||||
Window win = 0;
|
EX_Window win = 0;
|
||||||
int i, rev;
|
int i, rev;
|
||||||
const char *s;
|
const char *s;
|
||||||
XKeyEvent ev;
|
XKeyEvent ev;
|
||||||
|
|
10
src/magwin.c
10
src/magwin.c
|
@ -49,7 +49,7 @@ typedef struct {
|
||||||
int scale; /* Zoom level */
|
int scale; /* Zoom level */
|
||||||
int sx, sy; /* Scene x,y */
|
int sx, sy; /* Scene x,y */
|
||||||
int sw, sh; /* Scene wxh */
|
int sw, sh; /* Scene wxh */
|
||||||
Time grab_time;
|
EX_Time grab_time;
|
||||||
char disable_text;
|
char disable_text;
|
||||||
char configured;
|
char configured;
|
||||||
char btn_down;
|
char btn_down;
|
||||||
|
@ -83,7 +83,7 @@ MagwinDrawText(MagWindow * mw, int x, int y, const char *txt)
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
MagwinGetPixel(Drawable draw, unsigned int x, unsigned int y)
|
MagwinGetPixel(EX_Drawable draw, unsigned int x, unsigned int y)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
unsigned int *pd, pixel = 0;
|
unsigned int *pd, pixel = 0;
|
||||||
|
@ -106,7 +106,7 @@ MagwinRedraw(MagWindow * mw, int paint)
|
||||||
int sx, sy, sw, sh;
|
int sx, sy, sw, sh;
|
||||||
float scale;
|
float scale;
|
||||||
int zoom_res;
|
int zoom_res;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
int px, py;
|
int px, py;
|
||||||
int qx, qy;
|
int qx, qy;
|
||||||
|
@ -240,7 +240,7 @@ _MagwinGrabRelease(MagWindow * mw)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
MagwinKeyPress(MagWindow * mw, KeySym keysym)
|
MagwinKeyPress(MagWindow * mw, EX_KeySym keysym)
|
||||||
{
|
{
|
||||||
switch (keysym)
|
switch (keysym)
|
||||||
{
|
{
|
||||||
|
@ -312,7 +312,7 @@ static void
|
||||||
MagwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
MagwinEvent(Win win __UNUSED__, XEvent * ev, void *prm)
|
||||||
{
|
{
|
||||||
MagWindow *mw = (MagWindow *) prm;
|
MagWindow *mw = (MagWindow *) prm;
|
||||||
KeySym keysym;
|
EX_KeySym keysym;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -512,7 +512,7 @@ MenuLoadFromEwins(Menu * m, int (*f) (EWin * ewin, void *prm), void *prm)
|
||||||
if (!f(lst[i], prm))
|
if (!f(lst[i], prm))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx focus", EwinGetClientXwin(lst[i]));
|
Esnprintf(s, sizeof(s), "wop %#x focus", EwinGetClientXwin(lst[i]));
|
||||||
mi = MenuItemCreate(EwinGetTitle(lst[i]), NULL, s, NULL);
|
mi = MenuItemCreate(EwinGetTitle(lst[i]), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
}
|
}
|
||||||
|
@ -599,11 +599,11 @@ MenuLoadFromGroups(Menu * m)
|
||||||
{
|
{
|
||||||
mm = MenuCreate("__SUBMENUGROUP_E", NULL, m, NULL);
|
mm = MenuCreate("__SUBMENUGROUP_E", NULL, m, NULL);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "gop %li showhide",
|
Esnprintf(s, sizeof(s), "gop %i showhide",
|
||||||
EwinGetClientXwin(lst[i]->members[0]));
|
EwinGetClientXwin(lst[i]->members[0]));
|
||||||
mi = MenuItemCreate(_("Show/Hide this group"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Show/Hide this group"), NULL, s, NULL);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx ic",
|
Esnprintf(s, sizeof(s), "wop %#x ic",
|
||||||
EwinGetClientXwin(lst[i]->members[0]));
|
EwinGetClientXwin(lst[i]->members[0]));
|
||||||
MenuAddItem(mm, mi);
|
MenuAddItem(mm, mi);
|
||||||
mi = MenuItemCreate(_("Iconify this group"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Iconify this group"), NULL, s, NULL);
|
||||||
|
@ -611,7 +611,7 @@ MenuLoadFromGroups(Menu * m)
|
||||||
|
|
||||||
for (j = 0; j < lst[i]->num_members; j++)
|
for (j = 0; j < lst[i]->num_members; j++)
|
||||||
{
|
{
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx focus",
|
Esnprintf(s, sizeof(s), "wop %#x focus",
|
||||||
EwinGetClientXwin(lst[i]->members[j]));
|
EwinGetClientXwin(lst[i]->members[j]));
|
||||||
mi = MenuItemCreate(EwinGetTitle(lst[i]->members[j]), NULL,
|
mi = MenuItemCreate(EwinGetTitle(lst[i]->members[j]), NULL,
|
||||||
s, NULL);
|
s, NULL);
|
||||||
|
|
|
@ -1197,8 +1197,8 @@ MenuFindNextItem(Menu * m, MenuItem * mi, int inc)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static KeySym
|
static EX_KeySym
|
||||||
MenuKeyPressConversion(KeySym keysym)
|
MenuKeyPressConversion(EX_KeySym keysym)
|
||||||
{
|
{
|
||||||
if (keysym == Conf.menus.key.left)
|
if (keysym == Conf.menus.key.left)
|
||||||
return XK_Left;
|
return XK_Left;
|
||||||
|
@ -1221,7 +1221,7 @@ MenuKeyPressConversion(KeySym keysym)
|
||||||
static void
|
static void
|
||||||
MenuEventKeyPress(Menu * m, XEvent * ev)
|
MenuEventKeyPress(Menu * m, XEvent * ev)
|
||||||
{
|
{
|
||||||
KeySym keysym;
|
EX_KeySym keysym;
|
||||||
MenuItem *mi;
|
MenuItem *mi;
|
||||||
EWin *ewin;
|
EWin *ewin;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2003-2013 Kim Woelders
|
* Copyright (C) 2003-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -70,7 +70,7 @@ typedef struct {
|
||||||
} MWMHints;
|
} MWMHints;
|
||||||
|
|
||||||
void
|
void
|
||||||
MWM_GetHints(EWin * ewin, Atom atom_change)
|
MWM_GetHints(EWin * ewin, EX_Atom atom_change)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
MWMHints mhs, *mwmhints = &mhs;
|
MWMHints mhs, *mwmhints = &mhs;
|
||||||
|
|
27
src/pager.c
27
src/pager.c
|
@ -39,6 +39,9 @@
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "tooltips.h"
|
#include "tooltips.h"
|
||||||
#include "xwin.h"
|
#include "xwin.h"
|
||||||
|
#if USE_XRENDER
|
||||||
|
#include <X11/extensions/Xrender.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEBUG_PAGER 0
|
#define DEBUG_PAGER 0
|
||||||
#if DEBUG_PAGER
|
#if DEBUG_PAGER
|
||||||
|
@ -88,7 +91,7 @@ typedef struct {
|
||||||
Win win;
|
Win win;
|
||||||
int w, h;
|
int w, h;
|
||||||
char *name;
|
char *name;
|
||||||
Pixmap bgpmap;
|
EX_Pixmap bgpmap;
|
||||||
Desk *dsk;
|
Desk *dsk;
|
||||||
int dw, dh;
|
int dw, dh;
|
||||||
int screen_w, screen_h;
|
int screen_w, screen_h;
|
||||||
|
@ -271,7 +274,7 @@ static void
|
||||||
PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
||||||
{
|
{
|
||||||
int w, h, update, use_iclass, serdif;
|
int w, h, update, use_iclass, serdif;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
int pager_mode = PagersGetMode();
|
int pager_mode = PagersGetMode();
|
||||||
|
|
||||||
w = (EoGetW(ewin) * p->dw) / WinGetW(VROOT);
|
w = (EoGetW(ewin) * p->dw) / WinGetW(VROOT);
|
||||||
|
@ -299,7 +302,7 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
||||||
if (!update)
|
if (!update)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dprintf("%s %#lx/%#lx wxh=%dx%d ser=%#x/%#x dif=%d: %s\n", __func__,
|
Dprintf("%s %#x/%#x wxh=%dx%d ser=%#x/%#x dif=%d: %s\n", __func__,
|
||||||
EwinGetClientXwin(ewin), EoGetXwin(ewin), w, h,
|
EwinGetClientXwin(ewin), EoGetXwin(ewin), w, h,
|
||||||
EoGetSerial(ewin), p->serial, serdif, EwinGetTitle(ewin));
|
EoGetSerial(ewin), p->serial, serdif, EwinGetTitle(ewin));
|
||||||
|
|
||||||
|
@ -323,13 +326,13 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
||||||
ic = ImageclassFind("PAGER_WIN", 1);
|
ic = ImageclassFind("PAGER_WIN", 1);
|
||||||
ImageclassApplySimple(ic, EoGetWin(ewin), ewin->mini_pmm.pmap,
|
ImageclassApplySimple(ic, EoGetWin(ewin), ewin->mini_pmm.pmap,
|
||||||
STATE_NORMAL, 0, 0, w, h);
|
STATE_NORMAL, 0, 0, w, h);
|
||||||
Dprintf("Use Iclass, pmap=%#lx\n", ewin->mini_pmm.pmap);
|
Dprintf("Use Iclass, pmap=%#x\n", ewin->mini_pmm.pmap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ScaleRect(EoGetWin(ewin), draw, EoGetWin(ewin), ewin->mini_pmm.pmap,
|
ScaleRect(EoGetWin(ewin), draw, EoGetWin(ewin), ewin->mini_pmm.pmap,
|
||||||
0, 0, EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, HIQ);
|
0, 0, EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, HIQ);
|
||||||
Dprintf("Grab scaled, pmap=%#lx\n", ewin->mini_pmm.pmap);
|
Dprintf("Grab scaled, pmap=%#x\n", ewin->mini_pmm.pmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* FIXME - Remove? */
|
#if 0 /* FIXME - Remove? */
|
||||||
|
@ -346,10 +349,10 @@ doPagerUpdate(Pager * p)
|
||||||
EWin *const *lst;
|
EWin *const *lst;
|
||||||
int i, num, update_screen_included, update_screen_only;
|
int i, num, update_screen_included, update_screen_only;
|
||||||
int pager_mode = PagersGetMode();
|
int pager_mode = PagersGetMode();
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
Picture pager_pict, pict, alpha;
|
EX_Picture pager_pict, pict, alpha;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -557,7 +560,7 @@ PagerReconfigure(Pager * p, int apply)
|
||||||
static void
|
static void
|
||||||
PagerUpdateBg(Pager * p)
|
PagerUpdateBg(Pager * p)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Background *bg;
|
Background *bg;
|
||||||
ImageClass *ic;
|
ImageClass *ic;
|
||||||
int pager_mode = PagersGetMode();
|
int pager_mode = PagersGetMode();
|
||||||
|
@ -997,19 +1000,19 @@ PagerMenuShow(Pager * p, int x, int y)
|
||||||
|
|
||||||
MenuSetTransient(m); /* Destroy when hidden */
|
MenuSetTransient(m); /* Destroy when hidden */
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx ic", EwinGetClientXwin(ewin));
|
Esnprintf(s, sizeof(s), "wop %#x ic", EwinGetClientXwin(ewin));
|
||||||
mi = MenuItemCreate(_("Iconify"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Iconify"), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx close", EwinGetClientXwin(ewin));
|
Esnprintf(s, sizeof(s), "wop %#x close", EwinGetClientXwin(ewin));
|
||||||
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Close"), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx kill", EwinGetClientXwin(ewin));
|
Esnprintf(s, sizeof(s), "wop %#x kill", EwinGetClientXwin(ewin));
|
||||||
mi = MenuItemCreate(_("Annihilate"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Annihilate"), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "wop %#lx st", EwinGetClientXwin(ewin));
|
Esnprintf(s, sizeof(s), "wop %#x st", EwinGetClientXwin(ewin));
|
||||||
mi = MenuItemCreate(_("Stick / Unstick"), NULL, s, NULL);
|
mi = MenuItemCreate(_("Stick / Unstick"), NULL, s, NULL);
|
||||||
MenuAddItem(m, mi);
|
MenuAddItem(m, mi);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
#include "xwin.h"
|
#include "xwin.h"
|
||||||
|
|
||||||
#ifdef USE_EXT_INIT_WIN
|
#ifdef USE_EXT_INIT_WIN
|
||||||
static Window new_init_win_ext = NoXID;
|
static EX_Window new_init_win_ext = NoXID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* True if we are saving state for a doExit("restart") */
|
/* True if we are saving state for a doExit("restart") */
|
||||||
|
@ -181,7 +181,7 @@ set_save_props(SmcConn smc_conn, int master_flag)
|
||||||
#ifdef USE_EXT_INIT_WIN
|
#ifdef USE_EXT_INIT_WIN
|
||||||
if (restarting)
|
if (restarting)
|
||||||
{
|
{
|
||||||
Esnprintf(bufx, sizeof(bufx), "%#lx", new_init_win_ext);
|
Esnprintf(bufx, sizeof(bufx), "%#x", new_init_win_ext);
|
||||||
restartVal[n++].value = (char *)"-X";
|
restartVal[n++].value = (char *)"-X";
|
||||||
restartVal[n++].value = bufx;
|
restartVal[n++].value = bufx;
|
||||||
}
|
}
|
||||||
|
@ -551,7 +551,7 @@ doSMExit(int mode, const char *params)
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_EXT_INIT_WIN
|
#ifdef USE_EXT_INIT_WIN
|
||||||
if (new_init_win_ext != NoXID)
|
if (new_init_win_ext != NoXID)
|
||||||
l += Esnprintf(s + l, sizeof(s) - l, " -X %#lx", new_init_win_ext);
|
l += Esnprintf(s + l, sizeof(s) - l, " -X %#x", new_init_win_ext);
|
||||||
#endif
|
#endif
|
||||||
if (ss)
|
if (ss)
|
||||||
l += Esnprintf(s + l, sizeof(s) - l, " -t %s", ss);
|
l += Esnprintf(s + l, sizeof(s) - l, " -t %s", ss);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -135,7 +135,7 @@ SetupX(const char *dstr)
|
||||||
VROOT = ECreateWindow(RROOT, 0, 0, Mode.wm.win_w, Mode.wm.win_h, 0);
|
VROOT = ECreateWindow(RROOT, 0, 0, Mode.wm.win_w, Mode.wm.win_h, 0);
|
||||||
|
|
||||||
/* Enable eesh and edox to pick up the virtual root */
|
/* Enable eesh and edox to pick up the virtual root */
|
||||||
Esnprintf(buf, sizeof(buf), "%#lx", WinGetXwin(VROOT));
|
Esnprintf(buf, sizeof(buf), "%#x", WinGetXwin(VROOT));
|
||||||
Esetenv("ENL_WM_ROOT", buf);
|
Esetenv("ENL_WM_ROOT", buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -193,7 +193,7 @@ SetupX(const char *dstr)
|
||||||
/* to hunt them down to mask them out - EVIL EVIL EVIL hack but needed */
|
/* to hunt them down to mask them out - EVIL EVIL EVIL hack but needed */
|
||||||
{
|
{
|
||||||
XModifierKeymap *mod;
|
XModifierKeymap *mod;
|
||||||
KeyCode nl, sl;
|
EX_KeyCode nl, sl;
|
||||||
unsigned int numlock, scrollock;
|
unsigned int numlock, scrollock;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
typedef struct _ShapeWin ShapeWin;
|
typedef struct _ShapeWin ShapeWin;
|
||||||
struct _ShapeWin {
|
struct _ShapeWin {
|
||||||
EObj o;
|
EObj o;
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
GC gc;
|
GC gc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ void ShapewinShapeSet(ShapeWin * sw, int md, int x, int y, int w,
|
||||||
int h, int bl, int br, int bt, int bb,
|
int h, int bl, int br, int bt, int bb,
|
||||||
int seqno);
|
int seqno);
|
||||||
|
|
||||||
void do_draw_technical(Drawable dr, GC gc,
|
void do_draw_technical(EX_Drawable dr, GC gc,
|
||||||
int a, int b, int c, int d, int bl,
|
int a, int b, int c, int d, int bl,
|
||||||
int br, int bt, int bb);
|
int br, int bt, int bb);
|
||||||
|
|
||||||
|
|
14
src/snaps.c
14
src/snaps.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -42,7 +42,7 @@ struct _snapshot {
|
||||||
char *win_name;
|
char *win_name;
|
||||||
char *win_class;
|
char *win_class;
|
||||||
char *win_role;
|
char *win_role;
|
||||||
Window win;
|
EX_Window win;
|
||||||
EWin *used;
|
EWin *used;
|
||||||
unsigned int startup_id;
|
unsigned int startup_id;
|
||||||
char track_changes;
|
char track_changes;
|
||||||
|
@ -550,7 +550,7 @@ _EwinSnapRemove(EWin * ewin)
|
||||||
* Snapshot dialogs
|
* Snapshot dialogs
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Window client;
|
EX_Window client;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
char title;
|
char title;
|
||||||
|
@ -928,7 +928,7 @@ _EwinSnapDialog(const EWin * ewin)
|
||||||
{
|
{
|
||||||
char s[1024];
|
char s[1024];
|
||||||
|
|
||||||
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", EwinGetClientXwin(ewin));
|
Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#x", EwinGetClientXwin(ewin));
|
||||||
|
|
||||||
DialogShowSimpleWithName(&DlgSnap, s, (void *)ewin);
|
DialogShowSimpleWithName(&DlgSnap, s, (void *)ewin);
|
||||||
}
|
}
|
||||||
|
@ -1106,7 +1106,7 @@ SnapshotsSaveReal(void)
|
||||||
{
|
{
|
||||||
fprintf(f, "NEW: %s\n", sn->name);
|
fprintf(f, "NEW: %s\n", sn->name);
|
||||||
if (sn->used)
|
if (sn->used)
|
||||||
fprintf(f, "WIN: %#lx\n", EwinGetClientXwin(sn->used));
|
fprintf(f, "WIN: %#x\n", EwinGetClientXwin(sn->used));
|
||||||
if ((sn->match_flags & SNAP_MATCH_TITLE) && sn->win_title)
|
if ((sn->match_flags & SNAP_MATCH_TITLE) && sn->win_title)
|
||||||
fprintf(f, "TITLE: %s\n", sn->win_title);
|
fprintf(f, "TITLE: %s\n", sn->win_title);
|
||||||
if ((sn->match_flags & SNAP_MATCH_NAME) && sn->win_name)
|
if ((sn->match_flags & SNAP_MATCH_NAME) && sn->win_name)
|
||||||
|
@ -1498,7 +1498,7 @@ SnapshotEwinApply(EWin * ewin)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_SNAPS))
|
if (EDebug(EDBUG_TYPE_SNAPS))
|
||||||
Eprintf("Snap get snap %#lx: %4d+%4d %4dx%4d: %s\n",
|
Eprintf("Snap get snap %#x: %4d+%4d %4dx%4d: %s\n",
|
||||||
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
EwinGetClientXwin(ewin), ewin->client.x, ewin->client.y,
|
||||||
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
|
||||||
}
|
}
|
||||||
|
@ -1627,7 +1627,7 @@ _SnapShow(void *data, void *prm)
|
||||||
#define SU(sn, item) ((sn->match_flags & item) ? '>' : ':')
|
#define SU(sn, item) ((sn->match_flags & item) ? '>' : ':')
|
||||||
|
|
||||||
if (sn->used)
|
if (sn->used)
|
||||||
Esnprintf(buf, sizeof(buf), "In use - %#lx", EwinGetClientXwin(sn->used));
|
Esnprintf(buf, sizeof(buf), "In use - %#x", EwinGetClientXwin(sn->used));
|
||||||
else
|
else
|
||||||
Esnprintf(buf, sizeof(buf), "*** Unused ***");
|
Esnprintf(buf, sizeof(buf), "*** Unused ***");
|
||||||
IpcPrintf(" Snapshot Name: %s %s\n", name, buf);
|
IpcPrintf(" Snapshot Name: %s %s\n", name, buf);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -58,7 +58,7 @@ EobjListShow(const char *txt, EobjList * ewl)
|
||||||
for (i = 0; i < ewl->nwins; i++)
|
for (i = 0; i < ewl->nwins; i++)
|
||||||
{
|
{
|
||||||
eo = ewl->list[i];
|
eo = ewl->list[i];
|
||||||
Eprintf(" %2d: %#10lx %#10lx %d %d %s\n", i, EobjGetXwin(eo),
|
Eprintf(" %2d: %#10x %#10x %d %d %s\n", i, EobjGetXwin(eo),
|
||||||
EobjGetCwin(eo), eo->desk->num, eo->ilayer, EobjGetName(eo));
|
EobjGetCwin(eo), eo->desk->num, eo->ilayer, EobjGetName(eo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ EobjListRaise(EobjList * ewl, EObj * eo, int test)
|
||||||
}
|
}
|
||||||
|
|
||||||
static EObj *
|
static EObj *
|
||||||
EobjListFind(const EobjList * ewl, Window win)
|
EobjListFind(const EobjList * ewl, EX_Window win)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ EobjListStackCheck(EObj * eo)
|
||||||
}
|
}
|
||||||
|
|
||||||
EObj *
|
EObj *
|
||||||
EobjListStackFind(Window win)
|
EobjListStackFind(EX_Window win)
|
||||||
{
|
{
|
||||||
return EobjListFind(&EwinListStack, win);
|
return EobjListFind(&EwinListStack, win);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -63,7 +63,7 @@ static void SystrayItemEvent(Win win, XEvent * ev, void *prm);
|
||||||
#define XEMBED_MAPPED (1 << 0)
|
#define XEMBED_MAPPED (1 << 0)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SystrayGetXembedInfo(Window xwin, unsigned int *info)
|
SystrayGetXembedInfo(EX_Window xwin, unsigned int *info)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ SystrayGetXembedInfo(Window xwin, unsigned int *info)
|
||||||
* Return index, -1 if not found.
|
* Return index, -1 if not found.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
SystrayObjFind(Container * ct, Window xwin)
|
SystrayObjFind(Container * ct, EX_Window xwin)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -109,12 +109,12 @@ SystrayObjFind(Container * ct, Window xwin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Win
|
static Win
|
||||||
SystrayObjManage(Container * ct, Window xwin)
|
SystrayObjManage(Container * ct, EX_Window xwin)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
|
|
||||||
#if DEBUG_SYSTRAY
|
#if DEBUG_SYSTRAY
|
||||||
Eprintf("%s: %#lx\n", __func__, xwin);
|
Eprintf("%s: %#x\n", __func__, xwin);
|
||||||
#endif
|
#endif
|
||||||
win = ERegisterWindow(xwin, NULL);
|
win = ERegisterWindow(xwin, NULL);
|
||||||
if (!win)
|
if (!win)
|
||||||
|
@ -132,7 +132,7 @@ static void
|
||||||
SystrayObjUnmanage(Container * ct __UNUSED__, Win win, int gone)
|
SystrayObjUnmanage(Container * ct __UNUSED__, Win win, int gone)
|
||||||
{
|
{
|
||||||
#if DEBUG_SYSTRAY
|
#if DEBUG_SYSTRAY
|
||||||
Eprintf("%s: %#lx gone=%d\n", __func__, WinGetXwin(win), gone);
|
Eprintf("%s: %#x gone=%d\n", __func__, WinGetXwin(win), gone);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gone)
|
if (!gone)
|
||||||
|
@ -147,7 +147,7 @@ SystrayObjUnmanage(Container * ct __UNUSED__, Win win, int gone)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SystrayObjAdd(Container * ct, Window xwin)
|
SystrayObjAdd(Container * ct, EX_Window xwin)
|
||||||
{
|
{
|
||||||
SWin *swin = NULL;
|
SWin *swin = NULL;
|
||||||
Win win;
|
Win win;
|
||||||
|
@ -162,14 +162,14 @@ SystrayObjAdd(Container * ct, Window xwin)
|
||||||
switch (SystrayGetXembedInfo(xwin, xembed_info))
|
switch (SystrayGetXembedInfo(xwin, xembed_info))
|
||||||
{
|
{
|
||||||
case -1: /* Error - assume invalid window */
|
case -1: /* Error - assume invalid window */
|
||||||
Eprintf("%s: %#lx: Hmm.. Invalid window? Ignoring.\n", __func__, xwin);
|
Eprintf("%s: %#x: Hmm.. Invalid window? Ignoring.\n", __func__, xwin);
|
||||||
goto bail_out;
|
goto bail_out;
|
||||||
case 0: /* Assume broken - proceed anyway */
|
case 0: /* Assume broken - proceed anyway */
|
||||||
Eprintf("%s: %#lx: Hmm.. No _XEMBED_INFO?\n", __func__, xwin);
|
Eprintf("%s: %#x: Hmm.. No _XEMBED_INFO?\n", __func__, xwin);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (EDebug(EDBUG_TYPE_ICONBOX))
|
if (EDebug(EDBUG_TYPE_ICONBOX))
|
||||||
Eprintf("%s: %#lx: _XEMBED_INFO: %u %u\n", __func__, xwin,
|
Eprintf("%s: %#x: _XEMBED_INFO: %u %u\n", __func__, xwin,
|
||||||
xembed_info[0], xembed_info[1]);
|
xembed_info[0], xembed_info[1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ SystrayObjDel(Container * ct, Win win, int gone)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_ICONBOX))
|
if (EDebug(EDBUG_TYPE_ICONBOX))
|
||||||
Eprintf("%s: %#lx\n", __func__, WinGetXwin(win));
|
Eprintf("%s: %#x\n", __func__, WinGetXwin(win));
|
||||||
|
|
||||||
swin = (SWin *) ct->objs[i].obj;
|
swin = (SWin *) ct->objs[i].obj;
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ SystrayObjDel(Container * ct, Win win, int gone)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SystrayObjMapUnmap(Container * ct, Window xwin)
|
SystrayObjMapUnmap(Container * ct, EX_Window xwin)
|
||||||
{
|
{
|
||||||
int i, map;
|
int i, map;
|
||||||
SWin *swin;
|
SWin *swin;
|
||||||
|
@ -246,7 +246,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
|
||||||
if (SystrayGetXembedInfo(xwin, xembed_info) >= 0)
|
if (SystrayGetXembedInfo(xwin, xembed_info) >= 0)
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_ICONBOX))
|
if (EDebug(EDBUG_TYPE_ICONBOX))
|
||||||
Eprintf("%s: %#lx: _XEMBED_INFO: %u %u\n", __func__, xwin,
|
Eprintf("%s: %#x: _XEMBED_INFO: %u %u\n", __func__, xwin,
|
||||||
xembed_info[0], xembed_info[1]);
|
xembed_info[0], xembed_info[1]);
|
||||||
|
|
||||||
map = (xembed_info[1] & XEMBED_MAPPED) != 0;
|
map = (xembed_info[1] & XEMBED_MAPPED) != 0;
|
||||||
|
@ -261,7 +261,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (EDebug(EDBUG_TYPE_ICONBOX))
|
if (EDebug(EDBUG_TYPE_ICONBOX))
|
||||||
Eprintf("%s: %#lx: _XEMBED_INFO: gone?\n", __func__, xwin);
|
Eprintf("%s: %#x: _XEMBED_INFO: gone?\n", __func__, xwin);
|
||||||
|
|
||||||
map = 0;
|
map = 0;
|
||||||
if (map == swin->mapped)
|
if (map == swin->mapped)
|
||||||
|
@ -275,7 +275,7 @@ SystrayObjMapUnmap(Container * ct, Window xwin)
|
||||||
static void
|
static void
|
||||||
SystrayEventClientMessage(Container * ct, XClientMessageEvent * ev)
|
SystrayEventClientMessage(Container * ct, XClientMessageEvent * ev)
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
|
|
||||||
if (EDebug(EDBUG_TYPE_ICONBOX))
|
if (EDebug(EDBUG_TYPE_ICONBOX))
|
||||||
Eprintf("%s: ev->type=%ld ev->data.l: %#lx %#lx %#lx %#lx\n", __func__,
|
Eprintf("%s: ev->type=%ld ev->data.l: %#lx %#lx %#lx %#lx\n", __func__,
|
||||||
|
@ -343,7 +343,7 @@ SystrayEvent(Win _win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
||||||
Eprintf("%s: %2d %#lx\n", __func__, ev->type, ev->xany.window);
|
Eprintf("%s: %2d %#lx\n", __func__, ev->type, ev->xany.window);
|
||||||
|
|
||||||
#if 0 /* FIXME - Need this one at all? ConfigureRequest? */
|
#if 0 /* FIXME - Need this one at all? ConfigureRequest? */
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -417,7 +417,7 @@ TextclassIpc(const char *params)
|
||||||
|
|
||||||
if (!strcmp(param2, "apply"))
|
if (!strcmp(param2, "apply"))
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Win win;
|
Win win;
|
||||||
char state[20];
|
char state[20];
|
||||||
int x, y, st;
|
int x, y, st;
|
||||||
|
@ -427,7 +427,7 @@ TextclassIpc(const char *params)
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
state[0] = '\0';
|
state[0] = '\0';
|
||||||
l = 0;
|
l = 0;
|
||||||
sscanf(p, "%lx %d %d %16s %n", &xwin, &x, &y, state, &l);
|
sscanf(p, "%x %d %d %16s %n", &xwin, &x, &y, state, &l);
|
||||||
p += l;
|
p += l;
|
||||||
|
|
||||||
if (!strcmp(state, "normal"))
|
if (!strcmp(state, "normal"))
|
||||||
|
|
17
src/tclass.h
17
src/tclass.h
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -53,7 +53,7 @@ typedef struct {
|
||||||
int *pwidth, int textwidth_limit);
|
int *pwidth, int textwidth_limit);
|
||||||
void (*TextDraw) (TextState * ts, int x, int y,
|
void (*TextDraw) (TextState * ts, int x, int y,
|
||||||
const char *text, int len);
|
const char *text, int len);
|
||||||
int (*FdcInit) (TextState * ts, Win win, Drawable draw);
|
int (*FdcInit) (TextState * ts, Win win, EX_Drawable draw);
|
||||||
void (*FdcFini) (TextState * ts);
|
void (*FdcFini) (TextState * ts);
|
||||||
void (*FdcSetDrawable) (TextState * ts, unsigned long draw);
|
void (*FdcSetDrawable) (TextState * ts, unsigned long draw);
|
||||||
void (*FdcSetColor) (TextState * ts, unsigned int color);
|
void (*FdcSetColor) (TextState * ts, unsigned int color);
|
||||||
|
@ -100,19 +100,20 @@ TextState *TextclassGetTextState(TextClass * tclass, int state,
|
||||||
int active, int sticky);
|
int active, int sticky);
|
||||||
__EXPORT__ void TextstateTextFit(TextState * ts, char **ptext, int *pw,
|
__EXPORT__ void TextstateTextFit(TextState * ts, char **ptext, int *pw,
|
||||||
int textwidth_limit);
|
int textwidth_limit);
|
||||||
void TextstateTextDraw(TextState * ts, Win win, Drawable draw,
|
void TextstateTextDraw(TextState * ts, Win win,
|
||||||
const char *text, int x, int y, int w,
|
EX_Drawable draw, const char *text,
|
||||||
int h, const EImageBorder * pad,
|
int x, int y, int w, int h,
|
||||||
int fsize, int justh, int justv);
|
const EImageBorder * pad, int fsize,
|
||||||
|
int justh, int justv);
|
||||||
void TextSize(TextClass * tclass, int active, int sticky,
|
void TextSize(TextClass * tclass, int active, int sticky,
|
||||||
int state, const char *text, int *width,
|
int state, const char *text, int *width,
|
||||||
int *height, int fsize);
|
int *height, int fsize);
|
||||||
void TextDraw(TextClass * tclass, Win win, Drawable draw,
|
void TextDraw(TextClass * tclass, Win win, EX_Drawable draw,
|
||||||
int active, int sticky, int state,
|
int active, int sticky, int state,
|
||||||
const char *text, int x, int y, int w, int h,
|
const char *text, int x, int y, int w, int h,
|
||||||
int fsize, int justification);
|
int fsize, int justification);
|
||||||
|
|
||||||
__EXPORT__ int _xft_FdcInit(TextState * ts, Win win, Drawable draw);
|
__EXPORT__ int _xft_FdcInit(TextState * ts, Win win, EX_Drawable draw);
|
||||||
__EXPORT__ void _xft_FdcFini(TextState * ts);
|
__EXPORT__ void _xft_FdcFini(TextState * ts);
|
||||||
__EXPORT__ void _xft_FdcSetDrawable(TextState * ts, unsigned long draw);
|
__EXPORT__ void _xft_FdcSetDrawable(TextState * ts, unsigned long draw);
|
||||||
__EXPORT__ void _xft_FdcSetColor(TextState * ts, unsigned int color);
|
__EXPORT__ void _xft_FdcSetColor(TextState * ts, unsigned int color);
|
||||||
|
|
33
src/text.c
33
src/text.c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -49,7 +49,7 @@ _get_gc(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
|
TextDrawRotTo(Win win, EX_Drawable src, EX_Drawable dst, int x, int y,
|
||||||
int w, int h, TextState * ts)
|
int w, int h, TextState * ts)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
|
@ -82,7 +82,7 @@ TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
|
TextDrawRotBack(Win win, EX_Drawable dst, EX_Drawable src, int x, int y,
|
||||||
int w, int h, TextState * ts)
|
int w, int h, TextState * ts)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
|
@ -116,7 +116,7 @@ TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
|
||||||
|
|
||||||
#if FONT_TYPE_IFT
|
#if FONT_TYPE_IFT
|
||||||
static EImage *
|
static EImage *
|
||||||
TextImageGet(Win win __UNUSED__, Drawable src, int x, int y, int w, int h,
|
TextImageGet(Win win __UNUSED__, EX_Drawable src, int x, int y, int w, int h,
|
||||||
TextState * ts)
|
TextState * ts)
|
||||||
{
|
{
|
||||||
EImage *im;
|
EImage *im;
|
||||||
|
@ -147,7 +147,7 @@ TextImageGet(Win win __UNUSED__, Drawable src, int x, int y, int w, int h,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TextImagePut(EImage * im, Win win, Drawable dst, int x, int y,
|
TextImagePut(EImage * im, Win win, EX_Drawable dst, int x, int y,
|
||||||
int w, int h, TextState * ts)
|
int w, int h, TextState * ts)
|
||||||
{
|
{
|
||||||
int win_w;
|
int win_w;
|
||||||
|
@ -408,7 +408,7 @@ typedef struct {
|
||||||
XFontSet font;
|
XFontSet font;
|
||||||
int ascent;
|
int ascent;
|
||||||
Win win;
|
Win win;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
GC gc;
|
GC gc;
|
||||||
} FontCtxXfs;
|
} FontCtxXfs;
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ _xfs_TextDraw(TextState * ts, int x, int y, const char *text, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_xfs_FdcInit(TextState * ts, Win win, Drawable draw)
|
_xfs_FdcInit(TextState * ts, Win win, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
FontCtxXfs *fdc = (FontCtxXfs *) ts->fdc;
|
FontCtxXfs *fdc = (FontCtxXfs *) ts->fdc;
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ extern const FontOps FontOpsXfont;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
XFontStruct *font;
|
XFontStruct *font;
|
||||||
Win win;
|
Win win;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
GC gc;
|
GC gc;
|
||||||
} FontCtxXfont;
|
} FontCtxXfont;
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ _xfont_TextDraw(TextState * ts, int x, int y, const char *text, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_xfont_FdcInit(TextState * ts, Win win, Drawable draw)
|
_xfont_FdcInit(TextState * ts, Win win, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
FontCtxXfont *fdc = (FontCtxXfont *) ts->fdc;
|
FontCtxXfont *fdc = (FontCtxXfont *) ts->fdc;
|
||||||
|
|
||||||
|
@ -829,16 +829,17 @@ TextstateTextFit(TextState * ts, char **ptext, int *pw, int textwidth_limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TextstateTextDraw(TextState * ts, Win win, Drawable draw, const char *text,
|
TextstateTextDraw(TextState * ts, Win win, EX_Drawable draw,
|
||||||
int x, int y, int w, int h, const EImageBorder * pad,
|
const char *text, int x, int y, int w, int h,
|
||||||
int fsize __UNUSED__, int justh, int justv)
|
const EImageBorder * pad, int fsize __UNUSED__, int justh,
|
||||||
|
int justv)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
char **lines;
|
char **lines;
|
||||||
int i, num_lines;
|
int i, num_lines;
|
||||||
int textwidth_limit, textheight_limit, offset_x, offset_y;
|
int textwidth_limit, textheight_limit, offset_x, offset_y;
|
||||||
int xx, yy, ww, hh, ascent;
|
int xx, yy, ww, hh, ascent;
|
||||||
Pixmap drawable;
|
EX_Pixmap drawable;
|
||||||
|
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
return;
|
return;
|
||||||
|
@ -982,9 +983,9 @@ TextstateTextDraw(TextState * ts, Win win, Drawable draw, const char *text,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TextDraw(TextClass * tclass, Win win, Drawable draw, int active, int sticky,
|
TextDraw(TextClass * tclass, Win win, EX_Drawable draw, int active,
|
||||||
int state, const char *text, int x, int y, int w, int h, int fsize,
|
int sticky, int state, const char *text, int x, int y, int w, int h,
|
||||||
int justh)
|
int fsize, int justh)
|
||||||
{
|
{
|
||||||
TextState *ts;
|
TextState *ts;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2010 Kim Woelders
|
* Copyright (C) 2007-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -40,7 +40,7 @@ static PangoContext *_pango_ctx = NULL;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PangoFontDescription *font;
|
PangoFontDescription *font;
|
||||||
Win win;
|
Win win;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
XftDraw *xftd;
|
XftDraw *xftd;
|
||||||
XftColor xftc;
|
XftColor xftc;
|
||||||
} FontCtxPangoXft;
|
} FontCtxPangoXft;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2009 Kim Woelders
|
* Copyright (C) 2006-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -36,7 +36,7 @@ __EXPORT__ extern const FontOps FontOps_xft;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
XftFont *font;
|
XftFont *font;
|
||||||
Win win;
|
Win win;
|
||||||
Drawable draw;
|
EX_Drawable draw;
|
||||||
XftDraw *xftd;
|
XftDraw *xftd;
|
||||||
XftColor xftc;
|
XftColor xftc;
|
||||||
} FontCtxXft;
|
} FontCtxXft;
|
||||||
|
@ -118,7 +118,7 @@ _xft_TextDraw(TextState * ts, int x, int y, const char *text, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_xft_FdcInit(TextState * ts, Win win, Drawable draw)
|
_xft_FdcInit(TextState * ts, Win win, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
FontCtxXft *fdc = (FontCtxXft *) ts->fdc;
|
FontCtxXft *fdc = (FontCtxXft *) ts->fdc;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||||
* Copyright (C) 2004-2009 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -164,7 +164,7 @@ _ift_TextDraw(TextState * ts, int x, int y, const char *text,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_ift_FdcInit(TextState * ts __UNUSED__, Win win __UNUSED__,
|
_ift_FdcInit(TextState * ts __UNUSED__, Win win __UNUSED__,
|
||||||
Drawable draw __UNUSED__)
|
EX_Drawable draw __UNUSED__)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ main(int argc, char **argv)
|
||||||
Efont *f;
|
Efont *f;
|
||||||
GC gc;
|
GC gc;
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
Window win;
|
EX_Window win;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
disp = XOpenDisplay(NULL);
|
disp = XOpenDisplay(NULL);
|
||||||
|
|
|
@ -443,7 +443,7 @@ static void
|
||||||
WarpFocusHandleEvent(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
WarpFocusHandleEvent(Win win __UNUSED__, XEvent * ev, void *prm __UNUSED__)
|
||||||
{
|
{
|
||||||
WarpFocusWin *fw = warpFocusWindow;
|
WarpFocusWin *fw = warpFocusWindow;
|
||||||
KeySym keysym;
|
EX_KeySym keysym;
|
||||||
unsigned int mask;
|
unsigned int mask;
|
||||||
|
|
||||||
if (!EoIsShown(fw))
|
if (!EoIsShown(fw))
|
||||||
|
|
261
src/x.c
261
src/x.c
|
@ -49,7 +49,7 @@ Display *disp;
|
||||||
|
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
static Visual *argb_visual = NULL;
|
static Visual *argb_visual = NULL;
|
||||||
static Colormap argb_cmap = NoXID;
|
static EX_Colormap argb_cmap = NoXID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static XContext xid_context = 0;
|
static XContext xid_context = 0;
|
||||||
|
@ -151,7 +151,7 @@ _EXidDel(Win win)
|
||||||
#define EXidLookup ELookupXwin
|
#define EXidLookup ELookupXwin
|
||||||
|
|
||||||
Win
|
Win
|
||||||
EXidLookup(Window xwin)
|
EXidLookup(EX_Window xwin)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
XPointer xp;
|
XPointer xp;
|
||||||
|
@ -168,8 +168,8 @@ EXidLookup(Window xwin)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Win
|
static Win
|
||||||
_EXidSet(Window xwin, Win parent, int x, int y, int w, int h, int depth,
|
_EXidSet(EX_Window xwin, Win parent, int x, int y, int w, int h, int depth,
|
||||||
Visual * visual, Colormap cmap)
|
Visual * visual, EX_Colormap cmap)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ Win
|
||||||
ECreateWindow(Win parent, int x, int y, int w, int h, int saveunder)
|
ECreateWindow(Win parent, int x, int y, int w, int h, int saveunder)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
|
|
||||||
attr.backing_store = NotUseful;
|
attr.backing_store = NotUseful;
|
||||||
|
@ -308,10 +308,10 @@ ECreateWindow(Win parent, int x, int y, int w, int h, int saveunder)
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
static Win
|
static Win
|
||||||
_ECreateWindowVDC(Win parent, int x, int y, int w, int h,
|
_ECreateWindowVDC(Win parent, int x, int y, int w, int h,
|
||||||
Visual * vis, unsigned int depth, Colormap cmap)
|
Visual * vis, unsigned int depth, EX_Colormap cmap)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
|
|
||||||
attr.background_pixmap = NoXID;
|
attr.background_pixmap = NoXID;
|
||||||
|
@ -335,7 +335,7 @@ ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win cwin)
|
||||||
{
|
{
|
||||||
int depth;
|
int depth;
|
||||||
Visual *vis;
|
Visual *vis;
|
||||||
Colormap cmap;
|
EX_Colormap cmap;
|
||||||
|
|
||||||
if (cwin && Conf.testing.argb_clients_inherit_attr)
|
if (cwin && Conf.testing.argb_clients_inherit_attr)
|
||||||
{
|
{
|
||||||
|
@ -365,7 +365,7 @@ static Win
|
||||||
_ECreateWindowVD(Win parent, int x, int y, int w, int h,
|
_ECreateWindowVD(Win parent, int x, int y, int w, int h,
|
||||||
Visual * vis, unsigned int depth)
|
Visual * vis, unsigned int depth)
|
||||||
{
|
{
|
||||||
Colormap cmap;
|
EX_Colormap cmap;
|
||||||
|
|
||||||
if (!vis || depth == 0)
|
if (!vis || depth == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -438,7 +438,7 @@ Win
|
||||||
ECreateEventWindow(Win parent, int x, int y, int w, int h)
|
ECreateEventWindow(Win parent, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
|
|
||||||
attr.override_redirect = False;
|
attr.override_redirect = False;
|
||||||
|
@ -469,7 +469,7 @@ ECreateFocusWindow(Win parent, int x, int y, int w, int h)
|
||||||
attr.save_under = False;
|
attr.save_under = False;
|
||||||
attr.event_mask = KeyPressMask | FocusChangeMask;
|
attr.event_mask = KeyPressMask | FocusChangeMask;
|
||||||
|
|
||||||
Window xwin, xpar;
|
EX_Window xwin, xpar;
|
||||||
|
|
||||||
win = XCreateWindow(disp, parent, x, y, w, h, 0, 0, InputOnly,
|
win = XCreateWindow(disp, parent, x, y, w, h, 0, 0, InputOnly,
|
||||||
CopyFromParent,
|
CopyFromParent,
|
||||||
|
@ -644,8 +644,8 @@ EWindowSetMapped(Win win, int mapped)
|
||||||
win->mapped = mapped;
|
win->mapped = mapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window
|
EX_Window
|
||||||
EXWindowGetParent(Window xwin)
|
EXWindowGetParent(EX_Window xwin)
|
||||||
{
|
{
|
||||||
Window parent, rt;
|
Window parent, rt;
|
||||||
Window *pch = NULL;
|
Window *pch = NULL;
|
||||||
|
@ -661,7 +661,7 @@ EXWindowGetParent(Window xwin)
|
||||||
}
|
}
|
||||||
|
|
||||||
Win
|
Win
|
||||||
ECreateWinFromXwin(Window xwin)
|
ECreateWinFromXwin(EX_Window xwin)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
Window rr;
|
Window rr;
|
||||||
|
@ -697,7 +697,7 @@ EDestroyWin(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
Win
|
Win
|
||||||
ERegisterWindow(Window xwin, XWindowAttributes * pxwa)
|
ERegisterWindow(EX_Window xwin, XWindowAttributes * pxwa)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
|
@ -726,7 +726,7 @@ ERegisterWindow(Window xwin, XWindowAttributes * pxwa)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EUnregisterXwin(Window xwin)
|
EUnregisterXwin(EX_Window xwin)
|
||||||
{
|
{
|
||||||
Win win;
|
Win win;
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ EUnregisterXwin(Window xwin)
|
||||||
/* FIXME - We shouldn't go here */
|
/* FIXME - We shouldn't go here */
|
||||||
_EXidDel(win);
|
_EXidDel(win);
|
||||||
#if 1 /* Debug - Fix code if we get here */
|
#if 1 /* Debug - Fix code if we get here */
|
||||||
Eprintf("*** FIXME - %s %#lx\n", __func__, xwin);
|
Eprintf("*** FIXME - %s %#x\n", __func__, xwin);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -750,7 +750,7 @@ EUnregisterWindow(Win win)
|
||||||
if (win->cbl.lst)
|
if (win->cbl.lst)
|
||||||
{
|
{
|
||||||
if (EDebug(1))
|
if (EDebug(1))
|
||||||
Eprintf("%s(%#lx) Ignored (%d callbacks remain)\n",
|
Eprintf("%s(%#x) Ignored (%d callbacks remain)\n",
|
||||||
__func__, win->xwin, win->cbl.num);
|
__func__, win->xwin, win->cbl.num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -836,13 +836,13 @@ EMapRaised(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EXGetWindowAttributes(Window xwin, XWindowAttributes * pxwa)
|
EXGetWindowAttributes(EX_Window xwin, XWindowAttributes * pxwa)
|
||||||
{
|
{
|
||||||
return XGetWindowAttributes(disp, xwin, pxwa);
|
return XGetWindowAttributes(disp, xwin, pxwa);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EXGetGeometry(Drawable draw, Window * root_return, int *x, int *y,
|
EXGetGeometry(EX_Drawable draw, EX_Window * root_return, int *x, int *y,
|
||||||
int *w, int *h, int *bw, int *depth)
|
int *w, int *h, int *bw, int *depth)
|
||||||
{
|
{
|
||||||
int ok;
|
int ok;
|
||||||
|
@ -878,7 +878,7 @@ EXGetGeometry(Drawable draw, Window * root_return, int *x, int *y,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EGetGeometry(Win win, Window * root_return, int *x, int *y,
|
EGetGeometry(Win win, EX_Window * root_return, int *x, int *y,
|
||||||
int *w, int *h, int *bw, int *depth)
|
int *w, int *h, int *bw, int *depth)
|
||||||
{
|
{
|
||||||
if (!win)
|
if (!win)
|
||||||
|
@ -956,7 +956,7 @@ EConfigureWindow(Win win, unsigned int mask, XWindowChanges * wc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept)
|
ESetWindowBackgroundPixmap(Win win, EX_Pixmap pmap, int kept)
|
||||||
{
|
{
|
||||||
if (!win)
|
if (!win)
|
||||||
return;
|
return;
|
||||||
|
@ -970,10 +970,10 @@ ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept)
|
||||||
XSetWindowBackgroundPixmap(disp, win->xwin, pmap);
|
XSetWindowBackgroundPixmap(disp, win->xwin, pmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EGetWindowBackgroundPixmap(Win win)
|
EGetWindowBackgroundPixmap(Win win)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
if (!win)
|
if (!win)
|
||||||
return NoXID;
|
return NoXID;
|
||||||
|
@ -1135,9 +1135,24 @@ ELowerWindow(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXRestackWindows(Window * windows, int nwindows)
|
EXRestackWindows(EX_Window * windows, int nwindows)
|
||||||
{
|
{
|
||||||
XRestackWindows(disp, windows, nwindows);
|
#if SIZEOF_INT == SIZEOF_LONG
|
||||||
|
XRestackWindows(disp, (Window *) windows, nwindows);
|
||||||
|
#else
|
||||||
|
int i;
|
||||||
|
Window *_wins;
|
||||||
|
|
||||||
|
_wins = EMALLOC(Window, nwindows);
|
||||||
|
if (!_wins)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < nwindows; i++)
|
||||||
|
_wins[i] = windows[i];
|
||||||
|
XRestackWindows(disp, _wins, nwindows);
|
||||||
|
|
||||||
|
Efree(_wins);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1161,19 +1176,22 @@ EClearArea(Win win, int x, int y, unsigned int w, unsigned int h)
|
||||||
int
|
int
|
||||||
ETranslateCoordinates(Win src_w, Win dst_w, int src_x, int src_y,
|
ETranslateCoordinates(Win src_w, Win dst_w, int src_x, int src_y,
|
||||||
int *dest_x_return, int *dest_y_return,
|
int *dest_x_return, int *dest_y_return,
|
||||||
Window * child_return)
|
EX_Window * child_return)
|
||||||
{
|
{
|
||||||
Window child;
|
Window child;
|
||||||
|
Bool rc;
|
||||||
|
|
||||||
if (!child_return)
|
rc = XTranslateCoordinates(disp, src_w->xwin, dst_w->xwin, src_x, src_y,
|
||||||
child_return = &child;
|
dest_x_return, dest_y_return, &child);
|
||||||
|
|
||||||
return XTranslateCoordinates(disp, src_w->xwin, dst_w->xwin, src_x, src_y,
|
if (child_return)
|
||||||
dest_x_return, dest_y_return, child_return);
|
*child_return = child;
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXWarpPointer(Window xwin, int x, int y)
|
EXWarpPointer(EX_Window xwin, int x, int y)
|
||||||
{
|
{
|
||||||
XWarpPointer(disp, NoXID, xwin, 0, 0, 0, 0, x, y);
|
XWarpPointer(disp, NoXID, xwin, 0, 0, 0, 0, x, y);
|
||||||
}
|
}
|
||||||
|
@ -1185,12 +1203,13 @@ EWarpPointer(Win win, int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EXQueryPointer(Window xwin, int *px, int *py, Window * pchild,
|
EXQueryPointer(EX_Window xwin, int *px, int *py, EX_Window * pchild,
|
||||||
unsigned int *pmask)
|
unsigned int *pmask)
|
||||||
{
|
{
|
||||||
Window root, child;
|
Window root, child;
|
||||||
int root_x, root_y;
|
int root_x, root_y;
|
||||||
unsigned int mask;
|
unsigned int mask;
|
||||||
|
Bool rc;
|
||||||
|
|
||||||
if (xwin == NoXID)
|
if (xwin == NoXID)
|
||||||
xwin = WinGetXwin(VROOT);
|
xwin = WinGetXwin(VROOT);
|
||||||
|
@ -1199,19 +1218,23 @@ EXQueryPointer(Window xwin, int *px, int *py, Window * pchild,
|
||||||
px = &root_x;
|
px = &root_x;
|
||||||
if (!py)
|
if (!py)
|
||||||
py = &root_y;
|
py = &root_y;
|
||||||
if (!pchild)
|
|
||||||
pchild = &child;
|
|
||||||
if (!pmask)
|
if (!pmask)
|
||||||
pmask = &mask;
|
pmask = &mask;
|
||||||
|
|
||||||
return XQueryPointer(disp, xwin, &root, pchild, &root_x, &root_y, px, py,
|
rc = XQueryPointer(disp, xwin, &root, &child, &root_x, &root_y, px, py,
|
||||||
pmask);
|
pmask);
|
||||||
|
|
||||||
|
if (pchild)
|
||||||
|
*pchild = child;
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EQueryPointer(Win win, int *px, int *py, Window * pchild, unsigned int *pmask)
|
EQueryPointer(Win win, int *px, int *py, EX_Window * pchild,
|
||||||
|
unsigned int *pmask)
|
||||||
{
|
{
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
|
|
||||||
xwin = (win) ? win->xwin : WinGetXwin(VROOT);
|
xwin = (win) ? win->xwin : WinGetXwin(VROOT);
|
||||||
|
|
||||||
|
@ -1219,7 +1242,7 @@ EQueryPointer(Win win, int *px, int *py, Window * pchild, unsigned int *pmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EXDrawableOk(Drawable draw)
|
EXDrawableOk(EX_Drawable draw)
|
||||||
{
|
{
|
||||||
if (draw == NoXID)
|
if (draw == NoXID)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1228,7 +1251,7 @@ EXDrawableOk(Drawable draw)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
EXWindowOk(Window xwin)
|
EXWindowOk(EX_Window xwin)
|
||||||
{
|
{
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
|
|
||||||
|
@ -1238,13 +1261,13 @@ EXWindowOk(Window xwin)
|
||||||
return EXGetWindowAttributes(xwin, &xwa);
|
return EXGetWindowAttributes(xwin, &xwa);
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyCode
|
EX_KeyCode
|
||||||
EKeysymToKeycode(KeySym keysym)
|
EKeysymToKeycode(EX_KeySym keysym)
|
||||||
{
|
{
|
||||||
return XKeysymToKeycode(disp, keysym);
|
return XKeysymToKeycode(disp, keysym);
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyCode
|
EX_KeyCode
|
||||||
EKeynameToKeycode(const char *name)
|
EKeynameToKeycode(const char *name)
|
||||||
{
|
{
|
||||||
return XKeysymToKeycode(disp, XStringToKeysym(name));
|
return XKeysymToKeycode(disp, XStringToKeysym(name));
|
||||||
|
@ -1255,7 +1278,7 @@ EKeynameToKeycode(const char *name)
|
||||||
|
|
||||||
#if DEBUG_SHAPE_OPS || DEBUG_SHAPE_PROPAGATE
|
#if DEBUG_SHAPE_OPS || DEBUG_SHAPE_PROPAGATE
|
||||||
static void
|
static void
|
||||||
_EShapeShow(const char *txt, Window xwin, XRectangle * pr, int nr)
|
_EShapeShow(const char *txt, EX_Window xwin, XRectangle * pr, int nr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -1315,7 +1338,7 @@ EShapeUpdate(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_EShapeCombineMask(Win win, int dest, int x, int y, Pixmap pmap, int op)
|
_EShapeCombineMask(Win win, int dest, int x, int y, EX_Pixmap pmap, int op)
|
||||||
{
|
{
|
||||||
char wasshaped = 0;
|
char wasshaped = 0;
|
||||||
|
|
||||||
|
@ -1345,11 +1368,11 @@ _EShapeCombineMask(Win win, int dest, int x, int y, Pixmap pmap, int op)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_EShapeCombineMaskTiled(Win win, int dest, int x, int y,
|
_EShapeCombineMaskTiled(Win win, int dest, int x, int y,
|
||||||
Pixmap pmap, int op, int w, int h)
|
EX_Pixmap pmap, int op, int w, int h)
|
||||||
{
|
{
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
GC gc;
|
GC gc;
|
||||||
Window tm;
|
EX_Window tm;
|
||||||
|
|
||||||
gcv.fill_style = FillTiled;
|
gcv.fill_style = FillTiled;
|
||||||
gcv.tile = pmap;
|
gcv.tile = pmap;
|
||||||
|
@ -1529,19 +1552,19 @@ EShapeCheck(Win win)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EShapeSetMask(Win win, int x, int y, Pixmap mask)
|
EShapeSetMask(Win win, int x, int y, EX_Pixmap mask)
|
||||||
{
|
{
|
||||||
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeSet);
|
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EShapeUnionMask(Win win, int x, int y, Pixmap mask)
|
EShapeUnionMask(Win win, int x, int y, EX_Pixmap mask)
|
||||||
{
|
{
|
||||||
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeUnion);
|
_EShapeCombineMask(win, ShapeBounding, x, y, mask, ShapeUnion);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EShapeSetMaskTiled(Win win, int x, int y, Pixmap mask, int w, int h)
|
EShapeSetMaskTiled(Win win, int x, int y, EX_Pixmap mask, int w, int h)
|
||||||
{
|
{
|
||||||
_EShapeCombineMaskTiled(win, ShapeBounding, x, y, mask, ShapeSet, w, h);
|
_EShapeCombineMaskTiled(win, ShapeBounding, x, y, mask, ShapeSet, w, h);
|
||||||
}
|
}
|
||||||
|
@ -1568,10 +1591,10 @@ EShapeSetShape(Win win, int x, int y, Win src_win)
|
||||||
return win->num_rect != 0;
|
return win->num_rect != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Pixmap
|
static EX_Pixmap
|
||||||
_EWindowGetShapePixmap(Win win, unsigned int fg, unsigned int bg)
|
_EWindowGetShapePixmap(Win win, unsigned int fg, unsigned int bg)
|
||||||
{
|
{
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
GC gc;
|
GC gc;
|
||||||
int i;
|
int i;
|
||||||
const XRectangle *rect;
|
const XRectangle *rect;
|
||||||
|
@ -1597,24 +1620,24 @@ _EWindowGetShapePixmap(Win win, unsigned int fg, unsigned int bg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build mask from window shape rects */
|
/* Build mask from window shape rects */
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EWindowGetShapePixmap(Win win)
|
EWindowGetShapePixmap(Win win)
|
||||||
{
|
{
|
||||||
return _EWindowGetShapePixmap(win, 1, 0);
|
return _EWindowGetShapePixmap(win, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build inverted mask from window shape rects */
|
/* Build inverted mask from window shape rects */
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EWindowGetShapePixmapInverted(Win win)
|
EWindowGetShapePixmapInverted(Win win)
|
||||||
{
|
{
|
||||||
return _EWindowGetShapePixmap(win, 0, 1);
|
return _EWindowGetShapePixmap(win, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
ECreatePixmap(Win win, unsigned int width, unsigned int height,
|
ECreatePixmap(Win win, unsigned int width, unsigned int height,
|
||||||
unsigned int depth)
|
unsigned int depth)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
|
|
||||||
if (depth == 0)
|
if (depth == 0)
|
||||||
depth = win->depth;
|
depth = win->depth;
|
||||||
|
@ -1627,7 +1650,7 @@ ECreatePixmap(Win win, unsigned int width, unsigned int height,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EFreePixmap(Pixmap pmap)
|
EFreePixmap(EX_Pixmap pmap)
|
||||||
{
|
{
|
||||||
#if DEBUG_PIXMAP
|
#if DEBUG_PIXMAP
|
||||||
Eprintf("%s: %#lx\n", __func__, pmap);
|
Eprintf("%s: %#lx\n", __func__, pmap);
|
||||||
|
@ -1635,11 +1658,11 @@ EFreePixmap(Pixmap pmap)
|
||||||
XFreePixmap(disp, pmap);
|
XFreePixmap(disp, pmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
|
EXCreatePixmapCopy(EX_Pixmap src, unsigned int w, unsigned int h,
|
||||||
unsigned int depth)
|
unsigned int depth)
|
||||||
{
|
{
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
GC gc;
|
GC gc;
|
||||||
|
|
||||||
pmap = XCreatePixmap(disp, src, w, h, depth);
|
pmap = XCreatePixmap(disp, src, w, h, depth);
|
||||||
|
@ -1653,14 +1676,14 @@ EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXCopyAreaGC(Drawable src, Drawable dst, GC gc, int sx, int sy,
|
EXCopyAreaGC(EX_Drawable src, EX_Drawable dst, GC gc, int sx, int sy,
|
||||||
unsigned int w, unsigned int h, int dx, int dy)
|
unsigned int w, unsigned int h, int dx, int dy)
|
||||||
{
|
{
|
||||||
XCopyArea(disp, src, dst, gc, sx, sy, w, h, dx, dy);
|
XCopyArea(disp, src, dst, gc, sx, sy, w, h, dx, dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
|
EXCopyArea(EX_Drawable src, EX_Drawable dst, int sx, int sy,
|
||||||
unsigned int w, unsigned int h, int dx, int dy)
|
unsigned int w, unsigned int h, int dx, int dy)
|
||||||
{
|
{
|
||||||
GC gc;
|
GC gc;
|
||||||
|
@ -1671,8 +1694,8 @@ EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst, int sx, int sy,
|
EXCopyAreaTiled(EX_Drawable src, EX_Pixmap mask, EX_Drawable dst,
|
||||||
unsigned int w, unsigned int h, int dx, int dy)
|
int sx, int sy, unsigned int w, unsigned int h, int dx, int dy)
|
||||||
{
|
{
|
||||||
GC gc;
|
GC gc;
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
|
@ -1690,7 +1713,7 @@ EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst, int sx, int sy,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXFillAreaSolid(Drawable dst, int x, int y, unsigned int w, unsigned int h,
|
EXFillAreaSolid(EX_Drawable dst, int x, int y, unsigned int w, unsigned int h,
|
||||||
unsigned int pixel)
|
unsigned int pixel)
|
||||||
{
|
{
|
||||||
GC gc;
|
GC gc;
|
||||||
|
@ -1703,7 +1726,7 @@ EXFillAreaSolid(Drawable dst, int x, int y, unsigned int w, unsigned int h,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_EXDrawRectangle(Drawable dst, GC gc, int x, int y,
|
_EXDrawRectangle(EX_Drawable dst, GC gc, int x, int y,
|
||||||
unsigned int w, unsigned int h, unsigned int pixel)
|
unsigned int w, unsigned int h, unsigned int pixel)
|
||||||
{
|
{
|
||||||
XSetForeground(disp, gc, pixel);
|
XSetForeground(disp, gc, pixel);
|
||||||
|
@ -1711,7 +1734,7 @@ _EXDrawRectangle(Drawable dst, GC gc, int x, int y,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_EXFillRectangle(Drawable dst, GC gc, int x, int y,
|
_EXFillRectangle(EX_Drawable dst, GC gc, int x, int y,
|
||||||
unsigned int w, unsigned int h, unsigned int pixel)
|
unsigned int w, unsigned int h, unsigned int pixel)
|
||||||
{
|
{
|
||||||
XSetForeground(disp, gc, pixel);
|
XSetForeground(disp, gc, pixel);
|
||||||
|
@ -1719,7 +1742,7 @@ _EXFillRectangle(Drawable dst, GC gc, int x, int y,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXPaintRectangle(Drawable dst, int x, int y,
|
EXPaintRectangle(EX_Drawable dst, int x, int y,
|
||||||
unsigned int w, unsigned int h,
|
unsigned int w, unsigned int h,
|
||||||
unsigned int fg, unsigned int bg)
|
unsigned int fg, unsigned int bg)
|
||||||
{
|
{
|
||||||
|
@ -1735,7 +1758,7 @@ EXPaintRectangle(Drawable dst, int x, int y,
|
||||||
}
|
}
|
||||||
|
|
||||||
GC
|
GC
|
||||||
EXCreateGC(Drawable draw, unsigned int mask, XGCValues * val)
|
EXCreateGC(EX_Drawable draw, unsigned int mask, XGCValues * val)
|
||||||
{
|
{
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
|
|
||||||
|
@ -1761,13 +1784,13 @@ EXFreeGC(GC gc)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EXSendEvent(Window xwin, unsigned int event_mask, XEvent * ev)
|
EXSendEvent(EX_Window xwin, unsigned int event_mask, XEvent * ev)
|
||||||
{
|
{
|
||||||
XSendEvent(disp, xwin, False, event_mask, ev);
|
XSendEvent(disp, xwin, False, event_mask, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
EAllocColor(Colormap cmap, unsigned int argb)
|
EAllocColor(EX_Colormap cmap, unsigned int argb)
|
||||||
{
|
{
|
||||||
XColor xc;
|
XColor xc;
|
||||||
|
|
||||||
|
@ -1982,10 +2005,10 @@ EVisualIsARGB(Visual * vis)
|
||||||
* Misc
|
* Misc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Time
|
EX_Time
|
||||||
EGetTimestamp(void)
|
EGetTimestamp(void)
|
||||||
{
|
{
|
||||||
static Window win_ts = NoXID;
|
static EX_Window win_ts = NoXID;
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
|
@ -2009,7 +2032,7 @@ EGetTimestamp(void)
|
||||||
|
|
||||||
#include <X11/extensions/Xcomposite.h>
|
#include <X11/extensions/Xcomposite.h>
|
||||||
|
|
||||||
Pixmap
|
EX_Pixmap
|
||||||
EWindowGetPixmap(const Win win)
|
EWindowGetPixmap(const Win win)
|
||||||
{
|
{
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
|
@ -2032,10 +2055,10 @@ EWindowGetPixmap(const Win win)
|
||||||
#define _G(x) (((x) >> 8) & 0xff)
|
#define _G(x) (((x) >> 8) & 0xff)
|
||||||
#define _B(x) (((x) ) & 0xff)
|
#define _B(x) (((x) ) & 0xff)
|
||||||
|
|
||||||
Picture
|
EX_Picture
|
||||||
EPictureCreate(Win win, Drawable draw)
|
EPictureCreate(Win win, EX_Drawable draw)
|
||||||
{
|
{
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
|
|
||||||
if (!win)
|
if (!win)
|
||||||
|
@ -2046,12 +2069,12 @@ EPictureCreate(Win win, Drawable draw)
|
||||||
return pict;
|
return pict;
|
||||||
}
|
}
|
||||||
|
|
||||||
Picture
|
EX_Picture
|
||||||
EPictureCreateSolid(Window xwin, int argb, unsigned int a, unsigned int rgb)
|
EPictureCreateSolid(EX_Window xwin, int argb, unsigned int a, unsigned int rgb)
|
||||||
{
|
{
|
||||||
Display *dpy = disp;
|
Display *dpy = disp;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
XRenderColor c;
|
XRenderColor c;
|
||||||
|
@ -2074,11 +2097,11 @@ EPictureCreateSolid(Window xwin, int argb, unsigned int a, unsigned int rgb)
|
||||||
return pict;
|
return pict;
|
||||||
}
|
}
|
||||||
|
|
||||||
Picture
|
EX_Picture
|
||||||
EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap)
|
EPictureCreateBuffer(Win win, int w, int h, EX_Pixmap * ppmap)
|
||||||
{
|
{
|
||||||
Picture pict;
|
EX_Picture pict;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
XRenderPictFormat *pictfmt;
|
XRenderPictFormat *pictfmt;
|
||||||
|
|
||||||
pmap = XCreatePixmap(disp, WinGetXwin(win), w, h, WinGetDepth(win));
|
pmap = XCreatePixmap(disp, WinGetXwin(win), w, h, WinGetDepth(win));
|
||||||
|
@ -2093,7 +2116,7 @@ EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EPictureDestroy(Picture pict)
|
EPictureDestroy(EX_Picture pict)
|
||||||
{
|
{
|
||||||
XRenderFreePicture(disp, pict);
|
XRenderFreePicture(disp, pict);
|
||||||
}
|
}
|
||||||
|
@ -2103,7 +2126,7 @@ EPictureDestroy(Picture pict)
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
|
|
||||||
void
|
void
|
||||||
EPictureSetClip(Picture pict, XserverRegion clip)
|
EPictureSetClip(EX_Picture pict, EX_SrvRegion clip)
|
||||||
{
|
{
|
||||||
XFixesSetPictureClipRegion(disp, pict, 0, 0, clip);
|
XFixesSetPictureClipRegion(disp, pict, 0, 0, clip);
|
||||||
}
|
}
|
||||||
|
@ -2118,10 +2141,10 @@ static int n_rgn_c = 0;
|
||||||
static int n_rgn_d = 0;
|
static int n_rgn_d = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionCreate(void)
|
ERegionCreate(void)
|
||||||
{
|
{
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = XFixesCreateRegion(disp, NULL, 0);
|
rgn = XFixesCreateRegion(disp, NULL, 0);
|
||||||
|
|
||||||
|
@ -2133,10 +2156,10 @@ ERegionCreate(void)
|
||||||
return rgn;
|
return rgn;
|
||||||
}
|
}
|
||||||
|
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionCreateRect(int x, int y, int w, int h)
|
ERegionCreateRect(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
XRectangle rct;
|
XRectangle rct;
|
||||||
|
|
||||||
rct.x = x;
|
rct.x = x;
|
||||||
|
@ -2154,10 +2177,10 @@ ERegionCreateRect(int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_DESK_EXPOSE
|
#if USE_DESK_EXPOSE
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionCreateFromRects(XRectangle * rectangles, int nrectangles)
|
ERegionCreateFromRects(XRectangle * rectangles, int nrectangles)
|
||||||
{
|
{
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = XFixesCreateRegion(disp, rectangles, nrectangles);
|
rgn = XFixesCreateRegion(disp, rectangles, nrectangles);
|
||||||
|
|
||||||
|
@ -2170,10 +2193,10 @@ ERegionCreateFromRects(XRectangle * rectangles, int nrectangles)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionCreateFromWindow(Win win)
|
ERegionCreateFromWindow(Win win)
|
||||||
{
|
{
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn =
|
rgn =
|
||||||
XFixesCreateRegionFromWindow(disp, WinGetXwin(win), WindowRegionBounding);
|
XFixesCreateRegionFromWindow(disp, WinGetXwin(win), WindowRegionBounding);
|
||||||
|
@ -2186,17 +2209,17 @@ ERegionCreateFromWindow(Win win)
|
||||||
return rgn;
|
return rgn;
|
||||||
}
|
}
|
||||||
|
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionCopy(XserverRegion rgn, XserverRegion src)
|
ERegionCopy(EX_SrvRegion rgn, EX_SrvRegion src)
|
||||||
{
|
{
|
||||||
XFixesCopyRegion(disp, rgn, src);
|
XFixesCopyRegion(disp, rgn, src);
|
||||||
return rgn;
|
return rgn;
|
||||||
}
|
}
|
||||||
|
|
||||||
XserverRegion
|
EX_SrvRegion
|
||||||
ERegionClone(XserverRegion src)
|
ERegionClone(EX_SrvRegion src)
|
||||||
{
|
{
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = ERegionCreate();
|
rgn = ERegionCreate();
|
||||||
ERegionCopy(rgn, src);
|
ERegionCopy(rgn, src);
|
||||||
|
@ -2205,7 +2228,7 @@ ERegionClone(XserverRegion src)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionDestroy(XserverRegion rgn)
|
ERegionDestroy(EX_SrvRegion rgn)
|
||||||
{
|
{
|
||||||
#if DEBUG_REGIONS
|
#if DEBUG_REGIONS
|
||||||
n_rgn_d++;
|
n_rgn_d++;
|
||||||
|
@ -2216,13 +2239,13 @@ ERegionDestroy(XserverRegion rgn)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionEmpty(XserverRegion rgn)
|
ERegionEmpty(EX_SrvRegion rgn)
|
||||||
{
|
{
|
||||||
XFixesSetRegion(disp, rgn, NULL, 0);
|
XFixesSetRegion(disp, rgn, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionSetRect(XserverRegion rgn, int x, int y, int w, int h)
|
ERegionSetRect(EX_SrvRegion rgn, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
XRectangle rct;
|
XRectangle rct;
|
||||||
|
|
||||||
|
@ -2234,7 +2257,7 @@ ERegionSetRect(XserverRegion rgn, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionTranslate(XserverRegion rgn, int dx, int dy)
|
ERegionTranslate(EX_SrvRegion rgn, int dx, int dy)
|
||||||
{
|
{
|
||||||
if (dx == 0 && dy == 0)
|
if (dx == 0 && dy == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -2242,29 +2265,29 @@ ERegionTranslate(XserverRegion rgn, int dx, int dy)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionIntersect(XserverRegion dst, XserverRegion src)
|
ERegionIntersect(EX_SrvRegion dst, EX_SrvRegion src)
|
||||||
{
|
{
|
||||||
XFixesIntersectRegion(disp, dst, dst, src);
|
XFixesIntersectRegion(disp, dst, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionUnion(XserverRegion dst, XserverRegion src)
|
ERegionUnion(EX_SrvRegion dst, EX_SrvRegion src)
|
||||||
{
|
{
|
||||||
XFixesUnionRegion(disp, dst, dst, src);
|
XFixesUnionRegion(disp, dst, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionSubtract(XserverRegion dst, XserverRegion src)
|
ERegionSubtract(EX_SrvRegion dst, EX_SrvRegion src)
|
||||||
{
|
{
|
||||||
XFixesSubtractRegion(disp, dst, dst, src);
|
XFixesSubtractRegion(disp, dst, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionIntersectOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
ERegionIntersectOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
|
||||||
XserverRegion tmp)
|
EX_SrvRegion tmp)
|
||||||
{
|
{
|
||||||
Display *dpy = disp;
|
Display *dpy = disp;
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = src;
|
rgn = src;
|
||||||
if (dx != 0 || dy != 0)
|
if (dx != 0 || dy != 0)
|
||||||
|
@ -2276,11 +2299,11 @@ ERegionIntersectOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionSubtractOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
ERegionSubtractOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
|
||||||
XserverRegion tmp)
|
EX_SrvRegion tmp)
|
||||||
{
|
{
|
||||||
Display *dpy = disp;
|
Display *dpy = disp;
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = src;
|
rgn = src;
|
||||||
if (dx != 0 || dy != 0)
|
if (dx != 0 || dy != 0)
|
||||||
|
@ -2293,11 +2316,11 @@ ERegionSubtractOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
||||||
|
|
||||||
#if 0 /* Unused */
|
#if 0 /* Unused */
|
||||||
void
|
void
|
||||||
ERegionUnionOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
ERegionUnionOffset(EX_SrvRegion dst, int dx, int dy, EX_SrvRegion src,
|
||||||
XserverRegion tmp)
|
EX_SrvRegion tmp)
|
||||||
{
|
{
|
||||||
Display *dpy = disp;
|
Display *dpy = disp;
|
||||||
XserverRegion rgn;
|
EX_SrvRegion rgn;
|
||||||
|
|
||||||
rgn = src;
|
rgn = src;
|
||||||
if (dx != 0 || dy != 0)
|
if (dx != 0 || dy != 0)
|
||||||
|
@ -2311,7 +2334,7 @@ ERegionUnionOffset(XserverRegion dst, int dx, int dy, XserverRegion src,
|
||||||
|
|
||||||
#if 0 /* Unused (for debug) */
|
#if 0 /* Unused (for debug) */
|
||||||
int
|
int
|
||||||
ERegionIsEmpty(XserverRegion rgn)
|
ERegionIsEmpty(EX_SrvRegion rgn)
|
||||||
{
|
{
|
||||||
int nr;
|
int nr;
|
||||||
XRectangle *pr;
|
XRectangle *pr;
|
||||||
|
@ -2324,7 +2347,7 @@ ERegionIsEmpty(XserverRegion rgn)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ERegionShow(const char *txt, XserverRegion rgn,
|
ERegionShow(const char *txt, EX_SrvRegion rgn,
|
||||||
void (*prf) (const char *fmt, ...))
|
void (*prf) (const char *fmt, ...))
|
||||||
{
|
{
|
||||||
int i, nr;
|
int i, nr;
|
||||||
|
|
10
src/xprop.h
10
src/xprop.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2013 Kim Woelders
|
* Copyright (C) 2004-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -23,13 +23,7 @@
|
||||||
#ifndef _XPROP_H_
|
#ifndef _XPROP_H_
|
||||||
#define _XPROP_H_
|
#define _XPROP_H_
|
||||||
|
|
||||||
#define EX_ID unsigned int
|
#include "xtypes.h"
|
||||||
#define EX_Drawable EX_ID
|
|
||||||
#define EX_Window EX_ID
|
|
||||||
#define EX_Pixmap EX_ID
|
|
||||||
#define EX_Atom EX_ID
|
|
||||||
#define EX_Time EX_ID
|
|
||||||
#define EX_GC GC
|
|
||||||
|
|
||||||
EX_Atom ex_atom_get(const char *name);
|
EX_Atom ex_atom_get(const char *name);
|
||||||
void ex_atoms_get(const char *const *names,
|
void ex_atoms_get(const char *const *names,
|
||||||
|
|
18
src/xtypes.h
18
src/xtypes.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2008-2013 Kim Woelders
|
* Copyright (C) 2008-2014 Kim Woelders
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
@ -25,8 +25,22 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
|
#define EX_ID unsigned int
|
||||||
|
#define EX_Atom EX_ID
|
||||||
|
#define EX_Colormap EX_ID
|
||||||
|
#define EX_Cursor EX_ID
|
||||||
|
#define EX_Drawable EX_ID
|
||||||
|
#define EX_KeySym EX_ID
|
||||||
|
#define EX_Picture EX_ID
|
||||||
|
#define EX_Pixmap EX_ID
|
||||||
|
#define EX_SrvRegion EX_ID
|
||||||
|
#define EX_Window EX_ID
|
||||||
|
|
||||||
|
#define EX_KeyCode unsigned char
|
||||||
|
#define EX_Time unsigned int
|
||||||
|
|
||||||
typedef struct _xwin *Win;
|
typedef struct _xwin *Win;
|
||||||
|
|
||||||
#define NoXID None
|
#define NoXID 0U
|
||||||
|
|
||||||
#endif /* _XTYPES_H_ */
|
#endif /* _XTYPES_H_ */
|
||||||
|
|
156
src/xwin.h
156
src/xwin.h
|
@ -75,7 +75,7 @@ void ESync(unsigned int mask);
|
||||||
int EVisualIsARGB(Visual * vis);
|
int EVisualIsARGB(Visual * vis);
|
||||||
Visual *EVisualFindARGB(void);
|
Visual *EVisualFindARGB(void);
|
||||||
|
|
||||||
Time EGetTimestamp(void);
|
EX_Time EGetTimestamp(void);
|
||||||
|
|
||||||
typedef void (EventCallbackFunc) (Win win, XEvent * ev, void *prm);
|
typedef void (EventCallbackFunc) (Win win, XEvent * ev, void *prm);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ struct _xwin {
|
||||||
struct _xwin *next;
|
struct _xwin *next;
|
||||||
struct _xwin *prev;
|
struct _xwin *prev;
|
||||||
EventCallbackList cbl;
|
EventCallbackList cbl;
|
||||||
Window xwin;
|
EX_Window xwin;
|
||||||
Win parent;
|
Win parent;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
short depth;
|
short depth;
|
||||||
|
@ -108,15 +108,15 @@ struct _xwin {
|
||||||
int ord;
|
int ord;
|
||||||
XRectangle *rects;
|
XRectangle *rects;
|
||||||
Visual *visual;
|
Visual *visual;
|
||||||
Colormap cmap;
|
EX_Colormap cmap;
|
||||||
Pixmap bgpmap;
|
EX_Pixmap bgpmap;
|
||||||
unsigned int bgcol;
|
unsigned int bgcol;
|
||||||
#if USE_XI2
|
#if USE_XI2
|
||||||
unsigned int event_mask;
|
unsigned int event_mask;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
Win ELookupXwin(Window xwin);
|
Win ELookupXwin(EX_Window xwin);
|
||||||
|
|
||||||
#define WinGetXwin(win) ((win)->xwin)
|
#define WinGetXwin(win) ((win)->xwin)
|
||||||
#define WinGetPmap(win) ((win)->bgpmap)
|
#define WinGetPmap(win) ((win)->bgpmap)
|
||||||
|
@ -132,12 +132,12 @@ Win ELookupXwin(Window xwin);
|
||||||
#define WinIsMapped(win) ((win)->mapped != 0)
|
#define WinIsMapped(win) ((win)->mapped != 0)
|
||||||
#define WinIsShaped(win) ((win)->num_rect != 0)
|
#define WinIsShaped(win) ((win)->num_rect != 0)
|
||||||
|
|
||||||
Win ECreateWinFromXwin(Window xwin);
|
Win ECreateWinFromXwin(EX_Window xwin);
|
||||||
void EDestroyWin(Win win);
|
void EDestroyWin(Win win);
|
||||||
|
|
||||||
Win ERegisterWindow(Window xwin, XWindowAttributes * pxwa);
|
Win ERegisterWindow(EX_Window xwin, XWindowAttributes * pxwa);
|
||||||
void EUnregisterWindow(Win win);
|
void EUnregisterWindow(Win win);
|
||||||
void EUnregisterXwin(Window xwin);
|
void EUnregisterXwin(EX_Window xwin);
|
||||||
void EventCallbackRegister(Win win, EventCallbackFunc * func,
|
void EventCallbackRegister(Win win, EventCallbackFunc * func,
|
||||||
void *prm);
|
void *prm);
|
||||||
void EventCallbackUnregister(Win win, EventCallbackFunc * func,
|
void EventCallbackUnregister(Win win, EventCallbackFunc * func,
|
||||||
|
@ -172,23 +172,24 @@ void EMapWindow(Win win);
|
||||||
void EMapRaised(Win win);
|
void EMapRaised(Win win);
|
||||||
void EUnmapWindow(Win win);
|
void EUnmapWindow(Win win);
|
||||||
void EReparentWindow(Win win, Win parent, int x, int y);
|
void EReparentWindow(Win win, Win parent, int x, int y);
|
||||||
int EGetGeometry(Win win, Window * root_return,
|
int EGetGeometry(Win win, EX_Window * root_return,
|
||||||
int *x, int *y, int *w, int *h, int *bw,
|
int *x, int *y, int *w, int *h, int *bw,
|
||||||
int *depth);
|
int *depth);
|
||||||
void EGetWindowAttributes(Win win, XWindowAttributes * pxwa);
|
void EGetWindowAttributes(Win win, XWindowAttributes * pxwa);
|
||||||
void EConfigureWindow(Win win, unsigned int mask,
|
void EConfigureWindow(Win win, unsigned int mask,
|
||||||
XWindowChanges * wc);
|
XWindowChanges * wc);
|
||||||
void ESetWindowBackgroundPixmap(Win win, Pixmap pmap, int kept);
|
void ESetWindowBackgroundPixmap(Win win, EX_Pixmap pmap,
|
||||||
Pixmap EGetWindowBackgroundPixmap(Win win);
|
int kept);
|
||||||
|
EX_Pixmap EGetWindowBackgroundPixmap(Win win);
|
||||||
void EFreeWindowBackgroundPixmap(Win win);
|
void EFreeWindowBackgroundPixmap(Win win);
|
||||||
void ESetWindowBackground(Win win, unsigned int col);
|
void ESetWindowBackground(Win win, unsigned int col);
|
||||||
int ETranslateCoordinates(Win src_w, Win dst_w,
|
int ETranslateCoordinates(Win src_w, Win dst_w,
|
||||||
int src_x, int src_y,
|
int src_x, int src_y,
|
||||||
int *dest_x_return,
|
int *dest_x_return,
|
||||||
int *dest_y_return,
|
int *dest_y_return,
|
||||||
Window * child_return);
|
EX_Window * child_return);
|
||||||
int EXDrawableOk(Drawable draw);
|
int EXDrawableOk(EX_Drawable draw);
|
||||||
int EXWindowOk(Window xwin);
|
int EXWindowOk(EX_Window xwin);
|
||||||
|
|
||||||
void ESelectInput(Win win, unsigned int event_mask);
|
void ESelectInput(Win win, unsigned int event_mask);
|
||||||
void ESelectInputChange(Win win, unsigned int set,
|
void ESelectInputChange(Win win, unsigned int set,
|
||||||
|
@ -203,14 +204,14 @@ void EClearWindowExpose(Win win);
|
||||||
void EClearArea(Win win, int x, int y,
|
void EClearArea(Win win, int x, int y,
|
||||||
unsigned int w, unsigned int h);
|
unsigned int w, unsigned int h);
|
||||||
|
|
||||||
Pixmap ECreatePixmap(Win win, unsigned int width,
|
EX_Pixmap ECreatePixmap(Win win, unsigned int width,
|
||||||
unsigned int height, unsigned int depth);
|
unsigned int height, unsigned int depth);
|
||||||
void EFreePixmap(Pixmap pixmap);
|
void EFreePixmap(EX_Pixmap pixmap);
|
||||||
|
|
||||||
int EShapeUpdate(Win win);
|
int EShapeUpdate(Win win);
|
||||||
void EShapeSetMask(Win win, int x, int y, Pixmap mask);
|
void EShapeSetMask(Win win, int x, int y, EX_Pixmap mask);
|
||||||
void EShapeUnionMask(Win win, int x, int y, Pixmap mask);
|
void EShapeUnionMask(Win win, int x, int y, EX_Pixmap mask);
|
||||||
void EShapeSetMaskTiled(Win win, int x, int y, Pixmap mask,
|
void EShapeSetMaskTiled(Win win, int x, int y, EX_Pixmap mask,
|
||||||
int w, int h);
|
int w, int h);
|
||||||
void EShapeSetRects(Win win, int x, int y,
|
void EShapeSetRects(Win win, int x, int y,
|
||||||
XRectangle * rect, int n_rects);
|
XRectangle * rect, int n_rects);
|
||||||
|
@ -219,14 +220,14 @@ void EShapeUnionRects(Win win, int x, int y,
|
||||||
int EShapeSetShape(Win win, int x, int y, Win src_win);
|
int EShapeSetShape(Win win, int x, int y, Win src_win);
|
||||||
int EShapePropagate(Win win);
|
int EShapePropagate(Win win);
|
||||||
int EShapeCheck(Win win);
|
int EShapeCheck(Win win);
|
||||||
Pixmap EWindowGetShapePixmap(Win win);
|
EX_Pixmap EWindowGetShapePixmap(Win win);
|
||||||
Pixmap EWindowGetShapePixmapInverted(Win win);
|
EX_Pixmap EWindowGetShapePixmapInverted(Win win);
|
||||||
|
|
||||||
void EWarpPointer(Win win, int x, int y);
|
void EWarpPointer(Win win, int x, int y);
|
||||||
int EQueryPointer(Win win, int *px, int *py,
|
int EQueryPointer(Win win, int *px, int *py,
|
||||||
Window * pchild, unsigned int *pmask);
|
EX_Window * pchild, unsigned int *pmask);
|
||||||
|
|
||||||
unsigned int EAllocColor(Colormap cmap, unsigned int argb);
|
unsigned int EAllocColor(EX_Colormap cmap, unsigned int argb);
|
||||||
|
|
||||||
#define _A(x) (((x) >> 24) & 0xff)
|
#define _A(x) (((x) >> 24) & 0xff)
|
||||||
#define _R(x) (((x) >> 16) & 0xff)
|
#define _R(x) (((x) >> 16) & 0xff)
|
||||||
|
@ -248,52 +249,54 @@ unsigned int EAllocColor(Colormap cmap, unsigned int argb);
|
||||||
#define COLOR32_TO_ARGB16(c, a, r, g, b) \
|
#define COLOR32_TO_ARGB16(c, a, r, g, b) \
|
||||||
do { a = _A16(c); r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
|
do { a = _A16(c); r = _R16(c); g = _G16(c); b = _B16(c); } while (0)
|
||||||
|
|
||||||
Window EXWindowGetParent(Window xwin);
|
EX_Window EXWindowGetParent(EX_Window xwin);
|
||||||
int EXGetWindowAttributes(Window w, XWindowAttributes * pxwa);
|
int EXGetWindowAttributes(EX_Window xwin,
|
||||||
int EXGetGeometry(Window xwin, Window * root_return,
|
XWindowAttributes * pxwa);
|
||||||
|
int EXGetGeometry(EX_Window xwin, EX_Window * root_return,
|
||||||
int *x, int *y, int *w, int *h, int *bw,
|
int *x, int *y, int *w, int *h, int *bw,
|
||||||
int *depth);
|
int *depth);
|
||||||
|
|
||||||
void EXRestackWindows(Window * windows, int nwindows);
|
void EXRestackWindows(EX_Window * windows, int nwindows);
|
||||||
|
|
||||||
void EXCopyAreaGC(Drawable src, Drawable dst, GC gc,
|
void EXCopyAreaGC(EX_Drawable src, EX_Drawable dst, GC gc,
|
||||||
int sx, int sy, unsigned int w, unsigned int h,
|
int sx, int sy, unsigned int w, unsigned int h,
|
||||||
int dx, int dy);
|
int dx, int dy);
|
||||||
void EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
|
void EXCopyArea(EX_Drawable src, EX_Drawable dst, int sx,
|
||||||
unsigned int w, unsigned int h, int dx, int dy);
|
int sy, unsigned int w, unsigned int h, int dx,
|
||||||
void EXCopyAreaTiled(Drawable src, Pixmap mask, Drawable dst,
|
int dy);
|
||||||
int sx, int sy,
|
void EXCopyAreaTiled(EX_Drawable src, EX_Pixmap mask,
|
||||||
unsigned int w, unsigned int h,
|
EX_Drawable dst, int sx, int sy,
|
||||||
int dx, int dy);
|
unsigned int w, unsigned int h, int dx,
|
||||||
void EXFillAreaSolid(Drawable dst, int x, int y,
|
int dy);
|
||||||
|
void EXFillAreaSolid(EX_Drawable dst, int x, int y,
|
||||||
unsigned int w, unsigned int h,
|
unsigned int w, unsigned int h,
|
||||||
unsigned int pixel);
|
unsigned int pixel);
|
||||||
void EXPaintRectangle(Drawable dst, int x, int y,
|
void EXPaintRectangle(EX_Drawable dst, int x, int y,
|
||||||
unsigned int w, unsigned int h,
|
unsigned int w, unsigned int h,
|
||||||
unsigned int fg, unsigned int bg);
|
unsigned int fg, unsigned int bg);
|
||||||
|
|
||||||
void EXWarpPointer(Window xwin, int x, int y);
|
void EXWarpPointer(EX_Window xwin, int x, int y);
|
||||||
int EXQueryPointer(Window xwin, int *px, int *py,
|
int EXQueryPointer(EX_Window xwin, int *px, int *py,
|
||||||
Window * pchild, unsigned int *pmask);
|
EX_Window * pchild, unsigned int *pmask);
|
||||||
|
|
||||||
Pixmap EXCreatePixmapCopy(Pixmap src, unsigned int w,
|
EX_Pixmap EXCreatePixmapCopy(EX_Pixmap src, unsigned int w,
|
||||||
unsigned int h, unsigned int depth);
|
unsigned int h, unsigned int depth);
|
||||||
|
|
||||||
GC EXCreateGC(Drawable draw, unsigned int mask,
|
GC EXCreateGC(EX_Drawable draw, unsigned int mask,
|
||||||
XGCValues * val);
|
XGCValues * val);
|
||||||
void EXFreeGC(GC gc);
|
void EXFreeGC(GC gc);
|
||||||
|
|
||||||
void EXSendEvent(Window xwin,
|
void EXSendEvent(EX_Window xwin, unsigned int event_mask,
|
||||||
unsigned int event_mask, XEvent * ev);
|
XEvent * ev);
|
||||||
|
|
||||||
KeyCode EKeysymToKeycode(KeySym keysym);
|
EX_KeyCode EKeysymToKeycode(EX_KeySym keysym);
|
||||||
KeyCode EKeynameToKeycode(const char *name);
|
EX_KeyCode EKeynameToKeycode(const char *name);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char type;
|
char type;
|
||||||
char depth;
|
char depth;
|
||||||
Pixmap pmap;
|
EX_Pixmap pmap;
|
||||||
Pixmap mask;
|
EX_Pixmap mask;
|
||||||
unsigned short w, h;
|
unsigned short w, h;
|
||||||
} PmapMask;
|
} PmapMask;
|
||||||
|
|
||||||
|
@ -301,53 +304,50 @@ void PmapMaskInit(PmapMask * pmm, Win win, int w, int h);
|
||||||
void PmapMaskFree(PmapMask * pmm);
|
void PmapMaskFree(PmapMask * pmm);
|
||||||
|
|
||||||
#if USE_XRENDER
|
#if USE_XRENDER
|
||||||
#include <X11/extensions/Xrender.h>
|
EX_Picture EPictureCreate(Win win, EX_Drawable draw);
|
||||||
|
EX_Picture EPictureCreateSolid(EX_Window xwin, int argb,
|
||||||
Picture EPictureCreate(Win win, Drawable draw);
|
|
||||||
Picture EPictureCreateSolid(Window xwin, int argb,
|
|
||||||
unsigned int a, unsigned int rgb);
|
unsigned int a, unsigned int rgb);
|
||||||
Picture EPictureCreateBuffer(Win win, int w, int h, Pixmap * ppmap);
|
EX_Picture EPictureCreateBuffer(Win win, int w, int h,
|
||||||
void EPictureDestroy(Picture pict);
|
EX_Pixmap * ppmap);
|
||||||
|
void EPictureDestroy(EX_Picture pict);
|
||||||
|
|
||||||
#endif /* USE_XRENDER */
|
#endif /* USE_XRENDER */
|
||||||
|
|
||||||
#if USE_COMPOSITE
|
#if USE_COMPOSITE
|
||||||
#include <X11/extensions/Xfixes.h>
|
|
||||||
|
|
||||||
XserverRegion ERegionCreate(void);
|
EX_SrvRegion ERegionCreate(void);
|
||||||
XserverRegion ERegionCreateRect(int x, int y, int w, int h);
|
EX_SrvRegion ERegionCreateRect(int x, int y, int w, int h);
|
||||||
|
|
||||||
#if USE_DESK_EXPOSE
|
#if USE_DESK_EXPOSE
|
||||||
XserverRegion ERegionCreateFromRects(XRectangle * rectangles,
|
EX_SrvRegion ERegionCreateFromRects(XRectangle * rectangles,
|
||||||
int nrectangles);
|
int nrectangles);
|
||||||
#endif
|
#endif
|
||||||
XserverRegion ERegionCreateFromWindow(Win win);
|
EX_SrvRegion ERegionCreateFromWindow(Win win);
|
||||||
XserverRegion ERegionCopy(XserverRegion rgn, XserverRegion src);
|
EX_SrvRegion ERegionCopy(EX_SrvRegion rgn, EX_SrvRegion src);
|
||||||
XserverRegion ERegionClone(XserverRegion src);
|
EX_SrvRegion ERegionClone(EX_SrvRegion src);
|
||||||
void ERegionDestroy(XserverRegion rgn);
|
void ERegionDestroy(EX_SrvRegion rgn);
|
||||||
void ERegionEmpty(XserverRegion rgn);
|
void ERegionEmpty(EX_SrvRegion rgn);
|
||||||
void ERegionSetRect(XserverRegion rgn, int x, int y, int w,
|
void ERegionSetRect(EX_SrvRegion rgn, int x, int y, int w,
|
||||||
int h);
|
int h);
|
||||||
void ERegionTranslate(XserverRegion rgn, int dx, int dy);
|
void ERegionTranslate(EX_SrvRegion rgn, int dx, int dy);
|
||||||
void ERegionIntersect(XserverRegion dst, XserverRegion src);
|
void ERegionIntersect(EX_SrvRegion dst, EX_SrvRegion src);
|
||||||
void ERegionSubtract(XserverRegion dst, XserverRegion src);
|
void ERegionSubtract(EX_SrvRegion dst, EX_SrvRegion src);
|
||||||
void ERegionUnion(XserverRegion dst, XserverRegion src);
|
void ERegionUnion(EX_SrvRegion dst, EX_SrvRegion src);
|
||||||
void ERegionIntersectOffset(XserverRegion dst, int dx, int dy,
|
void ERegionIntersectOffset(EX_SrvRegion dst, int dx, int dy,
|
||||||
XserverRegion src,
|
EX_SrvRegion src, EX_SrvRegion tmp);
|
||||||
XserverRegion tmp);
|
void ERegionSubtractOffset(EX_SrvRegion dst, int dx, int dy,
|
||||||
void ERegionSubtractOffset(XserverRegion dst, int dx, int dy,
|
EX_SrvRegion src, EX_SrvRegion tmp);
|
||||||
XserverRegion src, XserverRegion tmp);
|
void ERegionUnionOffset(EX_SrvRegion dst, int dx, int dy,
|
||||||
void ERegionUnionOffset(XserverRegion dst, int dx, int dy,
|
EX_SrvRegion src, EX_SrvRegion tmp);
|
||||||
XserverRegion src, XserverRegion tmp);
|
|
||||||
#if 0 /* Unused (for debug) */
|
#if 0 /* Unused (for debug) */
|
||||||
int ERegionIsEmpty(XserverRegion rgn);
|
int ERegionIsEmpty(EX_SrvRegion rgn);
|
||||||
#endif
|
#endif
|
||||||
void ERegionShow(const char *txt, XserverRegion rgn,
|
void ERegionShow(const char *txt, EX_SrvRegion rgn,
|
||||||
void (*prf) (const char *fmt, ...));
|
void (*prf) (const char *fmt, ...));
|
||||||
|
|
||||||
void EPictureSetClip(Picture pict, XserverRegion clip);
|
void EPictureSetClip(EX_Picture pict, EX_SrvRegion clip);
|
||||||
|
|
||||||
Pixmap EWindowGetPixmap(const Win win);
|
EX_Pixmap EWindowGetPixmap(const Win win);
|
||||||
|
|
||||||
#endif /* USE_COMPOSITE */
|
#endif /* USE_COMPOSITE */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue