From 0398483bdc2070f7ca6580869eae848f8a70eab8 Mon Sep 17 00:00:00 2001 From: David Botton Date: Wed, 31 Jan 2024 10:58:12 -0500 Subject: [PATCH] Fix keep on top --- source/clog-gui.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/clog-gui.lisp b/source/clog-gui.lisp index 91903a4..5165f09 100644 --- a/source/clog-gui.lisp +++ b/source/clog-gui.lisp @@ -936,8 +936,9 @@ for identifiying the window to use with window-to-top-by-param or window-by-para (set-on-pointer-down (win-title win) (lambda (obj data) (declare (ignore obj data)) - (setf (z-index win) (incf (last-z app))) - (fire-on-window-change win app)) + (unless (keep-on-top win) + (setf (z-index win) (incf (last-z app))) + (fire-on-window-change win app))) :capture-pointer t) (clog::set-on-event win "dragstart" (lambda (obj) @@ -1017,9 +1018,8 @@ for identifiying the window to use with window-to-top-by-param or window-by-para (defmethod window-focus ((obj clog-gui-window)) (let ((app (connection-data-item obj "clog-gui"))) - (when (keep-on-top obj) - (setf (keep-on-top obj) nil)) - (setf (z-index obj) (incf (last-z app))) + (unless (keep-on-top obj) + (setf (z-index obj) (incf (last-z app)))) (fire-on-window-change obj app))) ;;;;;;;;;;;;;;;;;;