aboutsummaryrefslogtreecommitdiff
path: root/src/win.c
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-11-08 14:10:07 +1100
committerallusive-dev <[email protected]>2023-11-08 14:10:07 +1100
commitfeb9de0a497bba112a848634087d5498f17bfb60 (patch)
treed13444555f77fe8f7982a27d54c25be3f75134e6 /src/win.c
parentbacktrack (diff)
downloadcompfy-feb9de0a497bba112a848634087d5498f17bfb60.tar.xz
compfy-feb9de0a497bba112a848634087d5498f17bfb60.zip
Testing Issue #23
Diffstat (limited to 'src/win.c')
-rw-r--r--src/win.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/win.c b/src/win.c
index 1392020..80ef89f 100644
--- a/src/win.c
+++ b/src/win.c
@@ -766,12 +766,26 @@ void win_process_update_flags(session_t *ps, struct managed_win *w) {
w->g.height = (uint16_t)round(w->animation_h);
} else {
- w->animation_dest_center_x =
- w->pending_g.x + w->pending_g.width * 0.5;
- w->animation_dest_center_y =
- w->pending_g.y + w->pending_g.height * 0.5;
- w->animation_dest_w = w->pending_g.width;
- w->animation_dest_h = w->pending_g.height;
+ if (ps->o.support_for_wm == WM_SUPPORT_HERB) {
+
+ if (w->pending_g.x < -(w->g.width) && w->pending_g.y < -(w->g.height)) {
+ log_warn("Animation geometry postion update cancelled");
+ } else {
+ w->animation_dest_center_x =
+ w->pending_g.x + w->pending_g.width * 0.5;
+ w->animation_dest_center_y =
+ w->pending_g.y + w->pending_g.height * 0.5;
+ w->animation_dest_w = w->pending_g.width;
+ w->animation_dest_h = w->pending_g.height;
+ }
+ } else {
+ w->animation_dest_center_x =
+ w->pending_g.x + w->pending_g.width * 0.5;
+ w->animation_dest_center_y =
+ w->pending_g.y + w->pending_g.height * 0.5;
+ w->animation_dest_w = w->pending_g.width;
+ w->animation_dest_h = w->pending_g.height;
+ }
}
w->g.border_width = w->pending_g.border_width;