From cab43e7626b625c475da8e3aa21e7cfc6f1d0134 Mon Sep 17 00:00:00 2001 From: Lionel Flandrin Date: Wed, 9 Mar 2011 10:15:20 +0000 Subject: [PATCH] Add a *deny-raise-request-hook* called when a window is denied its raise request --- primitives.lisp | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/primitives.lisp b/primitives.lisp index e4bfcea..2e64eba 100644 --- a/primitives.lisp +++ b/primitives.lisp @@ -853,6 +853,10 @@ requests to become mapped for the first time.") Note that no denial message is displayed if the window is already visible.") +(defvar *deny-raise-request-hook* nil + "A hook called when a window is denied its raise-request. +Argument is the window whose request has been denied") + (defvar *suppress-deny-messages* nil "For complete focus on the task at hand, set this to @code{T} and no raise/map denial messages will be seen.") @@ -864,13 +868,15 @@ raise/map denial messages will be seen.") "Set to T to hide windows during interactive resize") (defun deny-request-p (window deny-list) - (or (eq deny-list t) - (and - (listp deny-list) - (find-if (lambda (props) - (apply 'window-matches-properties-p window props)) - deny-list) - t))) + (when + (or (eq deny-list t) + (and + (listp deny-list) + (find-if (lambda (props) + (apply 'window-matches-properties-p window props)) + deny-list))) + (run-hook-with-args *deny-raise-request-hook* window) + t)) (defun list-splice-replace (item list &rest replacements) "splice REPLACEMENTS into LIST where ITEM is, removing -- 1.7.2.3