Fix geometry indicator during non-opaque resizing.
Yet another partial cleanup of client window property/state stuff. SVN revision: 17466
This commit is contained in:
parent
d298bab4c7
commit
9e9c8769b7
12
src/E.h
12
src/E.h
|
@ -1297,6 +1297,18 @@ void ICCCM_DeIconify(const EWin * ewin);
|
|||
void ICCCM_SizeMatch(const EWin * ewin, int wi, int hi, int *pwo,
|
||||
int *pho);
|
||||
void ICCCM_MatchSize(EWin * ewin);
|
||||
void ICCCM_GetIncrementalSize(EWin * ewin, unsigned int w,
|
||||
unsigned int h, unsigned int *wi,
|
||||
unsigned int *hi);
|
||||
void ICCCM_SetSizeConstraints(EWin * ewin, unsigned int wmin,
|
||||
unsigned int hmin,
|
||||
unsigned int wmax,
|
||||
unsigned int hmax,
|
||||
unsigned int wbase,
|
||||
unsigned int hbase,
|
||||
unsigned int winc,
|
||||
unsigned int hinc, double amin,
|
||||
double amax);
|
||||
void ICCCM_Configure(const EWin * ewin);
|
||||
void ICCCM_AdoptStart(const EWin * ewin);
|
||||
void ICCCM_Adopt(const EWin * ewin);
|
||||
|
|
|
@ -37,7 +37,8 @@ CoordsShow(EWin * ewin)
|
|||
ImageClass *ic;
|
||||
char s[256];
|
||||
int md;
|
||||
int x, y, w, h;
|
||||
int x, y;
|
||||
unsigned int w, h;
|
||||
int cx, cy, cw, ch;
|
||||
EObj *eo = coord_eo;
|
||||
Imlib_Border *pad;
|
||||
|
@ -56,8 +57,7 @@ CoordsShow(EWin * ewin)
|
|||
|
||||
x = ewin->shape_x;
|
||||
y = ewin->shape_y;
|
||||
w = (ewin->client.w - ewin->client.base_w) / ewin->client.w_inc;
|
||||
h = (ewin->client.h - ewin->client.base_h) / ewin->client.h_inc;
|
||||
ICCCM_GetIncrementalSize(ewin, ewin->shape_w, ewin->shape_h, &w, &h);
|
||||
|
||||
Esnprintf(s, sizeof(s), "%i x %i (%i, %i)", w, h, x, y);
|
||||
TextSize(tc, 0, 0, 0, s, &cw, &ch, 17);
|
||||
|
@ -70,7 +70,7 @@ CoordsShow(EWin * ewin)
|
|||
else
|
||||
md = Conf.movres.mode_resize;
|
||||
|
||||
if ((md == 0) || ((cw < ewin->client.w) && (ch < ewin->client.h)))
|
||||
if ((md == 0) || ((cw < ewin->shape_w - 2) && (ch < ewin->shape_h - 2)))
|
||||
{
|
||||
if (Conf.movres.mode_info == 1)
|
||||
{
|
||||
|
|
|
@ -535,9 +535,8 @@ DialogEwinInit(EWin * ewin, void *ptr)
|
|||
ewin->MoveResize = DialogEwinMoveResize;
|
||||
ewin->Close = DialogEwinClose;
|
||||
|
||||
ewin->client.width.min = ewin->client.width.max = ewin->client.w = d->w;
|
||||
ewin->client.height.min = ewin->client.height.max = ewin->client.h = d->h;
|
||||
ewin->client.no_resize_h = ewin->client.no_resize_v = 1;
|
||||
ICCCM_SetSizeConstraints(ewin, d->w, d->h, d->w, d->h, 0, 0, 1, 1,
|
||||
0.0, 65535.0);
|
||||
|
||||
EoSetLayer(ewin, 10);
|
||||
}
|
||||
|
|
|
@ -671,10 +671,10 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
if ((Mode.mode == MODE_RESIZE) || (Mode.mode == MODE_RESIZE_H)
|
||||
|| (Mode.mode == MODE_RESIZE_V))
|
||||
{
|
||||
i = (x - ewin->shape_x) / ewin->client.w_inc;
|
||||
j = (y - ewin->shape_y) / ewin->client.h_inc;
|
||||
x = ewin->shape_x + (i * ewin->client.w_inc);
|
||||
y = ewin->shape_y + (j * ewin->client.h_inc);
|
||||
i = (x - ewin->shape_x) / ewin->icccm.w_inc;
|
||||
j = (y - ewin->shape_y) / ewin->icccm.h_inc;
|
||||
x = ewin->shape_x + (i * ewin->icccm.w_inc);
|
||||
y = ewin->shape_y + (j * ewin->icccm.h_inc);
|
||||
}
|
||||
|
||||
dx = EoGetX(EoGetDesk(ewin));
|
||||
|
|
26
src/ewins.c
26
src/ewins.c
|
@ -95,17 +95,27 @@ EwinCreate(Window win, int type)
|
|||
ewin->ly = -1;
|
||||
ewin->lw = -1;
|
||||
ewin->lh = -1;
|
||||
|
||||
ewin->client.x = -1;
|
||||
ewin->client.y = -1;
|
||||
ewin->client.w = -1;
|
||||
ewin->client.h = -1;
|
||||
ewin->client.grav = NorthWestGravity;
|
||||
|
||||
ewin->icccm.need_input = 1;
|
||||
ewin->client.aspect_min = 0.0;
|
||||
ewin->client.aspect_max = 65535.0;
|
||||
ewin->client.w_inc = 1;
|
||||
ewin->client.h_inc = 1;
|
||||
ewin->client.width.max = 65535;
|
||||
ewin->client.height.max = 65535;
|
||||
|
||||
ewin->icccm.width.min = 0;
|
||||
ewin->icccm.height.min = 0;
|
||||
ewin->icccm.width.max = 65535;
|
||||
ewin->icccm.height.max = 65535;
|
||||
ewin->icccm.base_w = 0;
|
||||
ewin->icccm.base_h = 0;
|
||||
ewin->icccm.w_inc = 1;
|
||||
ewin->icccm.h_inc = 1;
|
||||
ewin->icccm.aspect_min = 0.0;
|
||||
ewin->icccm.aspect_max = 65535.0;
|
||||
ewin->icccm.grav = NorthWestGravity;
|
||||
|
||||
#if 0 /* ENABLE_GNOME - Not actually used */
|
||||
ewin->expanded_width = -1;
|
||||
ewin->expanded_height = -1;
|
||||
|
@ -532,9 +542,9 @@ EwinStateUpdate(EWin * ewin)
|
|||
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->props.no_resize_h || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_max_ver =
|
||||
ewin->client.no_resize_v || ewin->state.fullscreen;
|
||||
ewin->props.no_resize_v || ewin->state.fullscreen;
|
||||
ewin->state.inhibit_fullscreeen =
|
||||
ewin->state.inhibit_move || ewin->state.inhibit_resize;
|
||||
ewin->state.inhibit_change_desk = 0;
|
||||
|
|
17
src/ewins.h
17
src/ewins.h
|
@ -50,14 +50,8 @@ struct _ewin
|
|||
{
|
||||
Window win;
|
||||
int x, y, w, h, bw;
|
||||
Colormap cmap;
|
||||
char no_resize_h;
|
||||
char no_resize_v;
|
||||
Constraints width, height;
|
||||
int base_w, base_h;
|
||||
int w_inc, h_inc;
|
||||
int grav;
|
||||
double aspect_min, aspect_max;
|
||||
Colormap cmap;
|
||||
long event_mask;
|
||||
} client;
|
||||
|
||||
|
@ -113,6 +107,8 @@ struct _ewin
|
|||
char never_focus; /* Never focus */
|
||||
char no_button_grabs;
|
||||
char no_actions;
|
||||
unsigned no_resize_h:1;
|
||||
unsigned no_resize_v:1;
|
||||
unsigned donthide:1; /* Don't hide on show desktop */
|
||||
unsigned vroot:1; /* Virtual root window */
|
||||
unsigned autosave:1;
|
||||
|
@ -145,6 +141,13 @@ struct _ewin
|
|||
/* WM_CLIENT_LEADER */
|
||||
Window client_leader;
|
||||
|
||||
/* WM_NORMAL_HINTS */
|
||||
Constraints width, height;
|
||||
int base_w, base_h;
|
||||
int w_inc, h_inc;
|
||||
int grav;
|
||||
double aspect_min, aspect_max;
|
||||
|
||||
char is_group_leader;
|
||||
} icccm;
|
||||
struct
|
||||
|
|
168
src/icccm.c
168
src/icccm.c
|
@ -165,49 +165,49 @@ ICCCM_SizeMatch(const EWin * ewin, int wi, int hi, int *pwo, int *pho)
|
|||
w = wi;
|
||||
h = hi;
|
||||
|
||||
if (w < ewin->client.width.min)
|
||||
w = ewin->client.width.min;
|
||||
if (w > ewin->client.width.max)
|
||||
w = ewin->client.width.max;
|
||||
if (h < ewin->client.height.min)
|
||||
h = ewin->client.height.min;
|
||||
if (h > ewin->client.height.max)
|
||||
h = ewin->client.height.max;
|
||||
if (w < ewin->icccm.width.min)
|
||||
w = ewin->icccm.width.min;
|
||||
if (w > ewin->icccm.width.max)
|
||||
w = ewin->icccm.width.max;
|
||||
if (h < ewin->icccm.height.min)
|
||||
h = ewin->icccm.height.min;
|
||||
if (h > ewin->icccm.height.max)
|
||||
h = ewin->icccm.height.max;
|
||||
if ((w > 0) && (h > 0))
|
||||
{
|
||||
w -= ewin->client.base_w;
|
||||
h -= ewin->client.base_h;
|
||||
w -= ewin->icccm.base_w;
|
||||
h -= ewin->icccm.base_h;
|
||||
if ((w > 0) && (h > 0))
|
||||
{
|
||||
aspect = ((double)w) / ((double)h);
|
||||
if (Mode.mode == MODE_RESIZE_H)
|
||||
{
|
||||
if (aspect < ewin->client.aspect_min)
|
||||
h = (int)((double)w / ewin->client.aspect_min);
|
||||
if (aspect > ewin->client.aspect_max)
|
||||
h = (int)((double)w / ewin->client.aspect_max);
|
||||
if (aspect < ewin->icccm.aspect_min)
|
||||
h = (int)((double)w / ewin->icccm.aspect_min);
|
||||
if (aspect > ewin->icccm.aspect_max)
|
||||
h = (int)((double)w / ewin->icccm.aspect_max);
|
||||
}
|
||||
else if (Mode.mode == MODE_RESIZE_V)
|
||||
{
|
||||
if (aspect < ewin->client.aspect_min)
|
||||
w = (int)((double)h * ewin->client.aspect_min);
|
||||
if (aspect > ewin->client.aspect_max)
|
||||
w = (int)((double)h * ewin->client.aspect_max);
|
||||
if (aspect < ewin->icccm.aspect_min)
|
||||
w = (int)((double)h * ewin->icccm.aspect_min);
|
||||
if (aspect > ewin->icccm.aspect_max)
|
||||
w = (int)((double)h * ewin->icccm.aspect_max);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aspect < ewin->client.aspect_min)
|
||||
w = (int)((double)h * ewin->client.aspect_min);
|
||||
if (aspect > ewin->client.aspect_max)
|
||||
h = (int)((double)w / ewin->client.aspect_max);
|
||||
if (aspect < ewin->icccm.aspect_min)
|
||||
w = (int)((double)h * ewin->icccm.aspect_min);
|
||||
if (aspect > ewin->icccm.aspect_max)
|
||||
h = (int)((double)w / ewin->icccm.aspect_max);
|
||||
}
|
||||
i = w / ewin->client.w_inc;
|
||||
j = h / ewin->client.h_inc;
|
||||
w = i * ewin->client.w_inc;
|
||||
h = j * ewin->client.h_inc;
|
||||
i = w / ewin->icccm.w_inc;
|
||||
j = h / ewin->icccm.h_inc;
|
||||
w = i * ewin->icccm.w_inc;
|
||||
h = j * ewin->icccm.h_inc;
|
||||
}
|
||||
w += ewin->client.base_w;
|
||||
h += ewin->client.base_h;
|
||||
w += ewin->icccm.base_w;
|
||||
h += ewin->icccm.base_h;
|
||||
}
|
||||
|
||||
*pwo = w;
|
||||
|
@ -221,6 +221,40 @@ ICCCM_MatchSize(EWin * ewin)
|
|||
&ewin->client.h);
|
||||
}
|
||||
|
||||
void
|
||||
ICCCM_GetIncrementalSize(EWin * ewin, unsigned int w, unsigned int h,
|
||||
unsigned int *wi, unsigned int *hi)
|
||||
{
|
||||
*wi = (w - ewin->icccm.base_w) / ewin->icccm.w_inc;
|
||||
*hi = (h - ewin->icccm.base_h) / ewin->icccm.h_inc;
|
||||
}
|
||||
|
||||
void
|
||||
ICCCM_SetSizeConstraints(EWin * ewin, unsigned int wmin, unsigned int hmin,
|
||||
unsigned int wmax, unsigned int hmax,
|
||||
unsigned int wbase, unsigned int hbase,
|
||||
unsigned int winc, unsigned int hinc,
|
||||
double amin, double amax)
|
||||
{
|
||||
ewin->icccm.width.min = wmin;
|
||||
ewin->icccm.height.min = hmin;
|
||||
ewin->icccm.width.max = wmax;
|
||||
ewin->icccm.height.max = hmax;
|
||||
|
||||
ewin->icccm.base_w = wbase;
|
||||
ewin->icccm.base_h = hbase;
|
||||
ewin->icccm.w_inc = winc;
|
||||
ewin->icccm.h_inc = hinc;
|
||||
|
||||
ewin->icccm.aspect_min = amin;
|
||||
ewin->icccm.aspect_max = amax;
|
||||
|
||||
ewin->props.no_resize_h = (wmin == wmax);
|
||||
ewin->props.no_resize_v = (hmin == hmax);
|
||||
|
||||
ewin->icccm.grav = NorthWestGravity;
|
||||
}
|
||||
|
||||
void
|
||||
ICCCM_Configure(const EWin * ewin)
|
||||
{
|
||||
|
@ -379,13 +413,11 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
|
||||
{
|
||||
if (hint.flags & PWinGravity)
|
||||
{
|
||||
ewin->client.grav = hint.win_gravity;
|
||||
}
|
||||
ewin->icccm.grav = hint.win_gravity;
|
||||
else
|
||||
{
|
||||
ewin->client.grav = NorthWestGravity;
|
||||
}
|
||||
ewin->icccm.grav = NorthWestGravity;
|
||||
ewin->client.grav = ewin->icccm.grav;
|
||||
|
||||
ewin->client.x = x;
|
||||
ewin->client.y = y;
|
||||
if ((hint.flags & PPosition) && (!EoIsSticky(ewin)))
|
||||
|
@ -426,95 +458,83 @@ ICCCM_GetGeoms(EWin * ewin, Atom atom_change)
|
|||
|
||||
if (hint.flags & PMinSize)
|
||||
{
|
||||
ewin->client.width.min = hint.min_width;
|
||||
ewin->client.height.min = hint.min_height;
|
||||
ewin->icccm.width.min = MAX(0, hint.min_width);
|
||||
ewin->icccm.height.min = MAX(0, hint.min_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.width.min = 0;
|
||||
ewin->client.height.min = 0;
|
||||
ewin->icccm.width.min = 0;
|
||||
ewin->icccm.height.min = 0;
|
||||
}
|
||||
|
||||
if (hint.flags & PMaxSize)
|
||||
{
|
||||
ewin->client.width.max = hint.max_width;
|
||||
ewin->client.height.max = hint.max_height;
|
||||
if (hint.max_width < ewin->client.w)
|
||||
ewin->client.width.max = ewin->client.w;
|
||||
if (hint.max_height < ewin->client.h)
|
||||
ewin->client.height.max = ewin->client.h;
|
||||
ewin->icccm.width.max = MAX(hint.max_width, ewin->client.w);
|
||||
ewin->icccm.height.max = MAX(hint.max_height, ewin->client.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.width.max = 65535;
|
||||
ewin->client.height.max = 65535;
|
||||
ewin->icccm.width.max = 65535;
|
||||
ewin->icccm.height.max = 65535;
|
||||
}
|
||||
|
||||
if (hint.flags & PResizeInc)
|
||||
{
|
||||
ewin->client.w_inc = hint.width_inc;
|
||||
ewin->client.h_inc = hint.height_inc;
|
||||
if (ewin->client.w_inc < 1)
|
||||
ewin->client.w_inc = 1;
|
||||
if (ewin->client.h_inc < 1)
|
||||
ewin->client.h_inc = 1;
|
||||
ewin->icccm.w_inc = MAX(1, hint.width_inc);
|
||||
ewin->icccm.h_inc = MAX(1, hint.height_inc);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.w_inc = 1;
|
||||
ewin->client.h_inc = 1;
|
||||
ewin->icccm.w_inc = 1;
|
||||
ewin->icccm.h_inc = 1;
|
||||
}
|
||||
|
||||
if (hint.flags & PAspect)
|
||||
{
|
||||
if ((hint.min_aspect.y > 0.0) && (hint.min_aspect.x > 0.0))
|
||||
{
|
||||
ewin->client.aspect_min =
|
||||
ewin->icccm.aspect_min =
|
||||
((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.aspect_min = 0.0;
|
||||
ewin->icccm.aspect_min = 0.0;
|
||||
}
|
||||
if ((hint.max_aspect.y > 0.0) && (hint.max_aspect.x > 0.0))
|
||||
{
|
||||
ewin->client.aspect_max =
|
||||
ewin->icccm.aspect_max =
|
||||
((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.aspect_max = 65535.0;
|
||||
ewin->icccm.aspect_max = 65535.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.aspect_min = 0.0;
|
||||
ewin->client.aspect_max = 65535.0;
|
||||
ewin->icccm.aspect_min = 0.0;
|
||||
ewin->icccm.aspect_max = 65535.0;
|
||||
}
|
||||
|
||||
if (hint.flags & PBaseSize)
|
||||
{
|
||||
ewin->client.base_w = hint.base_width;
|
||||
ewin->client.base_h = hint.base_height;
|
||||
ewin->icccm.base_w = hint.base_width;
|
||||
ewin->icccm.base_h = hint.base_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin->client.base_w = ewin->client.width.min;
|
||||
ewin->client.base_h = ewin->client.height.min;
|
||||
ewin->icccm.base_w = ewin->icccm.width.min;
|
||||
ewin->icccm.base_h = ewin->icccm.height.min;
|
||||
}
|
||||
|
||||
if (ewin->client.width.min < ewin->client.base_w)
|
||||
ewin->client.width.min = ewin->client.base_w;
|
||||
if (ewin->client.height.min < ewin->client.base_h)
|
||||
ewin->client.height.min = ewin->client.base_h;
|
||||
if (ewin->icccm.width.min < ewin->icccm.base_w)
|
||||
ewin->icccm.width.min = ewin->icccm.base_w;
|
||||
if (ewin->icccm.height.min < ewin->icccm.base_h)
|
||||
ewin->icccm.height.min = ewin->icccm.base_h;
|
||||
}
|
||||
|
||||
ewin->client.no_resize_h = 0;
|
||||
ewin->client.no_resize_v = 0;
|
||||
if (ewin->client.width.min == ewin->client.width.max)
|
||||
ewin->client.no_resize_h = 1;
|
||||
if (ewin->client.height.min == ewin->client.height.max)
|
||||
ewin->client.no_resize_v = 1;
|
||||
ewin->props.no_resize_h = (ewin->icccm.width.min == ewin->icccm.width.max);
|
||||
ewin->props.no_resize_v = (ewin->icccm.height.min == ewin->icccm.height.max);
|
||||
|
||||
if (EventDebug(EDBUG_TYPE_SNAPS))
|
||||
Eprintf("Snap get icccm %#lx: %4d+%4d %4dx%4d: %s\n",
|
||||
|
|
|
@ -459,15 +459,12 @@ IconboxReconfigure(Iconbox * ib)
|
|||
Imlib_Border *pad;
|
||||
EWin *ewin;
|
||||
int extra;
|
||||
unsigned int wmin, hmin, wmax, hmax;
|
||||
|
||||
ewin = ib->ewin;
|
||||
|
||||
ewin->client.width.min = 8;
|
||||
ewin->client.height.min = 8;
|
||||
ewin->client.width.max = 16384;
|
||||
ewin->client.height.max = 16384;
|
||||
ewin->client.no_resize_h = 0;
|
||||
ewin->client.no_resize_v = 0;
|
||||
wmin = hmin = 8;
|
||||
wmax = hmax = 16384;
|
||||
|
||||
extra = 0;
|
||||
if (ib->orientation)
|
||||
|
@ -483,10 +480,8 @@ IconboxReconfigure(Iconbox * ib)
|
|||
if (ic2)
|
||||
extra += pad->left + pad->right;
|
||||
}
|
||||
ewin->client.width.max = ewin->client.width.min =
|
||||
ib->iconsize + ib->scroll_thickness + extra;
|
||||
ewin->client.no_resize_h = 1;
|
||||
ib->max_min = ewin->client.height.min;
|
||||
wmax = wmin = ib->iconsize + ib->scroll_thickness + extra;
|
||||
ib->max_min = hmin;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -501,11 +496,12 @@ IconboxReconfigure(Iconbox * ib)
|
|||
if (ic2)
|
||||
extra += pad->top + pad->bottom;
|
||||
}
|
||||
ewin->client.height.max = ewin->client.height.min =
|
||||
ib->iconsize + ib->scroll_thickness + extra;
|
||||
ewin->client.no_resize_v = 1;
|
||||
ib->max_min = ewin->client.width.min;
|
||||
hmax = hmin = ib->iconsize + ib->scroll_thickness + extra;
|
||||
ib->max_min = wmin;
|
||||
}
|
||||
|
||||
ICCCM_SetSizeConstraints(ewin, wmin, hmin, wmax, hmax, 0, 0, 1, 1,
|
||||
0.0, 65535.0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
12
src/ipc.c
12
src/ipc.c
|
@ -1085,12 +1085,12 @@ EwinShowInfo2(const EWin * ewin)
|
|||
EwinIsWindowGroupLeader(ewin), EwinGetWindowGroup(ewin),
|
||||
ewin->icccm.client_leader, EwinGetTransientCount(ewin),
|
||||
EwinIsTransient(ewin), EwinGetTransientFor(ewin),
|
||||
ewin->client.no_resize_h, ewin->client.no_resize_v,
|
||||
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->props.no_resize_h, ewin->props.no_resize_v,
|
||||
ewin->state.shaped, ewin->icccm.base_w, ewin->icccm.base_h,
|
||||
ewin->icccm.width.min, ewin->icccm.height.min,
|
||||
ewin->icccm.width.max, ewin->icccm.height.max,
|
||||
ewin->icccm.w_inc, ewin->icccm.h_inc,
|
||||
ewin->icccm.aspect_min, ewin->icccm.aspect_max,
|
||||
ewin->strut.left, ewin->strut.right,
|
||||
ewin->strut.top, ewin->strut.bottom,
|
||||
ewin->mwm.decor_border, ewin->mwm.decor_resizeh,
|
||||
|
|
24
src/menus.c
24
src/menus.c
|
@ -224,9 +224,8 @@ MenuEwinInit(EWin * ewin, void *ptr)
|
|||
ewin->props.never_focus = 1;
|
||||
ewin->client.grav = StaticGravity;
|
||||
|
||||
ewin->client.width.min = ewin->client.width.max = ewin->client.w = m->w;
|
||||
ewin->client.height.min = ewin->client.height.max = ewin->client.h = m->h;
|
||||
ewin->client.no_resize_h = ewin->client.no_resize_v = 1;
|
||||
ICCCM_SetSizeConstraints(ewin, m->w, m->h, m->w, m->h, 0, 0, 1, 1,
|
||||
0.0, 65535.0);
|
||||
|
||||
EoSetSticky(ewin, 1);
|
||||
EoSetLayer(ewin, 3);
|
||||
|
@ -584,24 +583,19 @@ void
|
|||
MenuRepack(Menu * m)
|
||||
{
|
||||
EWin *ewin;
|
||||
unsigned int w, h;
|
||||
|
||||
m->redraw = 1;
|
||||
if (m->win)
|
||||
MenuRealize(m);
|
||||
|
||||
ewin = m->ewin;
|
||||
if (ewin)
|
||||
{
|
||||
w = m->w;
|
||||
h = m->h;
|
||||
ewin->client.height.min = h;
|
||||
ewin->client.height.max = h;
|
||||
ewin->client.width.min = w;
|
||||
ewin->client.width.max = w;
|
||||
EwinResize(ewin, w, h);
|
||||
RaiseEwin(ewin);
|
||||
}
|
||||
if (!ewin)
|
||||
return;
|
||||
|
||||
ICCCM_SetSizeConstraints(ewin, m->w, m->h, m->w, m->h, 0, 0, 1, 1,
|
||||
0.0, 65535.0);
|
||||
EwinResize(ewin, m->w, m->h);
|
||||
RaiseEwin(ewin);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
12
src/pager.c
12
src/pager.c
|
@ -469,15 +469,11 @@ PagerReconfigure(Pager * p)
|
|||
|
||||
GetAreaSize(&ax, &ay);
|
||||
|
||||
ewin->client.w_inc = ax * 4;
|
||||
ewin->client.h_inc = ay * 8;
|
||||
ewin->client.width.min = 10 * ax;
|
||||
ewin->client.height.min = 8 * ay;
|
||||
ewin->client.width.max = 320 * ax;
|
||||
ewin->client.height.max = 240 * ay;
|
||||
aspect = ((double)VRoot.w) / ((double)VRoot.h);
|
||||
ewin->client.aspect_min = aspect * ((double)ax / (double)ay);
|
||||
ewin->client.aspect_max = aspect * ((double)ax / (double)ay);
|
||||
ICCCM_SetSizeConstraints(ewin, 10 * ax, 8 * ay, 320 * ax, 240 * ay,
|
||||
0, 0, 4 * ax, 8 * ay,
|
||||
aspect * ((double)ax / (double)ay),
|
||||
aspect * ((double)ax / (double)ay));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -569,13 +569,13 @@ WindowMatchTest(const EWin * ewin, const WindowMatch * wm)
|
|||
break;
|
||||
|
||||
case MATCH_PROP_FIXEDSIZE:
|
||||
match = ewin->client.no_resize_h && ewin->client.no_resize_v;
|
||||
match = ewin->props.no_resize_h && ewin->props.no_resize_v;
|
||||
break;
|
||||
case MATCH_PROP_FIXEDSIZE_H:
|
||||
match = ewin->client.no_resize_h;
|
||||
match = ewin->props.no_resize_h;
|
||||
break;
|
||||
case MATCH_PROP_FIXEDSIZE_V:
|
||||
match = ewin->client.no_resize_v;
|
||||
match = ewin->props.no_resize_v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue