mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-04 07:15:55 -04:00
fix: fix error offset for shadow and surface clip
This commit is contained in:
parent
e264a89022
commit
7140070580
2 changed files with 6 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
void client_actual_size(Client *c, uint32_t *width, uint32_t *height) {
|
void client_actual_size(Client *c, uint32_t *width, uint32_t *height) {
|
||||||
*width = c->animation.current.width - c->bw;
|
*width = c->animation.current.width - 2 * c->bw;
|
||||||
|
|
||||||
*height = c->animation.current.height - c->bw;
|
*height = c->animation.current.height - 2 * c->bw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_rect_size(struct wlr_scene_rect *rect, int width, int height) {
|
void set_rect_size(struct wlr_scene_rect *rect, int width, int height) {
|
||||||
|
|
@ -394,8 +394,6 @@ void client_apply_clip(Client *c, float factor) {
|
||||||
struct ivec2 offset;
|
struct ivec2 offset;
|
||||||
BufferData buffer_data;
|
BufferData buffer_data;
|
||||||
|
|
||||||
int bw = (int)c->bw;
|
|
||||||
|
|
||||||
if (!animations) {
|
if (!animations) {
|
||||||
c->animation.running = false;
|
c->animation.running = false;
|
||||||
c->need_output_flush = false;
|
c->need_output_flush = false;
|
||||||
|
|
@ -429,8 +427,8 @@ void client_apply_clip(Client *c, float factor) {
|
||||||
clip_box = (struct wlr_box){
|
clip_box = (struct wlr_box){
|
||||||
.x = geometry.x,
|
.x = geometry.x,
|
||||||
.y = geometry.y,
|
.y = geometry.y,
|
||||||
.width = width - bw,
|
.width = width,
|
||||||
.height = height - bw,
|
.height = height,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,8 @@ static inline void client_get_clip(Client *c, struct wlr_box *clip) {
|
||||||
*clip = (struct wlr_box){
|
*clip = (struct wlr_box){
|
||||||
.x = 0,
|
.x = 0,
|
||||||
.y = 0,
|
.y = 0,
|
||||||
.width = c->geom.width - c->bw,
|
.width = c->geom.width - 2 * c->bw,
|
||||||
.height = c->geom.height - c->bw,
|
.height = c->geom.height - 2 * c->bw,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue