parent relative for grips
This commit is contained in:
parent
c3a2684e02
commit
fe882632d3
1 changed files with 26 additions and 14 deletions
|
@ -19,7 +19,6 @@
|
||||||
f->cbwidth)
|
f->cbwidth)
|
||||||
#define BUTTON_SIZE (LABEL_HEIGHT - 2)
|
#define BUTTON_SIZE (LABEL_HEIGHT - 2)
|
||||||
#define GRIP_WIDTH (BUTTON_SIZE * 2)
|
#define GRIP_WIDTH (BUTTON_SIZE * 2)
|
||||||
#define HANDLE_WIDTH(f) (f->width - (GRIP_WIDTH + f->bwidth) * 2)
|
|
||||||
|
|
||||||
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask)
|
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask)
|
||||||
#define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask)
|
#define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask)
|
||||||
|
@ -804,19 +803,32 @@ static void render(ObFrame *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->frame.client->decorations & Decor_Handle) {
|
if (self->frame.client->decorations & Decor_Handle) {
|
||||||
paint(self->handle, (client_focused(self->frame.client) ?
|
Appearance *h, *g;
|
||||||
self->a_focused_handle :
|
|
||||||
self->a_unfocused_handle),
|
h = (client_focused(self->frame.client) ?
|
||||||
GRIP_WIDTH + self->bwidth, 0,
|
self->a_focused_handle : self->a_unfocused_handle);
|
||||||
HANDLE_WIDTH(self), s_handle_height);
|
g = (client_focused(self->frame.client) ?
|
||||||
paint(self->lgrip, (client_focused(self->frame.client) ?
|
a_focused_grip : a_unfocused_grip);
|
||||||
a_focused_grip :
|
|
||||||
a_unfocused_grip),
|
if (g->surface.data.planar.grad == Background_ParentRelative) {
|
||||||
0, 0, GRIP_WIDTH, s_handle_height);
|
g->surface.data.planar.parent = h;
|
||||||
paint(self->rgrip, (client_focused(self->frame.client) ?
|
paint(self->handle, h, 0, 0, self->width, s_handle_height);
|
||||||
a_focused_grip :
|
} else {
|
||||||
a_unfocused_grip),
|
paint(self->handle, h,
|
||||||
0, 0, GRIP_WIDTH, s_handle_height);
|
GRIP_WIDTH + self->bwidth, 0,
|
||||||
|
self->width - (GRIP_WIDTH + self->bwidth) * 2,
|
||||||
|
s_handle_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
g->surface.data.planar.parentx = 0;
|
||||||
|
g->surface.data.planar.parenty = 0;
|
||||||
|
|
||||||
|
paint(self->lgrip, g, 0, 0, GRIP_WIDTH, s_handle_height);
|
||||||
|
|
||||||
|
g->surface.data.planar.parentx = self->width - GRIP_WIDTH;
|
||||||
|
g->surface.data.planar.parenty = 0;
|
||||||
|
|
||||||
|
paint(self->rgrip, g, 0, 0, GRIP_WIDTH, s_handle_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue