Partial cleanup of client window property/state stuff.
Set _NET_WM_ALLOWED_ACTIONS values properly. SVN revision: 15674
This commit is contained in:
parent
0897d04469
commit
3529ea8228
145
src/E.h
145
src/E.h
|
@ -659,24 +659,11 @@ typedef struct _winclient
|
|||
char is_group_leader;
|
||||
char no_resize_h;
|
||||
char no_resize_v;
|
||||
char shaped;
|
||||
Constraints width, height;
|
||||
int base_w, base_h;
|
||||
int w_inc, h_inc;
|
||||
int grav;
|
||||
double aspect_min, aspect_max;
|
||||
char already_placed;
|
||||
char mwm_decor_border;
|
||||
char mwm_decor_resizeh;
|
||||
char mwm_decor_title;
|
||||
char mwm_decor_menu;
|
||||
char mwm_decor_minimize;
|
||||
char mwm_decor_maximize;
|
||||
char mwm_func_resize;
|
||||
char mwm_func_move;
|
||||
char mwm_func_minimize;
|
||||
char mwm_func_maximize;
|
||||
char mwm_func_close;
|
||||
long event_mask;
|
||||
}
|
||||
WinClient;
|
||||
|
@ -693,14 +680,13 @@ WinClient;
|
|||
#define EWIN_TYPE_ICONBOX 0x04
|
||||
#define EWIN_TYPE_PAGER 0x08
|
||||
|
||||
#define EwinIsMapped(ewin) (ewin->state >= EWIN_STATE_MAPPED)
|
||||
#define EwinIsMapped(ewin) (ewin->state.state >= EWIN_STATE_MAPPED)
|
||||
#define EwinIsInternal(ewin) (ewin->type != EWIN_TYPE_NORMAL)
|
||||
|
||||
struct _ewin
|
||||
{
|
||||
EObj o;
|
||||
char type;
|
||||
char state;
|
||||
int vx, vy; /* Position in virtual root */
|
||||
int lx, ly; /* Last pos */
|
||||
int lw, lh; /* Last size */
|
||||
|
@ -712,55 +698,60 @@ struct _ewin
|
|||
const Border *normal_border;
|
||||
const Border *previous_border;
|
||||
EWinBit *bits;
|
||||
int num_groups;
|
||||
Group **groups;
|
||||
char visibility;
|
||||
char docked;
|
||||
char iconified;
|
||||
char shaded;
|
||||
char active;
|
||||
char never_use_area;
|
||||
char shapedone;
|
||||
char fixedpos;
|
||||
char ignorearrange;
|
||||
char skiptask;
|
||||
char skip_ext_pager;
|
||||
char skipfocus;
|
||||
char skipwinlist;
|
||||
char focusclick;
|
||||
char neverfocus;
|
||||
char no_button_grabs;
|
||||
char no_actions;
|
||||
void *data; /* Data hook for internal windows */
|
||||
int area_x;
|
||||
int area_y;
|
||||
char *session_id;
|
||||
int has_transients;
|
||||
PmapMask mini_pmm;
|
||||
int mini_w, mini_h;
|
||||
Snapshot *snap;
|
||||
int head;
|
||||
struct
|
||||
{
|
||||
int left, right, top, bottom;
|
||||
} strut;
|
||||
struct
|
||||
{
|
||||
unsigned donthide:1; /* Don't hide on show desktop */
|
||||
unsigned vroot:1; /* Virtual root window */
|
||||
unsigned inhibit_iconify:1;
|
||||
unsigned autosave:1;
|
||||
unsigned no_border:1; /* Never apply border */
|
||||
} props;
|
||||
struct
|
||||
{
|
||||
char state;
|
||||
char shaped;
|
||||
char docked;
|
||||
char visibility;
|
||||
char iconified;
|
||||
char shaded;
|
||||
char active;
|
||||
|
||||
unsigned placed:1;
|
||||
unsigned maximized_horz:1;
|
||||
unsigned maximized_vert:1;
|
||||
unsigned fullscreen:1;
|
||||
unsigned showingdesk:1; /* Iconified by show desktop */
|
||||
unsigned attention:1;
|
||||
unsigned animated:1;
|
||||
} st;
|
||||
|
||||
/* Derived state flags. Change only in EwinStateUpdate() */
|
||||
unsigned no_border:1;
|
||||
|
||||
unsigned inhibit_move:1;
|
||||
unsigned inhibit_resize:1;
|
||||
unsigned inhibit_iconify:1;
|
||||
unsigned inhibit_shade:1;
|
||||
unsigned inhibit_stick:1;
|
||||
unsigned inhibit_max_hor:1;
|
||||
unsigned inhibit_max_ver:1;
|
||||
unsigned inhibit_fullscreeen:1;
|
||||
unsigned inhibit_change_desk:1;
|
||||
unsigned inhibit_close:1;
|
||||
|
||||
unsigned inhibit_actions:1;
|
||||
unsigned inhibit_focus:1;
|
||||
} state;
|
||||
struct
|
||||
{
|
||||
char fixedpos;
|
||||
char never_use_area;
|
||||
char ignorearrange;
|
||||
char skip_ext_task;
|
||||
char skip_ext_pager;
|
||||
char skip_focuslist;
|
||||
char skip_winlist;
|
||||
char focusclick; /* Click to focus */
|
||||
char never_focus; /* Never focus */
|
||||
char no_button_grabs;
|
||||
char no_actions;
|
||||
unsigned donthide:1; /* Don't hide on show desktop */
|
||||
unsigned vroot:1; /* Virtual root window */
|
||||
unsigned autosave:1;
|
||||
unsigned no_border:1; /* Never apply border */
|
||||
unsigned never_iconify:1; /* Never iconify */
|
||||
} props;
|
||||
struct
|
||||
{
|
||||
char *wm_name;
|
||||
|
@ -772,14 +763,52 @@ struct _ewin
|
|||
char *wm_machine;
|
||||
} icccm;
|
||||
struct
|
||||
{
|
||||
unsigned valid:1;
|
||||
unsigned decor_border:1;
|
||||
unsigned decor_resizeh:1;
|
||||
unsigned decor_title:1;
|
||||
unsigned decor_menu:1;
|
||||
unsigned decor_minimize:1;
|
||||
unsigned decor_maximize:1;
|
||||
unsigned func_resize:1;
|
||||
unsigned func_move:1;
|
||||
unsigned func_minimize:1;
|
||||
unsigned func_maximize:1;
|
||||
unsigned func_close:1;
|
||||
} mwm;
|
||||
struct
|
||||
{
|
||||
char *wm_name;
|
||||
char *wm_icon_name;
|
||||
unsigned int *wm_icon, wm_icon_len;
|
||||
unsigned int opacity;
|
||||
} ewmh;
|
||||
struct
|
||||
{
|
||||
int left, right, top, bottom;
|
||||
} strut;
|
||||
struct
|
||||
{
|
||||
char shape;
|
||||
char border;
|
||||
} update;
|
||||
|
||||
int num_groups;
|
||||
Group **groups;
|
||||
int area_x, area_y;
|
||||
char *session_id;
|
||||
int has_transients;
|
||||
PmapMask mini_pmm;
|
||||
int mini_w, mini_h;
|
||||
|
||||
int shape_x, shape_y, shape_w, shape_h;
|
||||
int req_x, req_y;
|
||||
|
||||
Snapshot *snap;
|
||||
int head; /* Unused? */
|
||||
|
||||
void *data; /* Data hook for internal windows */
|
||||
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
|
||||
int *ph);
|
||||
void (*MoveResize) (EWin * ewin, int resize);
|
||||
|
@ -1588,6 +1617,7 @@ EWin *GetFocusEwin(void);
|
|||
EWin *GetContextEwin(void);
|
||||
void SetContextEwin(EWin * ewin);
|
||||
void EwinPropagateShapes(EWin * ewin);
|
||||
void EwinStateUpdate(EWin * ewin);
|
||||
void AddToFamily(EWin * ewin, Window win);
|
||||
EWin *AddInternalToFamily(Window win, const char *bname, int type,
|
||||
void *ptr,
|
||||
|
@ -1667,7 +1697,7 @@ void EWMH_SetWindowDesktop(const EWin * ewin);
|
|||
void EWMH_SetWindowState(const EWin * ewin);
|
||||
void EWMH_SetWindowBorder(const EWin * ewin);
|
||||
void EWMH_SetWindowOpacity(const EWin * ewin);
|
||||
void EWMH_SetWindowMiscHints(const EWin * ewin);
|
||||
void EWMH_SetWindowActions(const EWin * ewin);
|
||||
void EWMH_GetWindowHints(EWin * ewin);
|
||||
void EWMH_DelWindowHints(const EWin * ewin);
|
||||
void EWMH_ProcessClientMessage(XClientMessageEvent * event);
|
||||
|
@ -1829,7 +1859,6 @@ void HintsSetWindowDesktop(const EWin * ewin);
|
|||
void HintsSetWindowArea(const EWin * ewin);
|
||||
void HintsSetWindowState(const EWin * ewin);
|
||||
void HintsSetWindowOpacity(const EWin * ewin);
|
||||
void HintsSetWindowMiscHints(const EWin * ewin);
|
||||
void HintsSetWindowBorder(const EWin * ewin);
|
||||
void HintsGetWindowHints(EWin * ewin);
|
||||
void HintsDelWindowHints(const EWin * ewin);
|
||||
|
|
|
@ -840,7 +840,7 @@ ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
|
|||
int i, type, button, modifiers, ok, mouse, mask, val = 0;
|
||||
Action *aa;
|
||||
|
||||
if (Mode.action_inhibit || (ewin && ewin->no_actions))
|
||||
if (Mode.action_inhibit || (ewin && ewin->state.inhibit_actions))
|
||||
return 0;
|
||||
|
||||
key = type = button = modifiers = mouse = 0;
|
||||
|
|
|
@ -216,7 +216,7 @@ SetCurrentArea(int ax, int ay)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
ewin = lst[i];
|
||||
if (EoIsSticky(ewin) || ewin->iconified)
|
||||
if (EoIsSticky(ewin) || ewin->state.iconified)
|
||||
continue;
|
||||
if (EoGetDesk(ewin) != DesksGetCurrent() && !EoIsFloating(ewin))
|
||||
continue;
|
||||
|
@ -250,7 +250,7 @@ SetCurrentArea(int ax, int ay)
|
|||
|
||||
if (EoIsSticky(ewin) ||
|
||||
(EoIsFloating(ewin) && Conf.movres.mode_move == 0) ||
|
||||
(!ewin->iconified && Conf.desks.slidein))
|
||||
(!ewin->state.iconified && Conf.desks.slidein))
|
||||
MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
|
||||
else
|
||||
MoveEwin(ewin, EoGetX(ewin) - dx, EoGetY(ewin) - dy);
|
||||
|
|
|
@ -630,7 +630,7 @@ SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy)
|
|||
|
||||
if ((EoGetDesk(ewin) == EoGetDesk(lst[i]) ||
|
||||
EoIsSticky(lst[i])) && !(EoIsFloating(lst[i])) &&
|
||||
!(lst[i]->iconified) && !(lst[i]->ignorearrange))
|
||||
!lst[i]->state.iconified && !lst[i]->props.ignorearrange)
|
||||
{
|
||||
if (IN_BELOW
|
||||
(ewin->shape_x + dx,
|
||||
|
@ -669,7 +669,7 @@ SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy)
|
|||
|
||||
if ((EoGetDesk(ewin) == EoGetDesk(lst[i]) ||
|
||||
EoIsSticky(lst[i])) && !(EoIsFloating(lst[i])) &&
|
||||
!(lst[i]->iconified) && !(lst[i]->ignorearrange))
|
||||
!lst[i]->state.iconified && !lst[i]->props.ignorearrange)
|
||||
{
|
||||
if (IN_ABOVE
|
||||
(ewin->shape_x + EoGetW(ewin) + dx - 1,
|
||||
|
@ -706,7 +706,7 @@ SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy)
|
|||
|
||||
if ((EoGetDesk(ewin) == EoGetDesk(lst[i]) ||
|
||||
EoIsSticky(lst[i])) && !(EoIsFloating(lst[i])) &&
|
||||
!(lst[i]->iconified) && !(lst[i]->ignorearrange))
|
||||
!lst[i]->state.iconified && !lst[i]->props.ignorearrange)
|
||||
{
|
||||
if (IN_BELOW
|
||||
(ewin->shape_y + dy,
|
||||
|
@ -746,7 +746,7 @@ SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy)
|
|||
|
||||
if ((EoGetDesk(ewin) == EoGetDesk(lst[i]) ||
|
||||
EoIsSticky(lst[i])) && !(EoIsFloating(lst[i])) &&
|
||||
!(lst[i]->iconified) && !(lst[i]->ignorearrange))
|
||||
!lst[i]->state.iconified && !lst[i]->props.ignorearrange)
|
||||
{
|
||||
if (IN_ABOVE
|
||||
(ewin->shape_y + EoGetH(ewin) + dy - 1,
|
||||
|
@ -791,7 +791,6 @@ ArrangeEwin(EWin * ewin)
|
|||
{
|
||||
int x, y;
|
||||
|
||||
ewin->client.already_placed = 1;
|
||||
ArrangeEwinXY(ewin, &x, &y);
|
||||
MoveEwin(ewin, x, y);
|
||||
}
|
||||
|
@ -801,7 +800,6 @@ ArrangeEwinCentered(EWin * ewin, int focus)
|
|||
{
|
||||
int x, y;
|
||||
|
||||
ewin->client.already_placed = 1;
|
||||
ArrangeEwinCenteredXY(ewin, &x, &y);
|
||||
MoveEwin(ewin, x, y);
|
||||
if (focus)
|
||||
|
@ -844,8 +842,8 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
|
|||
EWin *e = lst[i];
|
||||
|
||||
if (e == ewin ||
|
||||
e->iconified || e->ignorearrange || EoGetLayer(e) == 0 ||
|
||||
!EWinIsOnViewport(e, EoGetDesk(ewin)))
|
||||
e->state.iconified || e->props.ignorearrange ||
|
||||
EoGetLayer(e) == 0 || !EWinIsOnViewport(e, EoGetDesk(ewin)))
|
||||
continue;
|
||||
|
||||
fixed[j].data = e;
|
||||
|
@ -870,7 +868,7 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
|
|||
if ((fixed[j].w <= 0) || (fixed[j].h <= 0))
|
||||
continue;
|
||||
|
||||
if (e->never_use_area)
|
||||
if (e->props.never_use_area)
|
||||
fixed[j].p = 50;
|
||||
else
|
||||
fixed[j].p = EoGetLayer(e);
|
||||
|
@ -994,9 +992,10 @@ ArrangeEwins(const char *params)
|
|||
DeskGetArea(EoGetDesk(ewin), &ax, &ay);
|
||||
|
||||
if ((EoGetDesk(ewin) == DesksGetCurrent()) &&
|
||||
(!EoIsSticky(ewin)) && (!EoIsFloating(ewin)) && (!ewin->iconified)
|
||||
&& (!ewin->ignorearrange) && (ewin->type != EWIN_TYPE_MENU)
|
||||
&& (ewin->area_x == ax) && (ewin->area_y == ay))
|
||||
(!EoIsSticky(ewin)) && (!EoIsFloating(ewin)) &&
|
||||
(!ewin->state.iconified) && (!ewin->props.ignorearrange) &&
|
||||
(ewin->type != EWIN_TYPE_MENU) &&
|
||||
(ewin->area_x == ax) && (ewin->area_y == ay))
|
||||
{
|
||||
floating[j].data = lst[i];
|
||||
floating[j].x = EoGetX(ewin);
|
||||
|
@ -1031,7 +1030,7 @@ ArrangeEwins(const char *params)
|
|||
fixed[k].h = VRoot.h - fixed[k].y;
|
||||
if ((fixed[k].w > 0) && (fixed[k].h > 0))
|
||||
{
|
||||
if (!ewin->never_use_area)
|
||||
if (!ewin->props.never_use_area)
|
||||
fixed[k].p = EoGetLayer(ewin);
|
||||
else
|
||||
fixed[k].p = 99;
|
||||
|
|
|
@ -77,7 +77,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
|
|||
#endif
|
||||
|
||||
is = ImageclassGetImageState(ewin->border->part[i].iclass, ewb->state,
|
||||
ewin->active, EoIsSticky(ewin));
|
||||
ewin->state.active, EoIsSticky(ewin));
|
||||
|
||||
ts = NULL;
|
||||
txt = NULL;
|
||||
|
@ -87,7 +87,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
|
|||
txt = EwinGetName(ewin);
|
||||
if (txt && ewin->border->part[i].tclass)
|
||||
ts = TextclassGetTextState(ewin->border->part[i].tclass, ewb->state,
|
||||
ewin->active, EoIsSticky(ewin));
|
||||
ewin->state.active, EoIsSticky(ewin));
|
||||
break;
|
||||
case FLAG_MINIICON:
|
||||
break;
|
||||
|
@ -101,8 +101,8 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
|
|||
ewb->ts = ts;
|
||||
|
||||
ITApply(ewb->win, ewin->border->part[i].iclass, is, ewb->w, ewb->h,
|
||||
ewb->state, ewin->active, EoIsSticky(ewin), ewb->expose, ST_BORDER,
|
||||
ewin->border->part[i].tclass, ts, txt);
|
||||
ewb->state, ewin->state.active, EoIsSticky(ewin), ewb->expose,
|
||||
ST_BORDER, ewin->border->part[i].tclass, ts, txt);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -141,7 +141,7 @@ BorderWinpartChange(EWin * ewin, int i, int force)
|
|||
{
|
||||
BorderWinpartITclassApply(ewin, i, force);
|
||||
|
||||
if (!ewin->shapedone || ewin->border->changes_shape)
|
||||
if (ewin->update.shape || ewin->border->changes_shape)
|
||||
EwinPropagateShapes(ewin);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ EwinBorderDraw(EWin * ewin, int do_shape, int do_paint)
|
|||
for (i = 0; i < ewin->border->num_winparts; i++)
|
||||
BorderWinpartITclassApply(ewin, i, do_shape || do_paint);
|
||||
|
||||
if (do_shape || !ewin->shapedone || ewin->border->changes_shape)
|
||||
if (do_shape || ewin->update.shape || ewin->border->changes_shape)
|
||||
EwinPropagateShapes(ewin);
|
||||
}
|
||||
|
||||
|
@ -270,8 +270,8 @@ BorderWinpartCalc(EWin * ewin, int i, int ww, int hh)
|
|||
}
|
||||
iclass = ewin->border->part[i].iclass;
|
||||
tclass = ewin->border->part[i].tclass;
|
||||
TextSize(tclass, ewin->active, EoIsSticky(ewin), ewin->bits[i].state,
|
||||
EwinGetName(ewin), &max, &dummywidth,
|
||||
TextSize(tclass, ewin->state.active, EoIsSticky(ewin),
|
||||
ewin->bits[i].state, EwinGetName(ewin), &max, &dummywidth,
|
||||
w - (iclass->padding.top + iclass->padding.bottom));
|
||||
max += iclass->padding.left + iclass->padding.right;
|
||||
if (h > max)
|
||||
|
@ -317,7 +317,7 @@ BorderWinpartCalc(EWin * ewin, int i, int ww, int hh)
|
|||
|
||||
iclass = ewin->border->part[i].iclass;
|
||||
tclass = ewin->border->part[i].tclass;
|
||||
TextSize(tclass, ewin->active, EoIsSticky(ewin),
|
||||
TextSize(tclass, ewin->state.active, EoIsSticky(ewin),
|
||||
ewin->bits[i].state, EwinGetName(ewin), &max,
|
||||
&dummyheight,
|
||||
h - (iclass->padding.top + iclass->padding.bottom));
|
||||
|
@ -339,7 +339,7 @@ BorderWinpartCalc(EWin * ewin, int i, int ww, int hh)
|
|||
w = min;
|
||||
}
|
||||
}
|
||||
if ((ewin->shaded) && (!ewin->border->part[i].keep_for_shade))
|
||||
if ((ewin->state.shaded) && (!ewin->border->part[i].keep_for_shade))
|
||||
{
|
||||
ewin->bits[i].x = -100;
|
||||
ewin->bits[i].y = -100;
|
||||
|
@ -389,7 +389,7 @@ EwinBorderCalcSizes(EWin * ewin, int propagate)
|
|||
#endif
|
||||
if (reshape)
|
||||
{
|
||||
ewin->shapedone = 0;
|
||||
ewin->update.shape = 1;
|
||||
if (propagate)
|
||||
EwinPropagateShapes(ewin);
|
||||
}
|
||||
|
@ -421,19 +421,21 @@ EwinBorderSelect(EWin * ewin)
|
|||
#if 0 /* Handled in iclass.c */
|
||||
/* Imlib2 will not render pixmaps with dimensions > 8192 */
|
||||
if (ewin->client.w > 8000 || ewin->client.h > 8000)
|
||||
ewin->props.no_border = 1;
|
||||
ewin->state.no_border = 1;
|
||||
#endif
|
||||
|
||||
/* Quit if we already have a border that isn't an internal one */
|
||||
b = ewin->border;
|
||||
if (b && strncmp(b->name, "__", 2) && !ewin->props.no_border)
|
||||
goto done;
|
||||
|
||||
if (ewin->props.no_border || ewin->docked ||
|
||||
(!ewin->client.mwm_decor_title && !ewin->client.mwm_decor_border))
|
||||
b = FindItem("BORDERLESS", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
|
||||
if (ewin->state.no_border)
|
||||
{
|
||||
b = FindItem("BORDERLESS", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
|
||||
}
|
||||
else
|
||||
b = WindowMatchEwinBorder(ewin);
|
||||
{
|
||||
/* Quit if we already have a border that isn't an internal one */
|
||||
b = ewin->border;
|
||||
if (b && strncmp(b->name, "__", 2))
|
||||
goto done;
|
||||
b = WindowMatchEwinBorder(ewin);
|
||||
}
|
||||
|
||||
if (!b)
|
||||
b = FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_BORDER);
|
||||
|
@ -561,10 +563,10 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
|||
Efree(wl);
|
||||
}
|
||||
|
||||
if (!ewin->shaded)
|
||||
if (!ewin->state.shaded)
|
||||
EMoveWindow(ewin->win_container, b->border.left, b->border.top);
|
||||
|
||||
ewin->shapedone = 0;
|
||||
ewin->update.shape = 1;
|
||||
EwinBorderCalcSizes(ewin, 0);
|
||||
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_BORDER);
|
||||
|
@ -573,7 +575,7 @@ EwinBorderSetTo(EWin * ewin, const Border * b)
|
|||
void
|
||||
EwinSetBorder(EWin * ewin, const Border * b, int apply)
|
||||
{
|
||||
if (!b || ewin->border == b || ewin->props.no_border)
|
||||
if (!b || ewin->border == b || ewin->state.no_border)
|
||||
return;
|
||||
|
||||
if (apply)
|
||||
|
@ -591,7 +593,7 @@ EwinSetBorder(EWin * ewin, const Border * b, int apply)
|
|||
BorderIncRefcount(b);
|
||||
}
|
||||
|
||||
if (!ewin->st.fullscreen)
|
||||
if (!ewin->state.fullscreen)
|
||||
ewin->normal_border = b;
|
||||
}
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ ShowDialog(Dialog * d)
|
|||
|
||||
MoveEwinToDesktop(ewin, EoGetDesk(ewin));
|
||||
|
||||
if (ewin->client.already_placed)
|
||||
if (ewin->state.placed)
|
||||
{
|
||||
MoveResizeEwin(ewin, EoGetX(ewin), EoGetY(ewin), w, h);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ DockappFindEmptySpotFor(EWin * eapp)
|
|||
y = EoGetY(eapp);
|
||||
w = eapp->client.w;
|
||||
h = eapp->client.h;
|
||||
if (!eapp->client.already_placed)
|
||||
if (!eapp->state.placed)
|
||||
{
|
||||
x = Conf.dock.startx;
|
||||
if (x < 0)
|
||||
|
@ -59,7 +59,7 @@ DockappFindEmptySpotFor(EWin * eapp)
|
|||
ewin = lst[i];
|
||||
|
||||
/* Skip self and non-dockapps */
|
||||
if (ewin == eapp || !ewin->docked)
|
||||
if (ewin == eapp || !ewin->state.docked)
|
||||
continue;
|
||||
|
||||
if ((x + w) <= EoGetX(ewin) || x >= (EoGetX(ewin) + EoGetW(ewin)))
|
||||
|
@ -131,8 +131,11 @@ DockIt(EWin * ewin)
|
|||
if (Conf.dock.sticky)
|
||||
EoSetSticky(ewin, 1);
|
||||
|
||||
ewin->props.donthide = 1;
|
||||
ewin->props.focusclick = 1;
|
||||
|
||||
DockappFindEmptySpotFor(ewin);
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
|
||||
if (ewin->client.icon_win)
|
||||
{
|
||||
|
|
|
@ -688,7 +688,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
|
||||
if ((w != ewin->client.w) || (h != ewin->client.h))
|
||||
{
|
||||
if (!ewin->shaded)
|
||||
if (!ewin->state.shaded)
|
||||
ICCCM_SizeMatch(ewin, w, h, &ewin->shape_w, &ewin->shape_h);
|
||||
}
|
||||
|
||||
|
@ -1030,7 +1030,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
if (!EoIsFloating(ewin) || !ewin->groups
|
||||
|| (ewin->groups && !check_move))
|
||||
{
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
MoveEwin(ewin, ewin->shape_x, ewin->shape_y);
|
||||
else
|
||||
MoveResizeEwin(ewin, ewin->shape_x, ewin->shape_y,
|
||||
|
|
|
@ -44,7 +44,7 @@ EdgeTimeout(int val, void *data __UNUSED__)
|
|||
|
||||
/* Quit if in fullscreen window */
|
||||
ewin = GetEwinPointerInClient();
|
||||
if (ewin && ewin->st.fullscreen)
|
||||
if (ewin && ewin->state.fullscreen)
|
||||
return;
|
||||
|
||||
DeskGetCurrentArea(&ax, &ay);
|
||||
|
|
|
@ -143,7 +143,7 @@ EobjIsShaped(const EObj * eo)
|
|||
default:
|
||||
return 0; /* FIXME */
|
||||
case EOBJ_TYPE_EWIN:
|
||||
return ((EWin *) eo)->client.shaped;
|
||||
return ((EWin *) eo)->state.shaped;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
151
src/ewin-ops.c
151
src/ewin-ops.c
|
@ -127,7 +127,7 @@ SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty, int speed)
|
|||
k = ETimedLoopNext();
|
||||
}
|
||||
|
||||
ewin->st.animated = 0;
|
||||
ewin->state.animated = 0;
|
||||
Mode.place.doing_slide = 0;
|
||||
FocusEnable(1);
|
||||
|
||||
|
@ -345,7 +345,7 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
sh *= Conf.desks.areas_ny;
|
||||
}
|
||||
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
{
|
||||
/* Keep shaded windows entirely on-screen */
|
||||
dx = EoGetW(ewin);
|
||||
|
@ -375,13 +375,18 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
if (flags & MRF_RAISE)
|
||||
raise = 1;
|
||||
|
||||
if (!(flags & MRF_MOVE))
|
||||
if (!(flags & MRF_MOVE) || ewin->state.inhibit_move)
|
||||
{
|
||||
x = EoGetX(ewin);
|
||||
y = EoGetY(ewin);
|
||||
}
|
||||
|
||||
if (flags & MRF_RESIZE)
|
||||
if (!(flags & MRF_RESIZE) || ewin->state.inhibit_resize)
|
||||
{
|
||||
w = EoGetW(ewin);
|
||||
h = EoGetH(ewin);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ewin->Layout)
|
||||
{
|
||||
|
@ -398,7 +403,7 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
ewin->client.h = h;
|
||||
|
||||
/* Don't touch frame size while shaded */
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
{
|
||||
w = EoGetW(ewin);
|
||||
h = EoGetH(ewin);
|
||||
|
@ -411,11 +416,6 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
ewin->border->border.bottom;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w = EoGetW(ewin);
|
||||
h = EoGetH(ewin);
|
||||
}
|
||||
|
||||
dx = x - EoGetX(ewin);
|
||||
dy = y - EoGetY(ewin);
|
||||
|
@ -438,7 +438,7 @@ doMoveResizeEwin(EWin * ewin, int desk, int x, int y, int w, int h, int flags)
|
|||
|
||||
if (flags & MRF_RESIZE)
|
||||
{
|
||||
if (!ewin->shaded)
|
||||
if (!ewin->state.shaded)
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top,
|
||||
|
@ -556,34 +556,34 @@ EwinIconify(EWin * ewin)
|
|||
if (GetZoomEWin() == ewin)
|
||||
Zoom(NULL);
|
||||
|
||||
if (ewin->props.inhibit_iconify)
|
||||
if (ewin->state.inhibit_iconify)
|
||||
return;
|
||||
|
||||
if (ewin->state != EWIN_STATE_MAPPED)
|
||||
if (ewin->state.state != EWIN_STATE_MAPPED)
|
||||
return;
|
||||
|
||||
if (call_depth > 256)
|
||||
return;
|
||||
call_depth++;
|
||||
|
||||
was_shaded = ewin->shaded;
|
||||
was_shaded = ewin->state.shaded;
|
||||
|
||||
if (!ewin->client.transient)
|
||||
ModulesSignal(ESIGNAL_EWIN_ICONIFY, ewin);
|
||||
|
||||
ewin->iconified = 3;
|
||||
ewin->state.iconified = 3;
|
||||
HideEwin(ewin);
|
||||
|
||||
/* Save position at which the window was iconified */
|
||||
EwinRememberPositionSet(ewin);
|
||||
|
||||
if (was_shaded != ewin->shaded)
|
||||
if (was_shaded != ewin->state.shaded)
|
||||
EwinInstantShade(ewin, 0);
|
||||
|
||||
if (ewin->client.transient)
|
||||
{
|
||||
/* We should only get here during restart */
|
||||
ewin->iconified = 4;
|
||||
ewin->state.iconified = 4;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -593,10 +593,10 @@ EwinIconify(EWin * ewin)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
e = lst[i];
|
||||
if (e->iconified)
|
||||
if (e->state.iconified)
|
||||
continue;
|
||||
|
||||
e->iconified = 4;
|
||||
e->state.iconified = 4;
|
||||
HideEwin(e);
|
||||
EwinRememberPositionSet(e);
|
||||
}
|
||||
|
@ -649,7 +649,7 @@ EwinDeIconify(EWin * ewin)
|
|||
return;
|
||||
call_depth++;
|
||||
|
||||
if (ewin->state != EWIN_STATE_ICONIC)
|
||||
if (ewin->state.state != EWIN_STATE_ICONIC)
|
||||
return;
|
||||
|
||||
EwinRememberPositionGet(ewin, &ox, &oy);
|
||||
|
@ -657,7 +657,7 @@ EwinDeIconify(EWin * ewin)
|
|||
y = oy;
|
||||
|
||||
/* If we iconified an offscreen window, get it back on screen */
|
||||
if (!ewin->st.showingdesk)
|
||||
if (!ewin->state.showingdesk)
|
||||
GetOnScreenPos(x, y, EoGetW(ewin), EoGetH(ewin), &x, &y);
|
||||
|
||||
dx = x - ox;
|
||||
|
@ -670,8 +670,8 @@ EwinDeIconify(EWin * ewin)
|
|||
|
||||
ModulesSignal(ESIGNAL_EWIN_DEICONIFY, ewin);
|
||||
|
||||
ewin->iconified = 0;
|
||||
ewin->st.showingdesk = 0;
|
||||
ewin->state.iconified = 0;
|
||||
ewin->state.showingdesk = 0;
|
||||
|
||||
RaiseEwin(ewin);
|
||||
ShowEwin(ewin);
|
||||
|
@ -681,7 +681,7 @@ EwinDeIconify(EWin * ewin)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
e = lst[i];
|
||||
if (e->iconified != 4)
|
||||
if (e->state.iconified != 4)
|
||||
continue;
|
||||
|
||||
EwinRememberPositionGet(e, &ox, &oy);
|
||||
|
@ -690,9 +690,10 @@ EwinDeIconify(EWin * ewin)
|
|||
else
|
||||
MoveEwinToDesktopAt(e, DesksGetCurrent(), ox + dx, oy + dy);
|
||||
|
||||
e->state.iconified = 0;
|
||||
|
||||
RaiseEwin(e);
|
||||
ShowEwin(e);
|
||||
e->iconified = 0;
|
||||
}
|
||||
if (lst)
|
||||
Efree(lst);
|
||||
|
@ -761,7 +762,7 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
return;
|
||||
if (GetZoomEWin() == ewin)
|
||||
return;
|
||||
if (ewin->shaded && !force)
|
||||
if (ewin->state.shaded && !force)
|
||||
return;
|
||||
|
||||
x = EoGetX(ewin);
|
||||
|
@ -802,7 +803,7 @@ EwinInstantShade(EWin * ewin, int force)
|
|||
break;
|
||||
}
|
||||
|
||||
ewin->shaded = 2;
|
||||
ewin->state.shaded = 2;
|
||||
EoMoveResize(ewin, x, y, w, h);
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
EwinBorderCalcSizes(ewin, 1);
|
||||
|
@ -821,7 +822,7 @@ EwinInstantUnShade(EWin * ewin)
|
|||
|
||||
if (GetZoomEWin() == ewin)
|
||||
return;
|
||||
if (!ewin->shaded)
|
||||
if (!ewin->state.shaded)
|
||||
return;
|
||||
|
||||
x = EoGetX(ewin);
|
||||
|
@ -864,7 +865,7 @@ EwinInstantUnShade(EWin * ewin)
|
|||
att.win_gravity = NorthWestGravity;
|
||||
EChangeWindowAttributes(ewin->client.win, CWWinGravity, &att);
|
||||
|
||||
ewin->shaded = 0;
|
||||
ewin->state.shaded = 0;
|
||||
MoveResizeEwin(ewin, x, y, ewin->client.w, ewin->client.h);
|
||||
#if 0 /* FIXME - Remove? */
|
||||
ESync();
|
||||
|
@ -885,7 +886,7 @@ EwinShade(EWin * ewin)
|
|||
return;
|
||||
if (GetZoomEWin() == ewin)
|
||||
return;
|
||||
if (ewin->shaded || ewin->iconified)
|
||||
if (ewin->state.shaded || ewin->state.iconified)
|
||||
return;
|
||||
if ((ewin->border) && (!strcmp(ewin->border->name, "BORDERLESS")))
|
||||
return;
|
||||
|
@ -927,7 +928,7 @@ EwinShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, -(ewin->client.w - ww),
|
||||
0, ewin->client.win, ShapeBounding,
|
||||
|
@ -966,7 +967,7 @@ EwinShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
|
@ -1001,7 +1002,7 @@ EwinShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0,
|
||||
-(ewin->client.h - hh),
|
||||
|
@ -1042,7 +1043,7 @@ EwinShade(EWin * ewin)
|
|||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left,
|
||||
ewin->border->border.top, ww, hh);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
|
@ -1056,9 +1057,9 @@ EwinShade(EWin * ewin)
|
|||
break;
|
||||
}
|
||||
|
||||
ewin->shaded = 2;
|
||||
ewin->state.shaded = 2;
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
|
||||
|
@ -1085,7 +1086,7 @@ EwinUnShade(EWin * ewin)
|
|||
|
||||
if (GetZoomEWin() == ewin)
|
||||
return;
|
||||
if (!ewin->shaded || ewin->iconified)
|
||||
if (!ewin->state.shaded || ewin->state.iconified)
|
||||
return;
|
||||
|
||||
speed = Conf.shadespeed;
|
||||
|
@ -1109,7 +1110,7 @@ EwinUnShade(EWin * ewin)
|
|||
a = ewin->border->border.left + ewin->border->border.right;
|
||||
b = ewin->client.w + a;
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
|
@ -1130,7 +1131,7 @@ EwinUnShade(EWin * ewin)
|
|||
ewin->border->border.top,
|
||||
w - ewin->border->border.left -
|
||||
ewin->border->border.right, ewin->client.h);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding,
|
||||
-(ewin->client.w -
|
||||
|
@ -1155,7 +1156,7 @@ EwinUnShade(EWin * ewin)
|
|||
c = x;
|
||||
d = x + w - (ewin->client.w + a);
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
1, ewin->client.h);
|
||||
|
@ -1178,7 +1179,7 @@ EwinUnShade(EWin * ewin)
|
|||
ewin->border->border.top,
|
||||
w - ewin->border->border.left -
|
||||
ewin->border->border.right, ewin->client.h);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
|
@ -1196,7 +1197,7 @@ EwinUnShade(EWin * ewin)
|
|||
a = ewin->border->border.top + ewin->border->border.bottom;
|
||||
b = ewin->client.h + a;
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
|
@ -1217,7 +1218,7 @@ EwinUnShade(EWin * ewin)
|
|||
ewin->border->border.top, ewin->client.w,
|
||||
h - ewin->border->border.top -
|
||||
ewin->border->border.bottom);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0,
|
||||
-(ewin->client.h -
|
||||
|
@ -1242,7 +1243,7 @@ EwinUnShade(EWin * ewin)
|
|||
c = y;
|
||||
d = y + h - (ewin->client.h + a);
|
||||
a++;
|
||||
ewin->shaded = 0;
|
||||
ewin->state.shaded = 0;
|
||||
EMoveResizeWindow(ewin->win_container,
|
||||
ewin->border->border.left, ewin->border->border.top,
|
||||
ewin->client.w, 1);
|
||||
|
@ -1265,7 +1266,7 @@ EwinUnShade(EWin * ewin)
|
|||
ewin->border->border.top, ewin->client.w,
|
||||
h - ewin->border->border.top -
|
||||
ewin->border->border.bottom);
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container,
|
||||
ShapeBounding, 0, 0, ewin->client.win,
|
||||
ShapeBounding, ShapeSet);
|
||||
|
@ -1288,7 +1289,7 @@ EwinUnShade(EWin * ewin)
|
|||
ewin->border->border.left,
|
||||
ewin->border->border.top, ewin->client.w, ewin->client.h);
|
||||
|
||||
if (ewin->client.shaped)
|
||||
if (ewin->state.shaped)
|
||||
EShapeCombineShape(ewin->win_container, ShapeBounding, 0, 0,
|
||||
ewin->client.win, ShapeBounding, ShapeSet);
|
||||
|
||||
|
@ -1314,7 +1315,7 @@ EwinSetFullscreen(EWin * ewin, int on)
|
|||
int i, num;
|
||||
const Border *b;
|
||||
|
||||
if (ewin->st.fullscreen == on)
|
||||
if (ewin->state.fullscreen == on)
|
||||
return;
|
||||
|
||||
if (on)
|
||||
|
@ -1327,8 +1328,6 @@ EwinSetFullscreen(EWin * ewin, int on)
|
|||
if (on > 1)
|
||||
{
|
||||
/* Fullscreen at startup */
|
||||
on = 1;
|
||||
|
||||
x = EoGetX(ewin);
|
||||
y = EoGetY(ewin);
|
||||
w = ewin->client.w;
|
||||
|
@ -1371,7 +1370,10 @@ EwinSetFullscreen(EWin * ewin, int on)
|
|||
Efree(lst);
|
||||
}
|
||||
|
||||
ewin->fixedpos = 1;
|
||||
RaiseEwin(ewin);
|
||||
MoveResizeEwin(ewin, x, y, w, h);
|
||||
ewin->state.fullscreen = 1;
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1380,7 +1382,7 @@ EwinSetFullscreen(EWin * ewin, int on)
|
|||
w = ewin->lw;
|
||||
h = ewin->lh;
|
||||
GetOnScreenPos(x, y, w, h, &x, &y);
|
||||
ewin->fixedpos = 0; /* Yeah - well */
|
||||
ewin->props.fixedpos = 0; /* Yeah - well */
|
||||
b = ewin->normal_border;
|
||||
|
||||
if (Conf.place.raise_fullscreen)
|
||||
|
@ -1392,10 +1394,12 @@ EwinSetFullscreen(EWin * ewin, int on)
|
|||
Efree(lst);
|
||||
}
|
||||
EoSetLayer(ewin, ewin->ll);
|
||||
|
||||
ewin->state.fullscreen = 0;
|
||||
EwinStateUpdate(ewin);
|
||||
RaiseEwin(ewin);
|
||||
MoveResizeEwin(ewin, x, y, w, h);
|
||||
}
|
||||
ewin->st.fullscreen = on;
|
||||
RaiseEwin(ewin);
|
||||
MoveResizeEwin(ewin, x, y, w, h);
|
||||
HintsSetWindowState(ewin);
|
||||
EwinSetBorder(ewin, b, 1);
|
||||
}
|
||||
|
@ -1414,16 +1418,16 @@ EwinsShowDesktop(int on)
|
|||
|
||||
if (on)
|
||||
{
|
||||
if (EwinIsInternal(ewin) || ewin->iconified || ewin->props.donthide
|
||||
|| ewin->client.transient)
|
||||
if (EwinIsInternal(ewin) || ewin->state.iconified
|
||||
|| ewin->props.donthide || ewin->client.transient)
|
||||
continue;
|
||||
|
||||
ewin->st.showingdesk = 1;
|
||||
ewin->state.showingdesk = 1;
|
||||
EwinIconify(ewin);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ewin->st.showingdesk)
|
||||
if (!ewin->state.showingdesk)
|
||||
continue;
|
||||
|
||||
EwinDeIconify(ewin);
|
||||
|
@ -1588,46 +1592,51 @@ EwinOpStick(EWin * ewin, int on)
|
|||
void
|
||||
EwinOpSkipLists(EWin * ewin, int skip)
|
||||
{
|
||||
ewin->skiptask = skip;
|
||||
ewin->skipwinlist = skip;
|
||||
ewin->skipfocus = skip;
|
||||
ewin->props.skip_ext_task = skip;
|
||||
ewin->props.skip_winlist = skip;
|
||||
ewin->props.skip_focuslist = skip;
|
||||
HintsSetWindowState(ewin);
|
||||
#if ENABLE_GNOME
|
||||
GNOME_SetClientList();
|
||||
#endif
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS);
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
EwinOpSkipTask(EWin * ewin, int skip)
|
||||
{
|
||||
ewin->skiptask = skip;
|
||||
ewin->props.skip_ext_task = skip;
|
||||
HintsSetWindowState(ewin);
|
||||
#if ENABLE_GNOME
|
||||
GNOME_SetClientList();
|
||||
#endif
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS);
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
EwinOpSkipFocus(EWin * ewin, int skip)
|
||||
{
|
||||
ewin->skipfocus = skip;
|
||||
ewin->props.skip_focuslist = skip;
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS);
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
EwinOpSkipWinlist(EWin * ewin, int skip)
|
||||
{
|
||||
ewin->skipwinlist = skip;
|
||||
ewin->props.skip_winlist = skip;
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_SKIP_LISTS);
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
EwinOpNeverFocus(EWin * ewin, int on)
|
||||
{
|
||||
ewin->neverfocus = on;
|
||||
ewin->props.never_focus = on;
|
||||
SnapshotEwinUpdate(ewin, SNAP_USE_FOCUS_NEVER);
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1643,12 +1652,12 @@ EwinOpIconify(EWin * ewin, int on)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
curr_group = EwinsInGroup(ewin, gwins[i]);
|
||||
if (gwins[i]->iconified
|
||||
if (gwins[i]->state.iconified
|
||||
&& ((curr_group && !curr_group->cfg.mirror) || !on))
|
||||
{
|
||||
EwinDeIconify(gwins[i]);
|
||||
}
|
||||
else if (!gwins[i]->iconified
|
||||
else if (!gwins[i]->state.iconified
|
||||
&& ((curr_group && !curr_group->cfg.mirror) || on))
|
||||
{
|
||||
EwinIconify(gwins[i]);
|
||||
|
@ -1670,13 +1679,13 @@ EwinOpShade(EWin * ewin, int on)
|
|||
for (i = 0; i < num; i++)
|
||||
{
|
||||
curr_group = EwinsInGroup(ewin, gwins[i]);
|
||||
if (gwins[i]->shaded
|
||||
if (gwins[i]->state.shaded
|
||||
&& ((curr_group && !curr_group->cfg.mirror) || !on))
|
||||
{
|
||||
SoundPlay("SOUND_UNSHADE");
|
||||
EwinUnShade(gwins[i]);
|
||||
}
|
||||
else if (!gwins[i]->shaded
|
||||
else if (!gwins[i]->state.shaded
|
||||
&& ((curr_group && !curr_group->cfg.mirror) || on))
|
||||
{
|
||||
SoundPlay("SOUND_SHADE");
|
||||
|
@ -1723,7 +1732,7 @@ EwinOpSetBorder(EWin * ewin, const char *name)
|
|||
Mode.nogroup, &num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (gwins[i]->shaded)
|
||||
if (gwins[i]->state.shaded)
|
||||
{
|
||||
has_shaded = 1;
|
||||
break;
|
||||
|
@ -1742,7 +1751,7 @@ EwinOpSetBorder(EWin * ewin, const char *name)
|
|||
{
|
||||
SoundPlay("SOUND_WINDOW_BORDER_CHANGE");
|
||||
shadechange = 0;
|
||||
if (gwins[i]->shaded)
|
||||
if (gwins[i]->state.shaded)
|
||||
{
|
||||
shadechange = 1;
|
||||
EwinInstantUnShade(gwins[i]);
|
||||
|
|
153
src/ewins.c
153
src/ewins.c
|
@ -83,7 +83,9 @@ EwinCreate(Window win, int type)
|
|||
ewin = Ecalloc(1, sizeof(EWin));
|
||||
|
||||
ewin->type = type;
|
||||
ewin->state = (Mode.wm.startup) ? EWIN_STATE_STARTUP : EWIN_STATE_NEW;
|
||||
ewin->state.state = (Mode.wm.startup) ? EWIN_STATE_STARTUP : EWIN_STATE_NEW;
|
||||
ewin->update.shape = 1;
|
||||
ewin->update.border = 1;
|
||||
ewin->lx = -1;
|
||||
ewin->ly = -1;
|
||||
ewin->lw = -1;
|
||||
|
@ -99,17 +101,6 @@ EwinCreate(Window win, int type)
|
|||
ewin->client.h_inc = 1;
|
||||
ewin->client.width.max = 65535;
|
||||
ewin->client.height.max = 65535;
|
||||
ewin->client.mwm_decor_border = 1;
|
||||
ewin->client.mwm_decor_resizeh = 1;
|
||||
ewin->client.mwm_decor_title = 1;
|
||||
ewin->client.mwm_decor_menu = 1;
|
||||
ewin->client.mwm_decor_minimize = 1;
|
||||
ewin->client.mwm_decor_maximize = 1;
|
||||
ewin->client.mwm_func_resize = 1;
|
||||
ewin->client.mwm_func_move = 1;
|
||||
ewin->client.mwm_func_minimize = 1;
|
||||
ewin->client.mwm_func_maximize = 1;
|
||||
ewin->client.mwm_func_close = 1;
|
||||
#if 0 /* ENABLE_GNOME - Not actually used */
|
||||
ewin->expanded_width = -1;
|
||||
ewin->expanded_height = -1;
|
||||
|
@ -154,7 +145,7 @@ EwinCreate(Window win, int type)
|
|||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinCreate %#lx frame=%#lx cont=%#lx st=%d\n", ewin->client.win,
|
||||
EoGetWin(ewin), ewin->win_container, ewin->state);
|
||||
EoGetWin(ewin), ewin->win_container, ewin->state.state);
|
||||
|
||||
EventCallbackRegister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin);
|
||||
EventCallbackRegister(ewin->win_container, 0, EwinHandleEventsContainer,
|
||||
|
@ -194,8 +185,8 @@ EwinDestroy(EWin * ewin)
|
|||
return;
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinDestroy %#lx st=%d: %s\n", ewin->client.win, ewin->state,
|
||||
EwinGetName(ewin));
|
||||
Eprintf("EwinDestroy %#lx st=%d: %s\n", ewin->client.win,
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
RemoveItemByPtr(ewin, LIST_TYPE_EWIN);
|
||||
EventCallbackUnregister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin);
|
||||
|
@ -494,21 +485,48 @@ EwinPropagateShapes(EWin * ewin)
|
|||
if (!EoIsShown(ewin))
|
||||
return;
|
||||
|
||||
if (ewin->docked)
|
||||
if (ewin->state.docked)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
Eprintf("EwinPropagateShapes %#lx %#lx %s\n", EoGetWin(ewin),
|
||||
ewin->client.win, EoGetName(ewin));
|
||||
#endif
|
||||
if (!ewin->shapedone)
|
||||
if (ewin->update.shape)
|
||||
{
|
||||
EShapePropagate(EoGetWin(ewin));
|
||||
EoChangeShape(ewin);
|
||||
ewin->shapedone = 1;
|
||||
ewin->update.shape = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EwinStateUpdate(EWin * ewin)
|
||||
{
|
||||
ewin->state.inhibit_actions = ewin->props.no_actions;
|
||||
ewin->state.inhibit_focus = !ewin->client.need_input ||
|
||||
ewin->props.never_focus || ewin->state.iconified;
|
||||
|
||||
ewin->state.no_border = ewin->props.no_border || ewin->state.docked ||
|
||||
(ewin->mwm.valid && !ewin->mwm.decor_title && !ewin->mwm.decor_border);
|
||||
|
||||
ewin->state.inhibit_move = ewin->props.fixedpos || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_resize =
|
||||
ewin->state.shaded || ewin->state.fullscreen ||
|
||||
(ewin->client.no_resize_h && ewin->client.no_resize_v);
|
||||
ewin->state.inhibit_iconify = ewin->props.never_iconify;
|
||||
ewin->state.inhibit_shade = ewin->state.no_border || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_stick = 0;
|
||||
ewin->state.inhibit_max_hor =
|
||||
ewin->client.no_resize_h || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_max_ver =
|
||||
ewin->client.no_resize_v || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_fullscreeen =
|
||||
ewin->state.inhibit_move || ewin->state.inhibit_resize;
|
||||
ewin->state.inhibit_change_desk = 0;
|
||||
ewin->state.inhibit_close = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
Adopt(EWin * ewin)
|
||||
{
|
||||
|
@ -520,6 +538,7 @@ Adopt(EWin * ewin)
|
|||
if (!EwinIsInternal(ewin))
|
||||
{
|
||||
ICCCM_GetHints(ewin, 0);
|
||||
MWM_GetHints(ewin, 0);
|
||||
ICCCM_GetColormap(ewin);
|
||||
HintsGetWindowHints(ewin);
|
||||
SessionGetInfo(ewin, 0);
|
||||
|
@ -540,7 +559,9 @@ Adopt(EWin * ewin)
|
|||
ewin->ewmh.opacity = 0xffffffff;
|
||||
EoChangeOpacity(ewin, ewin->ewmh.opacity);
|
||||
|
||||
if (!ewin->no_button_grabs)
|
||||
EwinStateUpdate(ewin);
|
||||
|
||||
if (!ewin->props.no_button_grabs)
|
||||
GrabButtonGrabs(ewin);
|
||||
|
||||
/* We must reparent after getting original window position */
|
||||
|
@ -553,17 +574,16 @@ Adopt(EWin * ewin)
|
|||
|
||||
EwinEventsConfigure(ewin, 1);
|
||||
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EwinInstantShade(ewin, 1);
|
||||
|
||||
HintsSetWindowState(ewin);
|
||||
HintsSetWindowMiscHints(ewin);
|
||||
HintsSetWindowOpacity(ewin);
|
||||
|
||||
HintsSetClientList();
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("Adopt %#lx st=%d: %s\n", ewin->client.win, ewin->state,
|
||||
Eprintf("Adopt %#lx st=%d: %s\n", ewin->client.win, ewin->state.state,
|
||||
EwinGetName(ewin));
|
||||
}
|
||||
|
||||
|
@ -594,12 +614,8 @@ AddToFamily(EWin * ewin, Window win)
|
|||
desk = EoGetDesk(ewin);
|
||||
|
||||
/* if is an afterstep/windowmaker dock app - dock it */
|
||||
if (Conf.dock.enable && ewin->docked)
|
||||
{
|
||||
DockIt(ewin);
|
||||
ewin->props.donthide = 1;
|
||||
ewin->focusclick = 1;
|
||||
}
|
||||
if (Conf.dock.enable && ewin->state.docked)
|
||||
DockIt(ewin);
|
||||
|
||||
ewin2 = NULL;
|
||||
if (ewin->client.transient)
|
||||
|
@ -663,7 +679,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
lst2 = EwinListGetAll(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if ((lst2[i]->iconified) ||
|
||||
if ((lst2[i]->state.iconified) ||
|
||||
(ewin->client.group != lst2[i]->client.group))
|
||||
continue;
|
||||
|
||||
|
@ -676,15 +692,15 @@ AddToFamily(EWin * ewin, Window win)
|
|||
{
|
||||
desk = EoGetDesk(ewin2);
|
||||
if (!Mode.wm.startup && Conf.focus.switchfortransientmap &&
|
||||
!ewin->iconified)
|
||||
!ewin->state.iconified)
|
||||
DeskGotoByEwin(ewin2);
|
||||
}
|
||||
}
|
||||
|
||||
if (ewin->st.fullscreen)
|
||||
if (ewin->state.fullscreen)
|
||||
{
|
||||
EwinSetFullscreen(ewin, 2);
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
MoveEwinToDesktopAt(ewin, desk, EoGetX(ewin), EoGetY(ewin));
|
||||
ShowEwin(ewin);
|
||||
goto done;
|
||||
|
@ -697,11 +713,11 @@ AddToFamily(EWin * ewin, Window win)
|
|||
{
|
||||
/* if set for borderless then dont slide it in */
|
||||
if (Conf.place.slidein && !Mode.place.doing_slide &&
|
||||
(ewin->client.mwm_decor_title || ewin->client.mwm_decor_border))
|
||||
!ewin->state.no_border)
|
||||
doslide = 1;
|
||||
|
||||
if (Conf.place.manual && !Mode.place.doing_manual &&
|
||||
!ewin->client.already_placed && !ewin->client.transient)
|
||||
!ewin->state.placed && !ewin->client.transient)
|
||||
{
|
||||
if (GrabPointerSet(VRoot.win, ECSR_GRAB, 0) == GrabSuccess)
|
||||
manplace = 1;
|
||||
|
@ -709,7 +725,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
}
|
||||
|
||||
/* if it hasn't been placed yet.... find a spot for it */
|
||||
if ((!ewin->client.already_placed) && (!manplace))
|
||||
if ((!ewin->state.placed) && (!manplace))
|
||||
{
|
||||
/* Place the window below the mouse pointer */
|
||||
if (Conf.place.manual_mouse_pointer)
|
||||
|
@ -728,7 +744,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
&wy, &mask);
|
||||
Mode.x = rx;
|
||||
Mode.y = ry;
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
|
||||
/* try to center the window on the mouse pointer */
|
||||
newWinX = rx;
|
||||
|
@ -750,7 +766,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
}
|
||||
else
|
||||
{
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
ArrangeEwinXY(ewin, &x, &y);
|
||||
}
|
||||
}
|
||||
|
@ -759,14 +775,14 @@ AddToFamily(EWin * ewin, Window win)
|
|||
if (ewin->client.start_iconified)
|
||||
{
|
||||
MoveEwinToDesktopAt(ewin, desk, x, y);
|
||||
ewin->state = EWIN_STATE_MAPPED;
|
||||
ewin->state.state = EWIN_STATE_MAPPED;
|
||||
EwinIconify(ewin);
|
||||
ewin->state = EWIN_STATE_ICONIC;
|
||||
ewin->state.state = EWIN_STATE_ICONIC;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* if we should slide it in and are not currently in the middle of a slide */
|
||||
if ((manplace) && (!ewin->client.already_placed))
|
||||
if ((manplace) && (!ewin->state.placed))
|
||||
{
|
||||
int rx, ry, wx, wy;
|
||||
unsigned int mask;
|
||||
|
@ -781,7 +797,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
&mask);
|
||||
Mode.x = rx;
|
||||
Mode.y = ry;
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
x = Mode.x + 1;
|
||||
y = Mode.y + 1;
|
||||
MoveEwinToDesktopAt(ewin, desk, x, y);
|
||||
|
@ -818,7 +834,7 @@ AddToFamily(EWin * ewin, Window win)
|
|||
fy = (rand() % (VRoot.h)) - EoGetH(ewin);
|
||||
}
|
||||
Mode.place.doing_slide = 1;
|
||||
ewin->st.animated = 1;
|
||||
ewin->state.animated = 1;
|
||||
FocusEnable(0);
|
||||
|
||||
MoveEwinToDesktopAt(ewin, desk, fx, fy);
|
||||
|
@ -916,8 +932,8 @@ EwinWithdraw(EWin * ewin)
|
|||
/* Only external clients should go here */
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinWithdraw %#lx st=%d: %s\n", ewin->client.win, ewin->state,
|
||||
EwinGetName(ewin));
|
||||
Eprintf("EwinWithdraw %#lx st=%d: %s\n", ewin->client.win,
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
EGrabServer();
|
||||
|
||||
|
@ -940,9 +956,9 @@ EwinEventMapRequest(EWin * ewin, Window win)
|
|||
{
|
||||
if (ewin)
|
||||
{
|
||||
if (ewin->state == EWIN_STATE_ICONIC)
|
||||
if (ewin->state.state == EWIN_STATE_ICONIC)
|
||||
EwinDeIconify(ewin);
|
||||
if (ewin->state == EWIN_STATE_WITHDRAWN)
|
||||
if (ewin->state.state == EWIN_STATE_WITHDRAWN)
|
||||
AddToFamily(ewin, win);
|
||||
else
|
||||
{
|
||||
|
@ -974,7 +990,7 @@ EwinEventDestroy(EWin * ewin)
|
|||
{
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventDestroy %#lx st=%d: %s\n", ewin->client.win,
|
||||
ewin->state, EwinGetName(ewin));
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
EwinDestroy(ewin);
|
||||
}
|
||||
|
@ -990,7 +1006,7 @@ EwinEventReparent(EWin * ewin)
|
|||
parent = EWindowGetParent(ewin->client.win);
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventReparent %#lx st=%d parent=%#lx: %s\n",
|
||||
ewin->client.win, ewin->state, parent, EwinGetName(ewin));
|
||||
ewin->client.win, ewin->state.state, parent, EwinGetName(ewin));
|
||||
if (parent != ewin->win_container)
|
||||
EwinDestroy(ewin);
|
||||
|
||||
|
@ -1000,13 +1016,13 @@ EwinEventReparent(EWin * ewin)
|
|||
static void
|
||||
EwinEventMap(EWin * ewin)
|
||||
{
|
||||
int old_state = ewin->state;
|
||||
int old_state = ewin->state.state;
|
||||
|
||||
ewin->state = EWIN_STATE_MAPPED;
|
||||
ewin->state.state = EWIN_STATE_MAPPED;
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventMap %#lx st=%d: %s\n", ewin->client.win, ewin->state,
|
||||
EwinGetName(ewin));
|
||||
Eprintf("EwinEventMap %#lx st=%d: %s\n", ewin->client.win,
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
/* If first time we may want to focus it (unless during startup) */
|
||||
if (old_state == EWIN_STATE_NEW)
|
||||
|
@ -1021,23 +1037,23 @@ static void
|
|||
EwinEventUnmap(EWin * ewin)
|
||||
{
|
||||
if (EventDebug(EDBUG_TYPE_EWINS))
|
||||
Eprintf("EwinEventUnmap %#lx st=%d: %s\n", ewin->client.win, ewin->state,
|
||||
EwinGetName(ewin));
|
||||
Eprintf("EwinEventUnmap %#lx st=%d: %s\n", ewin->client.win,
|
||||
ewin->state.state, EwinGetName(ewin));
|
||||
|
||||
if (ewin->state == EWIN_STATE_WITHDRAWN)
|
||||
if (ewin->state.state == EWIN_STATE_WITHDRAWN)
|
||||
return;
|
||||
|
||||
if (ewin->state == EWIN_STATE_ICONIC || !ewin->iconified)
|
||||
ewin->state = EWIN_STATE_WITHDRAWN;
|
||||
if (ewin->state.state == EWIN_STATE_ICONIC || !ewin->state.iconified)
|
||||
ewin->state.state = EWIN_STATE_WITHDRAWN;
|
||||
else
|
||||
ewin->state = EWIN_STATE_ICONIC;
|
||||
ewin->state.state = EWIN_STATE_ICONIC;
|
||||
|
||||
EwinUnmap1(ewin);
|
||||
EWindowSetMapped(ewin->client.win, 0);
|
||||
EoUnmap(ewin);
|
||||
EwinUnmap2(ewin);
|
||||
|
||||
if (ewin->state == EWIN_STATE_ICONIC)
|
||||
if (ewin->state.state == EWIN_STATE_ICONIC)
|
||||
return;
|
||||
|
||||
if (EwinIsInternal(ewin))
|
||||
|
@ -1223,6 +1239,7 @@ EwinEventPropertyNotify(EWin * ewin, XEvent * ev)
|
|||
|
||||
HintsProcessPropertyChange(ewin, ev->xproperty.atom);
|
||||
SessionGetInfo(ewin, ev->xproperty.atom);
|
||||
EwinStateUpdate(ewin);
|
||||
|
||||
EwinChangesProcess(ewin);
|
||||
EUngrabServer();
|
||||
|
@ -1232,14 +1249,14 @@ static void
|
|||
EwinEventShapeChange(EWin * ewin)
|
||||
{
|
||||
ICCCM_GetShapeInfo(ewin);
|
||||
ewin->shapedone = 0;
|
||||
ewin->update.shape = 1;
|
||||
EwinPropagateShapes(ewin);
|
||||
}
|
||||
|
||||
static void
|
||||
EwinEventVisibility(EWin * ewin, int state)
|
||||
{
|
||||
ewin->visibility = state;
|
||||
ewin->state.visibility = state;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1382,13 +1399,13 @@ ShowEwin(EWin * ewin)
|
|||
if (ewin->client.win)
|
||||
{
|
||||
#if 0 /* FIXME - Why? */
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
|
||||
#endif
|
||||
EMapWindow(ewin->client.win);
|
||||
}
|
||||
|
||||
if (!ewin->shapedone)
|
||||
if (ewin->update.shape)
|
||||
{
|
||||
ewin->o.shown = 1;
|
||||
EwinPropagateShapes(ewin);
|
||||
|
@ -1396,6 +1413,8 @@ ShowEwin(EWin * ewin)
|
|||
}
|
||||
|
||||
EoMap(ewin, 0);
|
||||
|
||||
EwinStateUpdate(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1411,7 +1430,9 @@ HideEwin(EWin * ewin)
|
|||
|
||||
EwinUnmap2(ewin);
|
||||
|
||||
if (!EwinIsInternal(ewin) || ewin->iconified)
|
||||
EwinStateUpdate(ewin);
|
||||
|
||||
if (!EwinIsInternal(ewin) || ewin->state.iconified)
|
||||
return;
|
||||
|
||||
if (ewin->Close)
|
||||
|
@ -1661,7 +1682,7 @@ EwinsSetFree(void)
|
|||
if (EwinIsInternal(ewin))
|
||||
continue;
|
||||
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
ICCCM_DeIconify(ewin);
|
||||
|
||||
/* This makes E determine the client window stacking at exit */
|
||||
|
@ -1758,7 +1779,7 @@ EwinHandleEventsContainer(XEvent * ev, void *prm)
|
|||
break;
|
||||
case UnmapNotify:
|
||||
#if 0
|
||||
if (ewin->state == EWIN_STATE_NEW)
|
||||
if (ewin->state.state == EWIN_STATE_NEW)
|
||||
{
|
||||
Eprintf("EwinEventUnmap %#lx: Ignoring bogus Unmap event\n",
|
||||
ewin->client.win);
|
||||
|
|
144
src/ewmh.c
144
src/ewmh.c
|
@ -374,28 +374,30 @@ EWMH_SetWindowState(const EWin * ewin)
|
|||
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_STICKY,
|
||||
EoIsSticky(ewin));
|
||||
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_SHADED,
|
||||
ewin->shaded);
|
||||
ewin->state.shaded);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR, ewin->skiptask);
|
||||
ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR,
|
||||
ewin->props.skip_ext_task);
|
||||
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_HIDDEN,
|
||||
ewin->iconified || ewin->shaded);
|
||||
ewin->state.iconified || ewin->state.shaded);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT,
|
||||
ewin->st.maximized_vert);
|
||||
ewin->state.maximized_vert);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ,
|
||||
ewin->st.maximized_horz);
|
||||
ewin->state.maximized_horz);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN, ewin->st.fullscreen);
|
||||
ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN, ewin->state.fullscreen);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER, ewin->skip_ext_pager);
|
||||
ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER,
|
||||
ewin->props.skip_ext_pager);
|
||||
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_ABOVE,
|
||||
EoGetLayer(ewin) >= 6);
|
||||
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_BELOW,
|
||||
EoGetLayer(ewin) <= 2);
|
||||
atom_list_set(atom_list, len, &atom_count,
|
||||
ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION,
|
||||
ewin->st.attention);
|
||||
ewin->state.attention);
|
||||
|
||||
ecore_x_window_prop_atom_set(ewin->client.win, ECORE_X_ATOM_NET_WM_STATE,
|
||||
atom_list, atom_count);
|
||||
|
@ -501,10 +503,10 @@ EWMH_GetWindowState(EWin * ewin)
|
|||
|
||||
/* We must clear/set all according to not present/present */
|
||||
/* EoSetSticky(ewin, 0); Do not override if set via _NET_WM_DESKTOP */
|
||||
ewin->shaded = 0;
|
||||
ewin->skiptask = ewin->skip_ext_pager = 0;
|
||||
ewin->st.maximized_horz = ewin->st.maximized_vert = 0;
|
||||
ewin->st.fullscreen = ewin->st.attention = 0;
|
||||
ewin->state.shaded = 0;
|
||||
ewin->props.skip_ext_task = ewin->props.skip_ext_pager = 0;
|
||||
ewin->state.maximized_horz = ewin->state.maximized_vert = 0;
|
||||
ewin->state.fullscreen = ewin->state.attention = 0;
|
||||
/* ewin->layer = No ... TBD */
|
||||
|
||||
for (i = 0; i < n_atoms; i++)
|
||||
|
@ -513,25 +515,25 @@ EWMH_GetWindowState(EWin * ewin)
|
|||
if (atom == ECORE_X_ATOM_NET_WM_STATE_STICKY)
|
||||
EoSetSticky(ewin, 1);
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SHADED)
|
||||
ewin->shaded = 1;
|
||||
ewin->state.shaded = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR)
|
||||
ewin->skiptask = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
|
||||
ewin->skip_ext_pager = 1;
|
||||
ewin->props.skip_ext_pager = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_HIDDEN)
|
||||
; /* ewin->iconified = 1; No - WM_STATE does this */
|
||||
; /* ewin->state.iconified = 1; No - WM_STATE does this */
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT)
|
||||
ewin->st.maximized_vert = 1;
|
||||
ewin->state.maximized_vert = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
|
||||
ewin->st.maximized_horz = 1;
|
||||
ewin->state.maximized_horz = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN)
|
||||
ewin->st.fullscreen = 1;
|
||||
ewin->state.fullscreen = 1;
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_ABOVE)
|
||||
EoSetLayer(ewin, 6);
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_BELOW)
|
||||
EoSetLayer(ewin, 2);
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
|
||||
ewin->st.attention = 1;
|
||||
ewin->state.attention = 1;
|
||||
}
|
||||
Efree(p_atoms);
|
||||
}
|
||||
|
@ -556,27 +558,27 @@ EWMH_GetWindowType(EWin * ewin)
|
|||
#if 0 /* Should be configurable */
|
||||
ewin->focusclick = 1;
|
||||
#endif
|
||||
ewin->skipfocus = 1;
|
||||
ewin->fixedpos = 1;
|
||||
EwinSetBorderByName(ewin, "BORDERLESS");
|
||||
ewin->props.skip_focuslist = 1;
|
||||
ewin->props.fixedpos = 1;
|
||||
ewin->props.donthide = 1;
|
||||
EwinSetBorderByName(ewin, "BORDERLESS");
|
||||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK)
|
||||
{
|
||||
ewin->skiptask = 1;
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->skipfocus = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
EoSetSticky(ewin, 1);
|
||||
ewin->never_use_area = 1;
|
||||
ewin->props.never_use_area = 1;
|
||||
ewin->props.donthide = 1;
|
||||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY)
|
||||
{
|
||||
/* Epplets hit this */
|
||||
ewin->skiptask = 1;
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->skipfocus = 1;
|
||||
ewin->never_use_area = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
ewin->props.never_use_area = 1;
|
||||
ewin->props.donthide = 1;
|
||||
}
|
||||
#if 0 /* Not used by E (yet?) */
|
||||
|
@ -699,31 +701,35 @@ EWMH_GetWindowStrut(EWin * ewin)
|
|||
}
|
||||
|
||||
void
|
||||
EWMH_SetWindowMiscHints(const EWin * ewin)
|
||||
EWMH_SetWindowActions(const EWin * ewin)
|
||||
{
|
||||
static Ecore_X_Atom aa[10];
|
||||
Ecore_X_Atom aa[10];
|
||||
int num;
|
||||
|
||||
/*
|
||||
* We'll just set them all on all windows for now.
|
||||
* Should be done a bit more selectively.
|
||||
*/
|
||||
|
||||
if (aa[0] == None)
|
||||
{
|
||||
aa[0] = ECORE_X_ATOM_NET_WM_ACTION_MOVE;
|
||||
aa[1] = ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
|
||||
aa[2] = ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
|
||||
aa[3] = ECORE_X_ATOM_NET_WM_ACTION_SHADE;
|
||||
aa[4] = ECORE_X_ATOM_NET_WM_ACTION_STICK;
|
||||
aa[5] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
|
||||
aa[6] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
|
||||
aa[7] = ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
|
||||
aa[8] = ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
|
||||
aa[9] = ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
|
||||
}
|
||||
num = 0;
|
||||
if (!ewin->state.inhibit_move)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_MOVE;
|
||||
if (!ewin->state.inhibit_resize)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
|
||||
if (!ewin->state.inhibit_iconify)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
|
||||
if (!ewin->state.inhibit_shade)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_SHADE;
|
||||
if (!ewin->state.inhibit_stick)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_STICK;
|
||||
if (!ewin->state.inhibit_max_hor)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
|
||||
if (!ewin->state.inhibit_max_ver)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
|
||||
if (!ewin->state.inhibit_fullscreeen)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
|
||||
if (!ewin->state.inhibit_change_desk)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
|
||||
if (!ewin->state.inhibit_close)
|
||||
aa[num++] = ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
|
||||
|
||||
ecore_x_window_prop_atom_set(ewin->client.win,
|
||||
ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, aa, 10);
|
||||
ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, aa, num);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -840,10 +846,10 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
|
||||
if (ev->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
|
||||
{
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
EwinDeIconify(ewin);
|
||||
RaiseEwin(ewin);
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EwinUnShade(ewin);
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
}
|
||||
|
@ -888,7 +894,7 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SHADED)
|
||||
{
|
||||
action = do_set(ewin->shaded, action);
|
||||
action = do_set(ewin->state.shaded, action);
|
||||
if (action)
|
||||
EwinShade(ewin);
|
||||
else
|
||||
|
@ -896,14 +902,14 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR)
|
||||
{
|
||||
action = do_set(ewin->skiptask, action);
|
||||
ewin->skiptask = action;
|
||||
action = do_set(ewin->props.skip_ext_task, action);
|
||||
ewin->props.skip_ext_task = action;
|
||||
EWMH_SetWindowState(ewin);
|
||||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
|
||||
{
|
||||
action = do_set(ewin->skip_ext_pager, action);
|
||||
ewin->skip_ext_pager = action;
|
||||
action = do_set(ewin->props.skip_ext_pager, action);
|
||||
ewin->props.skip_ext_pager = action;
|
||||
EWMH_SetWindowState(ewin);
|
||||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT ||
|
||||
|
@ -912,8 +918,8 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
void (*func) (EWin *, const char *);
|
||||
int maxh, maxv;
|
||||
|
||||
maxh = ewin->st.maximized_horz;
|
||||
maxv = ewin->st.maximized_vert;
|
||||
maxh = ewin->state.maximized_horz;
|
||||
maxv = ewin->state.maximized_vert;
|
||||
if (atom2 == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT ||
|
||||
atom2 == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
|
||||
{
|
||||
|
@ -933,12 +939,12 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
maxh = do_set(maxh, action);
|
||||
}
|
||||
|
||||
if ((ewin->st.maximized_horz == maxh) &&
|
||||
(ewin->st.maximized_vert == maxv))
|
||||
if ((ewin->state.maximized_horz == maxh) &&
|
||||
(ewin->state.maximized_vert == maxv))
|
||||
goto done;
|
||||
|
||||
if ((ewin->st.maximized_horz && !maxh) ||
|
||||
(ewin->st.maximized_vert && !maxv))
|
||||
if ((ewin->state.maximized_horz && !maxh) ||
|
||||
(ewin->state.maximized_vert && !maxv))
|
||||
ewin->toggle = 1;
|
||||
else
|
||||
ewin->toggle = 0;
|
||||
|
@ -948,8 +954,8 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN)
|
||||
{
|
||||
action = do_set(ewin->st.fullscreen, action);
|
||||
if (ewin->st.fullscreen == action)
|
||||
action = do_set(ewin->state.fullscreen, action);
|
||||
if (ewin->state.fullscreen == action)
|
||||
goto done;
|
||||
|
||||
EwinSetFullscreen(ewin, action);
|
||||
|
@ -972,8 +978,8 @@ EWMH_ProcessClientMessage(XClientMessageEvent * ev)
|
|||
}
|
||||
else if (atom == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
|
||||
{
|
||||
action = do_set(ewin->st.attention, action);
|
||||
ewin->st.attention = action;
|
||||
action = do_set(ewin->state.attention, action);
|
||||
ewin->state.attention = action;
|
||||
EWMH_SetWindowState(ewin);
|
||||
}
|
||||
}
|
||||
|
|
34
src/focus.c
34
src/focus.c
|
@ -60,23 +60,20 @@ FocusEwinValid(EWin * ewin, int want_on_screen, int click, int want_visible)
|
|||
|
||||
#if 0
|
||||
Eprintf("FocusEwinValid %#lx %s: cl=%d(%d) vis=%d(%d)\n", ewin->client.win,
|
||||
EwinGetName(ewin), click, ewin->focusclick, want_visible,
|
||||
ewin->visibility);
|
||||
EwinGetName(ewin), click, ewin->props.focusclick, want_visible,
|
||||
ewin->state.visibility);
|
||||
#endif
|
||||
|
||||
if (ewin->neverfocus || ewin->iconified)
|
||||
return 0;
|
||||
|
||||
if (!ewin->client.need_input)
|
||||
if (ewin->state.inhibit_focus)
|
||||
return 0;
|
||||
|
||||
if (!EwinIsMapped(ewin) || !EoIsShown(ewin))
|
||||
return 0;
|
||||
|
||||
if (ewin->focusclick && !click)
|
||||
if (ewin->props.focusclick && !click)
|
||||
return 0;
|
||||
|
||||
if (want_visible && ewin->visibility == VisibilityFullyObscured)
|
||||
if (want_visible && ewin->state.visibility == VisibilityFullyObscured)
|
||||
return 0;
|
||||
|
||||
return !want_on_screen || EwinIsOnScreen(ewin);
|
||||
|
@ -112,7 +109,8 @@ FocusEwinSelect(void)
|
|||
lst = EwinListFocusGet(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (!FocusEwinValid(lst[i], 1, 0, 0) || lst[i]->skipfocus)
|
||||
if (!FocusEwinValid(lst[i], 1, 0, 0) ||
|
||||
lst[i]->props.skip_focuslist)
|
||||
continue;
|
||||
ewin = lst[i];
|
||||
break;
|
||||
|
@ -160,7 +158,7 @@ FocusGetNextEwin(void)
|
|||
ewin = NULL;
|
||||
for (i = num - 1; i >= 0; i--)
|
||||
{
|
||||
if (lst[i]->skipfocus || !FocusEwinValid(lst[i], 1, 0, 0))
|
||||
if (!FocusEwinValid(lst[i], 1, 0, 0) || lst[i]->props.skip_focuslist)
|
||||
continue;
|
||||
ewin = lst[i];
|
||||
break;
|
||||
|
@ -184,7 +182,7 @@ FocusGetPrevEwin(void)
|
|||
ewin = NULL;
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i]->skipfocus || !FocusEwinValid(lst[i], 1, 0, 0))
|
||||
if (!FocusEwinValid(lst[i], 1, 0, 0) || lst[i]->props.skip_focuslist)
|
||||
continue;
|
||||
ewin = lst[i];
|
||||
break;
|
||||
|
@ -198,9 +196,9 @@ void
|
|||
FocusEwinSetGrabs(EWin * ewin)
|
||||
{
|
||||
if ((Conf.focus.mode != MODE_FOCUS_CLICK &&
|
||||
ewin->active && Conf.focus.clickraises &&
|
||||
ewin->state.active && Conf.focus.clickraises &&
|
||||
ewin != EwinListStackGetTop()) ||
|
||||
(Conf.focus.mode == MODE_FOCUS_CLICK && !ewin->active))
|
||||
(Conf.focus.mode == MODE_FOCUS_CLICK && !ewin->state.active))
|
||||
{
|
||||
GrabButtonSet(AnyButton, AnyModifier, ewin->win_container,
|
||||
ButtonPressMask, ECSR_PGRAB, 1);
|
||||
|
@ -222,14 +220,14 @@ FocusEwinSetGrabs(EWin * ewin)
|
|||
static void
|
||||
FocusEwinSetActive(EWin * ewin, int active)
|
||||
{
|
||||
ewin->active = active;
|
||||
ewin->state.active = active;
|
||||
EwinBorderUpdateState(ewin);
|
||||
|
||||
FocusEwinSetGrabs(ewin);
|
||||
|
||||
if (active && ewin->st.attention)
|
||||
if (active && ewin->state.attention)
|
||||
{
|
||||
ewin->st.attention = 0;
|
||||
ewin->state.attention = 0;
|
||||
HintsSetWindowState(ewin);
|
||||
}
|
||||
}
|
||||
|
@ -351,7 +349,7 @@ doFocusToEwin(EWin * ewin, int why)
|
|||
|
||||
/* NB! ewin != NULL */
|
||||
|
||||
if (why != FOCUS_CLICK && ewin->focusclick)
|
||||
if (why != FOCUS_CLICK && ewin->props.focusclick)
|
||||
return;
|
||||
|
||||
if (Conf.autoraise.enable)
|
||||
|
@ -594,7 +592,7 @@ FocusHandleClick(EWin * ewin, Window win)
|
|||
ESync();
|
||||
}
|
||||
}
|
||||
else if (ewin->focusclick)
|
||||
else if (ewin->props.focusclick)
|
||||
{
|
||||
FocusToEWin(ewin, FOCUS_CLICK);
|
||||
}
|
||||
|
|
35
src/gnome.c
35
src/gnome.c
|
@ -357,13 +357,13 @@ GNOME_GetHintState(EWin * ewin, Atom atom_change)
|
|||
return;
|
||||
|
||||
if (flags & WIN_STATE_SHADED)
|
||||
ewin->shaded = 1;
|
||||
ewin->state.shaded = 1;
|
||||
if (flags & WIN_STATE_STICKY)
|
||||
EoSetSticky(ewin, 1);
|
||||
if (flags & WIN_STATE_FIXED_POSITION)
|
||||
ewin->fixedpos = 1;
|
||||
ewin->props.fixedpos = 1;
|
||||
if (flags & WIN_STATE_ARRANGE_IGNORE)
|
||||
ewin->ignorearrange = 1;
|
||||
ewin->props.ignorearrange = 1;
|
||||
}
|
||||
|
||||
#if 0 /* Does nothing */
|
||||
|
@ -433,15 +433,15 @@ GNOME_GetHint(EWin * ewin, Atom atom_change)
|
|||
return;
|
||||
|
||||
if (flags & WIN_HINTS_SKIP_TASKBAR)
|
||||
ewin->skiptask = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
if (flags & WIN_HINTS_SKIP_FOCUS)
|
||||
ewin->skipfocus = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
if (flags & WIN_HINTS_SKIP_WINLIST)
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
if (flags & WIN_HINTS_FOCUS_ON_CLICK)
|
||||
ewin->focusclick = 1;
|
||||
ewin->props.focusclick = 1;
|
||||
if (flags & WIN_HINTS_DO_NOT_COVER)
|
||||
ewin->never_use_area = 1;
|
||||
ewin->props.never_use_area = 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -457,9 +457,9 @@ GNOME_SetHint(const EWin * ewin)
|
|||
val = 0;
|
||||
if (EoIsSticky(ewin))
|
||||
val |= WIN_STATE_STICKY;
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
val |= WIN_STATE_SHADED;
|
||||
if (ewin->fixedpos)
|
||||
if (ewin->props.fixedpos)
|
||||
val |= WIN_STATE_FIXED_POSITION;
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, atom_set, &val, 1);
|
||||
}
|
||||
|
@ -657,9 +657,7 @@ GNOME_SetClientList(void)
|
|||
wl = Emalloc(num * sizeof(unsigned int));
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if ((lst[i]->type != EWIN_TYPE_MENU) &&
|
||||
(lst[i]->type != EWIN_TYPE_PAGER) && (!lst[i]->skiptask)
|
||||
&& lst[i]->iconified != 4)
|
||||
if (!lst[i]->props.skip_ext_task && lst[i]->state.iconified != 4)
|
||||
wl[j++] = lst[i]->client.win;
|
||||
}
|
||||
}
|
||||
|
@ -786,18 +784,19 @@ GNOME_ProcessClientMessage(XClientMessageEvent * event)
|
|||
if (event->data.l[0] & WIN_STATE_FIXED_POSITION)
|
||||
{
|
||||
if (event->data.l[1] & WIN_STATE_FIXED_POSITION)
|
||||
ewin->fixedpos = 1;
|
||||
ewin->props.fixedpos = 1;
|
||||
else
|
||||
ewin->fixedpos = 0;
|
||||
ewin->props.fixedpos = 0;
|
||||
}
|
||||
if (event->data.l[0] & WIN_STATE_ARRANGE_IGNORE)
|
||||
{
|
||||
if (event->data.l[1] & WIN_STATE_ARRANGE_IGNORE)
|
||||
ewin->ignorearrange = 1;
|
||||
ewin->props.ignorearrange = 1;
|
||||
else
|
||||
ewin->ignorearrange = 0;
|
||||
ewin->props.ignorearrange = 0;
|
||||
}
|
||||
if ((event->data.l[0] & WIN_STATE_STICKY) && (!ewin->ignorearrange))
|
||||
if ((event->data.l[0] & WIN_STATE_STICKY)
|
||||
&& (!ewin->props.ignorearrange))
|
||||
{
|
||||
if (event->data.l[1] & WIN_STATE_STICKY)
|
||||
{
|
||||
|
|
27
src/hints.c
27
src/hints.c
|
@ -187,6 +187,7 @@ HintsSetWindowState(const EWin * ewin)
|
|||
#endif
|
||||
#if ENABLE_EWMH
|
||||
EWMH_SetWindowState(ewin);
|
||||
EWMH_SetWindowActions(ewin);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -206,14 +207,6 @@ HintsSetWindowBorder(const EWin * ewin)
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
HintsSetWindowMiscHints(const EWin * ewin)
|
||||
{
|
||||
#if ENABLE_EWMH
|
||||
EWMH_SetWindowMiscHints(ewin);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Functions that set E-internals from X11-properties
|
||||
*/
|
||||
|
@ -331,11 +324,11 @@ EHintsSetInfo(const EWin * ewin)
|
|||
c[1] = EoIsSticky(ewin);
|
||||
c[2] = EoGetX(ewin);
|
||||
c[3] = EoGetY(ewin);
|
||||
c[4] = ewin->iconified;
|
||||
c[5] = ewin->shaded;
|
||||
c[4] = ewin->state.iconified;
|
||||
c[5] = ewin->state.shaded;
|
||||
c[6] = ewin->client.w;
|
||||
c[7] = ewin->client.h;
|
||||
c[8] = ewin->docked;
|
||||
c[8] = ewin->state.docked;
|
||||
|
||||
ecore_x_window_prop_card32_set(ewin->client.win, a, (unsigned int *)c, 9);
|
||||
|
||||
|
@ -373,20 +366,20 @@ EHintsGetInfo(EWin * ewin)
|
|||
EoSetSticky(ewin, c[1]);
|
||||
ewin->client.x = c[2];
|
||||
ewin->client.y = c[3];
|
||||
ewin->iconified = c[4];
|
||||
ewin->shaded = c[5];
|
||||
ewin->state.iconified = c[4];
|
||||
ewin->state.shaded = c[5];
|
||||
ewin->client.w = c[6];
|
||||
ewin->client.h = c[7];
|
||||
if (num >= 9) /* Compatibility */
|
||||
ewin->docked = c[8];
|
||||
ewin->state.docked = c[8];
|
||||
|
||||
ewin->client.grav = NorthWestGravity;
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
{
|
||||
ewin->client.start_iconified = 1;
|
||||
ewin->iconified = 0;
|
||||
ewin->state.iconified = 0;
|
||||
}
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
|
||||
str = ecore_x_window_prop_string_get(ewin->client.win, aa);
|
||||
if (str)
|
||||
|
|
19
src/icccm.c
19
src/icccm.c
|
@ -374,7 +374,7 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
|
||||
if (XGetWMNormalHints(disp, ewin->client.win, &hint, &mask))
|
||||
{
|
||||
if (!(ewin->client.already_placed))
|
||||
if (!(ewin->state.placed))
|
||||
{
|
||||
if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
|
||||
{
|
||||
|
@ -414,14 +414,14 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
ewin->client.y += DeskGetY(dsk);
|
||||
}
|
||||
}
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.x = 0;
|
||||
ewin->client.y = 0;
|
||||
ewin->client.already_placed = 0;
|
||||
ewin->state.placed = 0;
|
||||
}
|
||||
|
||||
if (hint.flags & PMinSize)
|
||||
|
@ -610,8 +610,6 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
if (EwinIsInternal(ewin))
|
||||
return;
|
||||
|
||||
MWM_GetHints(ewin, atom_change);
|
||||
|
||||
hint = NULL;
|
||||
if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_HINTS)
|
||||
hint = XGetWMHints(disp, ewin->client.win);
|
||||
|
@ -626,7 +624,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
{
|
||||
if ((hint->icon_x == 0) && (hint->icon_y == 0)
|
||||
&& hint->window_group == ewin->client.win)
|
||||
ewin->docked = 1;
|
||||
ewin->state.docked = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -666,7 +664,7 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
ewin->client.urgency = 1;
|
||||
EwinChange(ewin, EWIN_CHANGE_ATTENTION);
|
||||
}
|
||||
ewin->st.attention = 1;
|
||||
ewin->state.attention = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -693,11 +691,6 @@ ICCCM_GetHints(EWin * ewin, Atom atom_change)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ewin->client.need_input)
|
||||
{
|
||||
ewin->skipfocus = 1;
|
||||
}
|
||||
|
||||
if (atom_change == 0 || atom_change == ECORE_X_ATOM_WM_TRANSIENT_FOR)
|
||||
{
|
||||
ewin->client.transient = 0;
|
||||
|
@ -738,7 +731,7 @@ void
|
|||
ICCCM_GetShapeInfo(EWin * ewin)
|
||||
{
|
||||
EGrabServer();
|
||||
ewin->client.shaped = EShapeCopy(ewin->win_container, ewin->client.win);
|
||||
ewin->state.shaped = EShapeCopy(ewin->win_container, ewin->client.win);
|
||||
EUngrabServer();
|
||||
|
||||
#if 0 /* Debug */
|
||||
|
|
|
@ -530,12 +530,12 @@ IconboxEwinInit(EWin * ewin, void *ptr)
|
|||
ewin->MoveResize = IconboxEwinMoveResize;
|
||||
ewin->Close = IconboxEwinClose;
|
||||
|
||||
ewin->skiptask = 1;
|
||||
ewin->skip_ext_pager = 1;
|
||||
ewin->skipfocus = 1;
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->neverfocus = 1;
|
||||
ewin->props.inhibit_iconify = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
ewin->props.skip_ext_pager = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
ewin->props.never_focus = 1;
|
||||
ewin->props.never_iconify = 1;
|
||||
ewin->props.autosave = 1;
|
||||
|
||||
EoSetSticky(ewin, 1);
|
||||
|
@ -566,7 +566,7 @@ IconboxShow(Iconbox * ib)
|
|||
|
||||
IconboxReconfigure(ib);
|
||||
|
||||
if (ewin->client.already_placed)
|
||||
if (ewin->state.placed)
|
||||
{
|
||||
MoveEwinToDesktop(ewin, EoGetDesk(ewin));
|
||||
MoveResizeEwin(ewin, EoGetX(ewin), EoGetY(ewin), ewin->client.w,
|
||||
|
@ -686,7 +686,7 @@ IconboxesEwinIconify(EWin * ewin)
|
|||
|
||||
IconboxObjEwinAdd(ib, ewin);
|
||||
|
||||
if (ib->animate && !ewin->st.showingdesk)
|
||||
if (ib->animate && !ewin->state.showingdesk)
|
||||
IB_Animate(1, ewin, ib->ewin);
|
||||
}
|
||||
|
||||
|
@ -701,7 +701,7 @@ IconboxesEwinDeIconify(EWin * ewin)
|
|||
if (!ib)
|
||||
return;
|
||||
|
||||
if (ib->animate && !ewin->st.showingdesk)
|
||||
if (ib->animate && !ewin->state.showingdesk)
|
||||
{
|
||||
EobjsRepaint();
|
||||
IB_Animate(0, ewin, ib->ewin);
|
||||
|
@ -746,7 +746,7 @@ SelectIconboxForEwin(EWin * ewin)
|
|||
if (!lst)
|
||||
return NULL;
|
||||
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
{
|
||||
/* find the iconbox this window got iconifed into */
|
||||
for (i = 0; i < num; i++)
|
||||
|
@ -1724,7 +1724,7 @@ IconboxDraw(Iconbox * ib)
|
|||
}
|
||||
EShapePropagate(ib->win);
|
||||
ICCCM_GetShapeInfo(ib->ewin);
|
||||
ib->ewin->shapedone = 0;
|
||||
ib->ewin->update.shape = 1;
|
||||
EwinPropagateShapes(ib->ewin);
|
||||
}
|
||||
|
||||
|
@ -2660,12 +2660,12 @@ IconboxesSighan(int sig, void *prm)
|
|||
break;
|
||||
case ESIGNAL_EWIN_DESTROY:
|
||||
ewin = (EWin *) prm;
|
||||
if (ewin->iconified > 0)
|
||||
if (ewin->state.iconified > 0)
|
||||
RemoveMiniIcon(ewin);
|
||||
break;
|
||||
case ESIGNAL_EWIN_CHANGE_ICON:
|
||||
ewin = (EWin *) prm;
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
IconboxesUpdateEwinIcon(ewin, 1);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ IB_SnapEWin(EWin * ewin, int size)
|
|||
if (ww <= 0 || hh <= 0)
|
||||
return NULL;
|
||||
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EwinInstantUnShade(ewin);
|
||||
RaiseEwin(ewin);
|
||||
|
||||
|
|
65
src/ipc.c
65
src/ipc.c
|
@ -438,8 +438,9 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
break;
|
||||
|
||||
case EWIN_OP_ICONIFY:
|
||||
if (SetEwinBoolean("window iconified", &ewin->iconified, param1, 0))
|
||||
EwinOpIconify(ewin, !ewin->iconified);
|
||||
if (SetEwinBoolean
|
||||
("window iconified", &ewin->state.iconified, param1, 0))
|
||||
EwinOpIconify(ewin, !ewin->state.iconified);
|
||||
break;
|
||||
|
||||
case EWIN_OP_OPACITY:
|
||||
|
@ -462,8 +463,8 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
#endif
|
||||
|
||||
case EWIN_OP_SHADE:
|
||||
if (SetEwinBoolean("shaded", &ewin->shaded, param1, 0))
|
||||
EwinOpShade(ewin, !ewin->shaded);
|
||||
if (SetEwinBoolean("shaded", &ewin->state.shaded, param1, 0))
|
||||
EwinOpShade(ewin, !ewin->state.shaded);
|
||||
break;
|
||||
|
||||
case EWIN_OP_STICK:
|
||||
|
@ -473,26 +474,27 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
break;
|
||||
|
||||
case EWIN_OP_FIXED_POS:
|
||||
SetEwinBoolean("fixedpos", &ewin->fixedpos, param1, 1);
|
||||
SetEwinBoolean("fixedpos", &ewin->props.fixedpos, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NEVER_USE_AREA:
|
||||
SetEwinBoolean("never_use_area", &ewin->never_use_area, param1, 1);
|
||||
SetEwinBoolean("never_use_area", &ewin->props.never_use_area, param1,
|
||||
1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_CLICK:
|
||||
SetEwinBoolean("focusclick", &ewin->focusclick, param1, 1);
|
||||
SetEwinBoolean("focusclick", &ewin->props.focusclick, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_NEVER:
|
||||
SetEwinBoolean("neverfocus", &ewin->neverfocus, param1, 1);
|
||||
SetEwinBoolean("neverfocus", &ewin->props.never_focus, param1, 1);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NO_BUTTON_GRABS:
|
||||
if (SetEwinBoolean
|
||||
("no_button_grabs", &ewin->no_button_grabs, param1, 1))
|
||||
("no_button_grabs", &ewin->props.no_button_grabs, param1, 1))
|
||||
{
|
||||
if (ewin->no_button_grabs)
|
||||
if (ewin->props.no_button_grabs)
|
||||
UnGrabButtonGrabs(ewin);
|
||||
else
|
||||
GrabButtonGrabs(ewin);
|
||||
|
@ -687,23 +689,23 @@ IPC_WinOps(const char *params, Client * c __UNUSED__)
|
|||
goto done;
|
||||
}
|
||||
DeskGotoByEwin(ewin);
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
EwinOpIconify(ewin, 0);
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EwinOpShade(ewin, 0);
|
||||
EwinOpRaise(ewin);
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FULLSCREEN:
|
||||
on = ewin->st.fullscreen;
|
||||
on = ewin->state.fullscreen;
|
||||
if (SetEwinBoolean("fullscreen", &on, param1, 0))
|
||||
EwinSetFullscreen(ewin, !on);
|
||||
break;
|
||||
|
||||
case EWIN_OP_SKIP_LISTS:
|
||||
if (SetEwinBoolean("skiplists", &ewin->skiptask, param1, 1))
|
||||
EwinOpSkipLists(ewin, ewin->skiptask);
|
||||
if (SetEwinBoolean("skiplists", &ewin->props.skip_ext_task, param1, 1))
|
||||
EwinOpSkipLists(ewin, ewin->props.skip_ext_task);
|
||||
break;
|
||||
|
||||
case EWIN_OP_ZOOM:
|
||||
|
@ -1011,9 +1013,9 @@ EwinShowInfo1(const EWin * ewin)
|
|||
border->border.left, border->border.right,
|
||||
border->border.top, border->border.bottom,
|
||||
EoGetDesk(ewin),
|
||||
ewin->num_groups, ewin->docked, EoIsSticky(ewin),
|
||||
EoIsShown(ewin), ewin->iconified, ewin->shaded,
|
||||
ewin->active, EoGetLayer(ewin), ewin->never_use_area,
|
||||
ewin->num_groups, ewin->state.docked, EoIsSticky(ewin),
|
||||
EoIsShown(ewin), ewin->state.iconified, ewin->state.shaded,
|
||||
ewin->state.active, EoGetLayer(ewin), ewin->props.never_use_area,
|
||||
EoIsFloating(ewin), ewin->client.w, ewin->client.h,
|
||||
ewin->client.icon_win,
|
||||
ewin->client.icon_pmap, ewin->client.icon_mask,
|
||||
|
@ -1024,15 +1026,15 @@ EwinShowInfo1(const EWin * ewin)
|
|||
SS(ewin->icccm.wm_machine), SS(ewin->icccm.wm_icon_name),
|
||||
ewin->client.is_group_leader,
|
||||
ewin->client.no_resize_h, ewin->client.no_resize_v,
|
||||
ewin->client.shaped,
|
||||
ewin->state.shaped,
|
||||
ewin->client.width.min, ewin->client.height.min,
|
||||
ewin->client.width.max, ewin->client.height.max,
|
||||
ewin->client.base_w, ewin->client.base_h,
|
||||
ewin->client.w_inc, ewin->client.h_inc,
|
||||
ewin->client.aspect_min, ewin->client.aspect_max,
|
||||
ewin->client.mwm_decor_border, ewin->client.mwm_decor_resizeh,
|
||||
ewin->client.mwm_decor_title, ewin->client.mwm_decor_menu,
|
||||
ewin->client.mwm_decor_minimize, ewin->client.mwm_decor_maximize);
|
||||
ewin->mwm.decor_border, ewin->mwm.decor_resizeh,
|
||||
ewin->mwm.decor_title, ewin->mwm.decor_menu,
|
||||
ewin->mwm.decor_minimize, ewin->mwm.decor_maximize);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1103,23 +1105,24 @@ EwinShowInfo2(const EWin * ewin)
|
|||
ewin->client.client_leader, ewin->has_transients,
|
||||
ewin->client.transient, ewin->client.transient_for,
|
||||
ewin->client.no_resize_h, ewin->client.no_resize_v,
|
||||
ewin->client.shaped, ewin->client.base_w, ewin->client.base_h,
|
||||
ewin->state.shaped, ewin->client.base_w, ewin->client.base_h,
|
||||
ewin->client.width.min, ewin->client.height.min,
|
||||
ewin->client.width.max, ewin->client.height.max,
|
||||
ewin->client.w_inc, ewin->client.h_inc,
|
||||
ewin->client.aspect_min, ewin->client.aspect_max,
|
||||
ewin->strut.left, ewin->strut.right,
|
||||
ewin->strut.top, ewin->strut.bottom,
|
||||
ewin->client.mwm_decor_border, ewin->client.mwm_decor_resizeh,
|
||||
ewin->client.mwm_decor_title, ewin->client.mwm_decor_menu,
|
||||
ewin->client.mwm_decor_minimize, ewin->client.mwm_decor_maximize,
|
||||
ewin->mwm.decor_border, ewin->mwm.decor_resizeh,
|
||||
ewin->mwm.decor_title, ewin->mwm.decor_menu,
|
||||
ewin->mwm.decor_minimize, ewin->mwm.decor_maximize,
|
||||
ewin->client.need_input, ewin->client.take_focus,
|
||||
ewin->neverfocus, ewin->focusclick,
|
||||
ewin->never_use_area, ewin->fixedpos, EoGetDesk(ewin),
|
||||
ewin->props.never_focus, ewin->props.focusclick,
|
||||
ewin->props.never_use_area, ewin->props.fixedpos, EoGetDesk(ewin),
|
||||
EoGetLayer(ewin), ewin->o.ilayer,
|
||||
ewin->iconified, EoIsSticky(ewin), ewin->shaded,
|
||||
ewin->docked, ewin->state, EoIsShown(ewin), ewin->visibility,
|
||||
ewin->active, ewin->num_groups, ewin->ewmh.opacity
|
||||
ewin->state.iconified, EoIsSticky(ewin), ewin->state.shaded,
|
||||
ewin->state.docked, ewin->state.state, EoIsShown(ewin),
|
||||
ewin->state.visibility, ewin->state.active, ewin->num_groups,
|
||||
ewin->ewmh.opacity
|
||||
#if USE_COMPOSITE
|
||||
, EoGetOpacity(ewin), EoGetShadow(ewin)
|
||||
#endif
|
||||
|
|
|
@ -598,7 +598,7 @@ MenuCreateFromAllEWins(const char *name, MenuStyle * ms)
|
|||
lst = EwinListGetAll(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i]->skipwinlist || !EwinGetName(lst[i]))
|
||||
if (lst[i]->props.skip_winlist || !EwinGetName(lst[i]))
|
||||
continue;
|
||||
|
||||
Esnprintf(s, sizeof(s), "wop %#lx focus", lst[i]->client.win);
|
||||
|
@ -625,7 +625,7 @@ MenuCreateFromDesktopEWins(char *name, Menu * parent, MenuStyle * ms, int desk)
|
|||
lst = EwinListGetAll(&num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i]->skipwinlist || !EwinGetName(lst[i]) ||
|
||||
if (lst[i]->props.skip_winlist || !EwinGetName(lst[i]) ||
|
||||
EoGetDesk(lst[i]) != j)
|
||||
continue;
|
||||
|
||||
|
@ -659,7 +659,7 @@ MenuCreateFromDesktops(const char *name, MenuStyle * ms)
|
|||
MenuAddItem(mm, mi);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (lst[i]->skipwinlist || !EwinGetName(lst[i]) ||
|
||||
if (lst[i]->props.skip_winlist || !EwinGetName(lst[i]) ||
|
||||
EoGetDesk(lst[i]) != j)
|
||||
continue;
|
||||
|
||||
|
|
12
src/menus.c
12
src/menus.c
|
@ -190,12 +190,12 @@ MenuEwinInit(EWin * ewin, void *ptr)
|
|||
ewin->MoveResize = MenuEwinMoveResize;
|
||||
ewin->Close = MenuEwinClose;
|
||||
|
||||
ewin->skiptask = 1;
|
||||
ewin->skip_ext_pager = 1;
|
||||
ewin->no_actions = 1;
|
||||
ewin->skipfocus = 1;
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->neverfocus = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
ewin->props.skip_ext_pager = 1;
|
||||
ewin->props.no_actions = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
ewin->props.never_focus = 1;
|
||||
ewin->client.grav = StaticGravity;
|
||||
|
||||
ewin->client.width.min = ewin->client.width.max = ewin->client.w = m->w;
|
||||
|
|
|
@ -33,7 +33,7 @@ EwinShapeSet(EWin * ewin)
|
|||
{
|
||||
ewin->shape_x = EoGetX(ewin);
|
||||
ewin->shape_y = EoGetY(ewin);
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
{
|
||||
ewin->shape_w = EoGetW(ewin) -
|
||||
(ewin->border->border.left + ewin->border->border.right);
|
||||
|
@ -53,7 +53,7 @@ ActionMoveStart(EWin * ewin, int grab, char constrained, int nogroup)
|
|||
EWin **gwins;
|
||||
int i, num, dx, dy;
|
||||
|
||||
if (!ewin || ewin->fixedpos)
|
||||
if (!ewin || ewin->state.inhibit_move)
|
||||
return 0;
|
||||
|
||||
mode_moveresize_ewin = ewin;
|
||||
|
@ -259,7 +259,7 @@ ActionResizeStart(EWin * ewin, int grab, int hv)
|
|||
{
|
||||
int x, y, w, h, ww, hh;
|
||||
|
||||
if (!ewin || ewin->shaded)
|
||||
if (!ewin || ewin->state.inhibit_resize)
|
||||
return 0;
|
||||
|
||||
mode_moveresize_ewin = ewin;
|
||||
|
|
89
src/mwm.c
89
src/mwm.c
|
@ -85,17 +85,18 @@ MWM_GetHints(EWin * ewin, Atom atom_change)
|
|||
if (atom_change && atom_change != _MOTIF_WM_HINTS)
|
||||
return;
|
||||
|
||||
ewin->client.mwm_decor_border = 1;
|
||||
ewin->client.mwm_decor_resizeh = 1;
|
||||
ewin->client.mwm_decor_title = 1;
|
||||
ewin->client.mwm_decor_menu = 1;
|
||||
ewin->client.mwm_decor_minimize = 1;
|
||||
ewin->client.mwm_decor_maximize = 1;
|
||||
ewin->client.mwm_func_resize = 1;
|
||||
ewin->client.mwm_func_move = 1;
|
||||
ewin->client.mwm_func_minimize = 1;
|
||||
ewin->client.mwm_func_maximize = 1;
|
||||
ewin->client.mwm_func_close = 1;
|
||||
ewin->mwm.valid = 1;
|
||||
ewin->mwm.decor_border = 1;
|
||||
ewin->mwm.decor_resizeh = 1;
|
||||
ewin->mwm.decor_title = 1;
|
||||
ewin->mwm.decor_menu = 1;
|
||||
ewin->mwm.decor_minimize = 1;
|
||||
ewin->mwm.decor_maximize = 1;
|
||||
ewin->mwm.func_resize = 1;
|
||||
ewin->mwm.func_move = 1;
|
||||
ewin->mwm.func_minimize = 1;
|
||||
ewin->mwm.func_maximize = 1;
|
||||
ewin->mwm.func_close = 1;
|
||||
|
||||
puc = NULL;
|
||||
XGetWindowProperty(disp, ewin->client.win, _MOTIF_WM_HINTS, 0, 20,
|
||||
|
@ -109,60 +110,60 @@ MWM_GetHints(EWin * ewin, Atom atom_change)
|
|||
|
||||
if (mwmhints->flags & MWM_HINTS_DECORATIONS)
|
||||
{
|
||||
ewin->client.mwm_decor_border = 0;
|
||||
ewin->client.mwm_decor_resizeh = 0;
|
||||
ewin->client.mwm_decor_title = 0;
|
||||
ewin->client.mwm_decor_menu = 0;
|
||||
ewin->client.mwm_decor_minimize = 0;
|
||||
ewin->client.mwm_decor_maximize = 0;
|
||||
ewin->mwm.decor_border = 0;
|
||||
ewin->mwm.decor_resizeh = 0;
|
||||
ewin->mwm.decor_title = 0;
|
||||
ewin->mwm.decor_menu = 0;
|
||||
ewin->mwm.decor_minimize = 0;
|
||||
ewin->mwm.decor_maximize = 0;
|
||||
if (mwmhints->decorations & MWM_DECOR_ALL)
|
||||
{
|
||||
ewin->client.mwm_decor_border = 1;
|
||||
ewin->client.mwm_decor_resizeh = 1;
|
||||
ewin->client.mwm_decor_title = 1;
|
||||
ewin->client.mwm_decor_menu = 1;
|
||||
ewin->client.mwm_decor_minimize = 1;
|
||||
ewin->client.mwm_decor_maximize = 1;
|
||||
ewin->mwm.decor_border = 1;
|
||||
ewin->mwm.decor_resizeh = 1;
|
||||
ewin->mwm.decor_title = 1;
|
||||
ewin->mwm.decor_menu = 1;
|
||||
ewin->mwm.decor_minimize = 1;
|
||||
ewin->mwm.decor_maximize = 1;
|
||||
}
|
||||
if (mwmhints->decorations & MWM_DECOR_BORDER)
|
||||
ewin->client.mwm_decor_border = 1;
|
||||
ewin->mwm.decor_border = 1;
|
||||
if (mwmhints->decorations & MWM_DECOR_RESIZEH)
|
||||
ewin->client.mwm_decor_resizeh = 1;
|
||||
ewin->mwm.decor_resizeh = 1;
|
||||
if (mwmhints->decorations & MWM_DECOR_TITLE)
|
||||
ewin->client.mwm_decor_title = 1;
|
||||
ewin->mwm.decor_title = 1;
|
||||
if (mwmhints->decorations & MWM_DECOR_MENU)
|
||||
ewin->client.mwm_decor_menu = 1;
|
||||
ewin->mwm.decor_menu = 1;
|
||||
if (mwmhints->decorations & MWM_DECOR_MINIMIZE)
|
||||
ewin->client.mwm_decor_minimize = 1;
|
||||
ewin->mwm.decor_minimize = 1;
|
||||
if (mwmhints->decorations & MWM_DECOR_MAXIMIZE)
|
||||
ewin->client.mwm_decor_maximize = 1;
|
||||
ewin->mwm.decor_maximize = 1;
|
||||
}
|
||||
|
||||
if (mwmhints->flags & MWM_HINTS_FUNCTIONS)
|
||||
{
|
||||
ewin->client.mwm_func_resize = 0;
|
||||
ewin->client.mwm_func_move = 0;
|
||||
ewin->client.mwm_func_minimize = 0;
|
||||
ewin->client.mwm_func_maximize = 0;
|
||||
ewin->client.mwm_func_close = 0;
|
||||
ewin->mwm.func_resize = 0;
|
||||
ewin->mwm.func_move = 0;
|
||||
ewin->mwm.func_minimize = 0;
|
||||
ewin->mwm.func_maximize = 0;
|
||||
ewin->mwm.func_close = 0;
|
||||
if (mwmhints->functions & MWM_FUNC_ALL)
|
||||
{
|
||||
ewin->client.mwm_func_resize = 1;
|
||||
ewin->client.mwm_func_move = 1;
|
||||
ewin->client.mwm_func_minimize = 1;
|
||||
ewin->client.mwm_func_maximize = 1;
|
||||
ewin->client.mwm_func_close = 1;
|
||||
ewin->mwm.func_resize = 1;
|
||||
ewin->mwm.func_move = 1;
|
||||
ewin->mwm.func_minimize = 1;
|
||||
ewin->mwm.func_maximize = 1;
|
||||
ewin->mwm.func_close = 1;
|
||||
}
|
||||
if (mwmhints->functions & MWM_FUNC_RESIZE)
|
||||
ewin->client.mwm_func_resize = 1;
|
||||
ewin->mwm.func_resize = 1;
|
||||
if (mwmhints->functions & MWM_FUNC_MOVE)
|
||||
ewin->client.mwm_func_move = 1;
|
||||
ewin->mwm.func_move = 1;
|
||||
if (mwmhints->functions & MWM_FUNC_MINIMIZE)
|
||||
ewin->client.mwm_func_minimize = 1;
|
||||
ewin->mwm.func_minimize = 1;
|
||||
if (mwmhints->functions & MWM_FUNC_MAXIMIZE)
|
||||
ewin->client.mwm_func_maximize = 1;
|
||||
ewin->mwm.func_maximize = 1;
|
||||
if (mwmhints->functions & MWM_FUNC_CLOSE)
|
||||
ewin->client.mwm_func_close = 1;
|
||||
ewin->mwm.func_close = 1;
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
24
src/pager.c
24
src/pager.c
|
@ -178,7 +178,7 @@ PagerUpdateTimeout(int val __UNUSED__, void *data)
|
|||
return;
|
||||
if (p->desktop != DesksGetCurrent())
|
||||
return;
|
||||
if (ewin->visibility == VisibilityFullyObscured)
|
||||
if (ewin->state.visibility == VisibilityFullyObscured)
|
||||
return;
|
||||
|
||||
if (Conf.pagers.scanspeed > 0)
|
||||
|
@ -573,11 +573,11 @@ PagerEwinInit(EWin * ewin, void *ptr)
|
|||
ewin->MoveResize = PagerEwinMoveResize;
|
||||
ewin->Close = PagerEwinClose;
|
||||
|
||||
ewin->skiptask = 1;
|
||||
ewin->skip_ext_pager = 1;
|
||||
ewin->skipfocus = 1;
|
||||
ewin->skipwinlist = 1;
|
||||
ewin->neverfocus = 1;
|
||||
ewin->props.skip_ext_task = 1;
|
||||
ewin->props.skip_ext_pager = 1;
|
||||
ewin->props.skip_focuslist = 1;
|
||||
ewin->props.skip_winlist = 1;
|
||||
ewin->props.never_focus = 1;
|
||||
ewin->props.autosave = 1;
|
||||
|
||||
EoSetSticky(ewin, 1);
|
||||
|
@ -619,7 +619,7 @@ PagerShow(Pager * p)
|
|||
h = ewin->client.h;
|
||||
|
||||
MoveEwinToDesktop(ewin, EoGetDesk(ewin));
|
||||
if (ewin->client.already_placed)
|
||||
if (ewin->state.placed)
|
||||
{
|
||||
MoveResizeEwin(ewin, EoGetX(ewin), EoGetY(ewin), w, h);
|
||||
}
|
||||
|
@ -781,7 +781,7 @@ PagersUpdateEwin(EWin * ewin, int gone)
|
|||
if (!Conf.pagers.enable)
|
||||
return;
|
||||
|
||||
if (!gone && (!EoIsShown(ewin) || ewin->st.animated))
|
||||
if (!gone && (!EoIsShown(ewin) || ewin->state.animated))
|
||||
return;
|
||||
|
||||
desk = (EoIsFloating(ewin)) ? DesksGetCurrent() : EoGetDesk(ewin);
|
||||
|
@ -1506,7 +1506,7 @@ EwinGroupMove(EWin * ewin, int desk, int x, int y)
|
|||
ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, Mode.nogroup, &num);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (gwins[i]->type == EWIN_TYPE_PAGER || gwins[i]->fixedpos)
|
||||
if (gwins[i]->type == EWIN_TYPE_PAGER)
|
||||
continue;
|
||||
|
||||
if (newdesk)
|
||||
|
@ -1564,7 +1564,7 @@ PagerEventMotion(Pager * p, XEvent * ev)
|
|||
case MODE_PAGER_DRAG:
|
||||
Mode.mode = MODE_PAGER_DRAG;
|
||||
ewin = PagerHiwinEwin(1);
|
||||
if (!ewin || (ewin->type == EWIN_TYPE_PAGER) || (ewin->fixedpos))
|
||||
if (!ewin || ewin->type == EWIN_TYPE_PAGER)
|
||||
{
|
||||
Mode.mode = MODE_NONE;
|
||||
break;
|
||||
|
@ -1665,10 +1665,6 @@ PagerEventMouseUp(Pager * p, XEvent * ev)
|
|||
{
|
||||
/* Pointer is in iconbox */
|
||||
|
||||
/* Don't iconify an iconbox by dragging */
|
||||
if (ewin->props.inhibit_iconify)
|
||||
break;
|
||||
|
||||
/* Iconify after moving back to pre-drag position */
|
||||
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE,
|
||||
Mode.nogroup, &num);
|
||||
|
|
|
@ -104,8 +104,8 @@ SaveWindowStates(void)
|
|||
}
|
||||
fprintf(f, "[CLIENT] %i %i %i %i %i %i %i %i %i\n",
|
||||
EoGetX(ewin) + x, EoGetY(ewin) + y, ewin->client.w,
|
||||
ewin->client.h, EoGetDesk(ewin), ewin->iconified,
|
||||
ewin->shaded, EoIsSticky(ewin), EoGetLayer(ewin));
|
||||
ewin->client.h, EoGetDesk(ewin), ewin->state.iconified,
|
||||
ewin->state.shaded, EoIsSticky(ewin), EoGetLayer(ewin));
|
||||
if (ewin->session_id)
|
||||
fprintf(f, " [SESSION_ID] %s\n", ewin->session_id);
|
||||
if (ewin->icccm.wm_res_name)
|
||||
|
@ -265,15 +265,15 @@ MatchEwinToSM(EWin * ewin)
|
|||
}
|
||||
|
||||
matches[i].used = 1;
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
ewin->client.start_iconified = matches[i].iconified;
|
||||
EoSetSticky(ewin, matches[i].sticky);
|
||||
ewin->shaded = matches[i].shaded;
|
||||
ewin->state.shaded = matches[i].shaded;
|
||||
EoSetLayer(ewin, matches[i].layer);
|
||||
if (!EoIsSticky(ewin))
|
||||
EoSetDesk(ewin, matches[i].desktop);
|
||||
/* if it's NOT (X11R6 and already placed by the client) */
|
||||
if (!((ewin->client.already_placed) && (ewin->session_id)))
|
||||
if (!((ewin->state.placed) && (ewin->session_id)))
|
||||
{
|
||||
DeskGetArea(EoGetDesk(ewin), &ax, &ay);
|
||||
ewin->client.x = matches[i].x - (ax * VRoot.w);
|
||||
|
|
18
src/size.c
18
src/size.c
|
@ -48,8 +48,8 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
ewin->ly = EoGetY(ewin);
|
||||
ewin->lw = ewin->client.w;
|
||||
ewin->lh = ewin->client.h;
|
||||
ewin->st.maximized_horz = 0;
|
||||
ewin->st.maximized_vert = 0;
|
||||
ewin->state.maximized_horz = 0;
|
||||
ewin->state.maximized_vert = 0;
|
||||
ewin->toggle = 0;
|
||||
goto done;
|
||||
}
|
||||
|
@ -113,10 +113,11 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
{
|
||||
pe = lst[i];
|
||||
if (pe == ewin ||
|
||||
pe->iconified || EoIsFloating(pe) || pe->ignorearrange ||
|
||||
pe->state.iconified || EoIsFloating(pe) ||
|
||||
pe->props.ignorearrange ||
|
||||
(EoGetDesk(ewin) != EoGetDesk(pe) && !EoIsSticky(pe)) ||
|
||||
(pe->type & (EWIN_TYPE_DIALOG | EWIN_TYPE_MENU)) ||
|
||||
(type == MAX_AVAILABLE && !pe->never_use_area) ||
|
||||
(type == MAX_AVAILABLE && !pe->props.never_use_area) ||
|
||||
!SPANS_COMMON(x, w, EoGetX(pe), EoGetW(pe)))
|
||||
continue;
|
||||
|
||||
|
@ -130,7 +131,7 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
h = y2 - y1 - (ewin->border->border.top +
|
||||
ewin->border->border.bottom);
|
||||
|
||||
ewin->st.maximized_vert = 1;
|
||||
ewin->state.maximized_vert = 1;
|
||||
}
|
||||
|
||||
if (direction & MAX_HOR)
|
||||
|
@ -139,10 +140,11 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
{
|
||||
pe = lst[i];
|
||||
if (pe == ewin ||
|
||||
pe->iconified || EoIsFloating(pe) || pe->ignorearrange ||
|
||||
pe->state.iconified || EoIsFloating(pe) ||
|
||||
pe->props.ignorearrange ||
|
||||
(EoGetDesk(ewin) != EoGetDesk(pe) && !EoIsSticky(pe)) ||
|
||||
(pe->type & (EWIN_TYPE_DIALOG | EWIN_TYPE_MENU)) ||
|
||||
(type == MAX_AVAILABLE && !pe->never_use_area) ||
|
||||
(type == MAX_AVAILABLE && !pe->props.never_use_area) ||
|
||||
!SPANS_COMMON(y, h, EoGetY(pe), EoGetH(pe)))
|
||||
continue;
|
||||
|
||||
|
@ -156,7 +158,7 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
|
|||
w = x2 - x1 - (ewin->border->border.left +
|
||||
ewin->border->border.right);
|
||||
|
||||
ewin->st.maximized_horz = 1;
|
||||
ewin->state.maximized_horz = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
22
src/snaps.c
22
src/snaps.c
|
@ -256,21 +256,21 @@ SnapEwinSticky(Snapshot * sn, EWin * ewin)
|
|||
static void
|
||||
SnapEwinShade(Snapshot * sn, EWin * ewin)
|
||||
{
|
||||
sn->shaded = ewin->shaded;
|
||||
sn->shaded = ewin->state.shaded;
|
||||
}
|
||||
|
||||
static void
|
||||
SnapEwinSkipLists(Snapshot * sn, EWin * ewin)
|
||||
{
|
||||
sn->skiptask = ewin->skiptask;
|
||||
sn->skipwinlist = ewin->skipwinlist;
|
||||
sn->skipfocus = ewin->skipfocus;
|
||||
sn->skiptask = ewin->props.skip_ext_task;
|
||||
sn->skipwinlist = ewin->props.skip_winlist;
|
||||
sn->skipfocus = ewin->props.skip_focuslist;
|
||||
}
|
||||
|
||||
static void
|
||||
SnapEwinNeverFocus(Snapshot * sn, EWin * ewin)
|
||||
{
|
||||
sn->neverfocus = ewin->neverfocus;
|
||||
sn->neverfocus = ewin->props.never_focus;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1401,7 +1401,7 @@ SnapshotEwinMatch(EWin * ewin)
|
|||
|
||||
if (sn->use_flags & SNAP_USE_POS)
|
||||
{
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
ewin->client.x = sn->x;
|
||||
ewin->client.y = sn->y;
|
||||
ewin->client.grav = NorthWestGravity;
|
||||
|
@ -1424,16 +1424,16 @@ SnapshotEwinMatch(EWin * ewin)
|
|||
|
||||
if (sn->use_flags & SNAP_USE_SKIP_LISTS)
|
||||
{
|
||||
ewin->skipfocus = sn->skipfocus;
|
||||
ewin->skiptask = sn->skiptask;
|
||||
ewin->skipwinlist = sn->skipwinlist;
|
||||
ewin->props.skip_focuslist = sn->skipfocus;
|
||||
ewin->props.skip_ext_task = sn->skiptask;
|
||||
ewin->props.skip_winlist = sn->skipwinlist;
|
||||
}
|
||||
|
||||
if (sn->use_flags & SNAP_USE_FOCUS_NEVER)
|
||||
ewin->neverfocus = sn->neverfocus;
|
||||
ewin->props.never_focus = sn->neverfocus;
|
||||
|
||||
if (sn->use_flags & SNAP_USE_SHADED)
|
||||
ewin->shaded = sn->shaded;
|
||||
ewin->state.shaded = sn->shaded;
|
||||
|
||||
if (sn->use_flags & SNAP_USE_BORDER)
|
||||
EwinSetBorderByName(ewin, sn->border_name);
|
||||
|
|
21
src/warp.c
21
src/warp.c
|
@ -103,9 +103,9 @@ WarpFocusShow(EWin * ewin)
|
|||
wl = warplist + i;
|
||||
wl->win = ECreateWindow(warpFocusWindow->win, 0, 0, 1, 1, 0);
|
||||
EMapWindow(wl->win);
|
||||
if (wl->ewin->iconified)
|
||||
if (wl->ewin->state.iconified)
|
||||
fmt = "[%s]";
|
||||
else if (wl->ewin->shaded)
|
||||
else if (wl->ewin->state.shaded)
|
||||
fmt = "=%s=";
|
||||
else
|
||||
fmt = "%s";
|
||||
|
@ -245,15 +245,16 @@ WarpFocus(int delta)
|
|||
{
|
||||
ewin = lst[i];
|
||||
if ( /* Either visible or iconified */
|
||||
((EwinIsOnScreen(ewin)) || (ewin->iconified)) &&
|
||||
((EwinIsOnScreen(ewin)) || (ewin->state.iconified)) &&
|
||||
/* Exclude windows that explicitely say so */
|
||||
(!ewin->skipfocus) &&
|
||||
(!ewin->props.skip_focuslist) &&
|
||||
(!ewin->state.inhibit_focus) &&
|
||||
/* Keep shaded windows if conf say so */
|
||||
((!ewin->shaded) || (Conf.warplist.showshaded)) &&
|
||||
((!ewin->state.shaded) || (Conf.warplist.showshaded)) &&
|
||||
/* Keep sticky windows if conf say so */
|
||||
((!EoIsSticky(ewin)) || (Conf.warplist.showsticky)) &&
|
||||
/* Keep iconified windows if conf say so */
|
||||
((!ewin->iconified) || (Conf.warplist.showiconified)))
|
||||
((!ewin->state.iconified) || (Conf.warplist.showiconified)))
|
||||
{
|
||||
warplist_num++;
|
||||
warplist = Erealloc(warplist,
|
||||
|
@ -286,7 +287,7 @@ WarpFocus(int delta)
|
|||
if (Conf.focus.raise_on_next)
|
||||
RaiseEwin(ewin);
|
||||
if (Conf.focus.warp_on_next)
|
||||
if (ewin != Mode.mouse_over_ewin && !ewin->iconified)
|
||||
if (ewin != Mode.mouse_over_ewin && !ewin->state.iconified)
|
||||
XWarpPointer(disp, None, EoGetWin(ewin), 0, 0, 0, 0,
|
||||
EoGetW(ewin) / 2, EoGetH(ewin) / 2);
|
||||
if (Conf.warplist.warpfocused)
|
||||
|
@ -307,7 +308,7 @@ WarpFocusClick(int ix)
|
|||
return;
|
||||
|
||||
RaiseEwin(ewin);
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
EwinDeIconify(ewin);
|
||||
FocusToEWin(ewin, FOCUS_SET);
|
||||
}
|
||||
|
@ -324,9 +325,9 @@ WarpFocusFinish(void)
|
|||
if (!FindItem((char *)ewin, 0, LIST_FINDBY_POINTER, LIST_TYPE_EWIN))
|
||||
return;
|
||||
|
||||
if (ewin->iconified)
|
||||
if (ewin->state.iconified)
|
||||
EwinDeIconify(ewin);
|
||||
if (ewin->shaded)
|
||||
if (ewin->state.shaded)
|
||||
EwinUnShade(ewin);
|
||||
if (Conf.warplist.raise_on_select)
|
||||
RaiseEwin(ewin);
|
||||
|
|
|
@ -562,7 +562,7 @@ WindowMatchTest(const EWin * ewin, const WindowMatch * wm)
|
|||
break;
|
||||
|
||||
case MATCH_PROP_SHAPED:
|
||||
match = ewin->client.shaped;
|
||||
match = ewin->state.shaped;
|
||||
break;
|
||||
|
||||
case MATCH_PROP_FIXEDSIZE:
|
||||
|
@ -670,7 +670,7 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args)
|
|||
break;
|
||||
|
||||
case EWIN_OP_SHADE:
|
||||
WINOP_GET_BOOL(ewin->shaded, args);
|
||||
WINOP_GET_BOOL(ewin->state.shaded, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_STICK:
|
||||
|
@ -678,32 +678,33 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args)
|
|||
break;
|
||||
|
||||
case EWIN_OP_FIXED_POS:
|
||||
WINOP_GET_BOOL(ewin->fixedpos, args);
|
||||
WINOP_GET_BOOL(ewin->props.fixedpos, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NEVER_USE_AREA:
|
||||
WINOP_GET_BOOL(ewin->never_use_area, args);
|
||||
WINOP_GET_BOOL(ewin->props.never_use_area, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_CLICK:
|
||||
WINOP_GET_BOOL(ewin->focusclick, args);
|
||||
WINOP_GET_BOOL(ewin->props.focusclick, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FOCUS_NEVER:
|
||||
WINOP_GET_BOOL(ewin->neverfocus, args);
|
||||
WINOP_GET_BOOL(ewin->props.never_focus, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_NO_BUTTON_GRABS:
|
||||
WINOP_GET_BOOL(ewin->no_button_grabs, args);
|
||||
WINOP_GET_BOOL(ewin->props.no_button_grabs, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_FULLSCREEN:
|
||||
WINOP_GET_BOOL(ewin->st.fullscreen, args);
|
||||
WINOP_GET_BOOL(ewin->state.fullscreen, args);
|
||||
break;
|
||||
|
||||
case EWIN_OP_SKIP_LISTS:
|
||||
WINOP_GET_BOOL(ewin->skipwinlist, args);
|
||||
ewin->skipfocus = ewin->skiptask = ewin->skipwinlist;
|
||||
WINOP_GET_BOOL(ewin->props.skip_winlist, args);
|
||||
ewin->props.skip_focuslist = ewin->props.skip_ext_task =
|
||||
ewin->props.skip_winlist;
|
||||
break;
|
||||
|
||||
case EWIN_OP_OPACITY:
|
||||
|
@ -743,7 +744,7 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char *args)
|
|||
break;
|
||||
ewin->client.x = a;
|
||||
ewin->client.y = b;
|
||||
ewin->client.already_placed = 1;
|
||||
ewin->state.placed = 1;
|
||||
break;
|
||||
|
||||
case EWIN_OP_SIZE:
|
||||
|
|
Loading…
Reference in New Issue