diff --git a/floating-group.lisp b/floating-group.lisp index 61f3c16..6469681 100644 --- a/floating-group.lisp +++ b/floating-group.lisp @@ -243,9 +243,12 @@ (defmethod group-replace-head (screen (group float-group) old-head new-head) (declare (ignore screen old-head new-head))) -(defmethod group-resize-head ((group float-group) oh nh) +(defmethod group-before-resize-head ((group float-group) oh nh) (declare (ignore oh nh))) +(defmethod group-after-resize-head ((group float-group) head) + (declare (ignore head))) + (defmethod group-sync-all-heads ((group float-group))) (defmethod group-sync-head ((group float-group) head) diff --git a/group.lisp b/group.lisp index 9b1c6f6..488a98a 100644 --- a/group.lisp +++ b/group.lisp @@ -33,8 +33,8 @@ group-resize-request group-move-request group-raise-request group-lost-focus group-indicate-focus group-focus-window group-button-press group-root-exposure group-add-head - group-remove-head group-resize-head group-sync-all-heads - group-sync-head)) + group-remove-head group-before-resize-head group-after-resize-head + group-sync-all-heads group-sync-head)) (defvar *default-group-type* 'tile-group "The type of group that should be created by default.") @@ -94,8 +94,10 @@ needs to redraw anything on it, this is where it should do it.")) (:documentation "A head is being removed from this group's screen.")) (defgeneric group-replace-head (screen group old-head new-head) (:documentation "A head is being replaced by another on this group's screen.")) -(defgeneric group-resize-head (group oh nh) - (:documentation "A head is being resized on this group's screen.")) +(defgeneric group-before-resize-head (group oh nh) + (:documentation "A head is about to be resized on this group's screen.")) +(defgeneric group-after-resize-head (group head) + (:documentation "A head has been resized on this group's screen.")) (defgeneric group-sync-all-heads (group) (:documentation "Called when the head configuration for the group changes.")) (defgeneric group-sync-head (group head) diff --git a/head.lisp b/head.lisp index c5cfe9c..15f3698 100644 --- a/head.lisp +++ b/head.lisp @@ -178,11 +178,13 @@ (= (head-width oh) nhw) (= (head-height oh) nhh)) (dolist (group (screen-groups screen)) - (group-resize-head group oh nh)) + (group-before-resize-head group oh nh)) (setf (head-x oh) nhx (head-y oh) nhy (head-width oh) nhw - (head-height oh) nhh)))) + (head-height oh) nhh) + (dolist (group (screen-groups screen)) + (group-after-resize-head group oh))))) (defun scale-screen (screen heads) "Scale all frames of all groups of SCREEN to match the dimensions of HEADS." diff --git a/stumpwm.texi.in b/stumpwm.texi.in index c7e3743..8251381 100644 --- a/stumpwm.texi.in +++ b/stumpwm.texi.in @@ -2216,7 +2216,8 @@ Groups in StumpWM are more commonly known as @dfn{virtual desktops} or @@@ group-move-request @@@ group-raise-request @@@ group-remove-head -@@@ group-resize-head +@@@ group-before-resize-head +@@@ group-after-resize-head @@@ group-resize-request @@@ group-root-exposure @@@ group-startup diff --git a/tests/integration-tests/tests-expected-to-fail b/tests/integration-tests/tests-expected-to-fail index c8be6d0..44e01d4 100644 --- a/tests/integration-tests/tests-expected-to-fail +++ b/tests/integration-tests/tests-expected-to-fail @@ -2,7 +2,6 @@ # This is necessary in order to allow merging test cases that reproduce unfixed issues. issue-0993 -issue-1000 issue-1004 issue-1005 issue-1006 diff --git a/tile-group.lisp b/tile-group.lisp index 086043d..688db50 100644 --- a/tile-group.lisp +++ b/tile-group.lisp @@ -224,10 +224,14 @@ head-frame-tree (head-number new-head)))))) -(defmethod group-resize-head ((group tile-group) oh nh) +(defmethod group-before-resize-head ((group tile-group) oh nh) + (clear-frame-outlines group) (resize-tree group (tile-group-frame-head group oh) (head-width nh) (head-height nh) - (head-x nh) (head-y nh)) + (head-x nh) (head-y nh))) + +(defmethod group-after-resize-head ((group tile-group) head) + (declare (ignore head)) (redraw-frame-indicator group) (redraw-frame-outline group))