From bc5f0b3ffac4d262d4b8537baae0baf72402d079 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Sun, 15 Jul 2018 00:00:00 +0800 Subject: ; Use `derived-mode-p'. --- exwm-floating.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exwm-floating.el') diff --git a/exwm-floating.el b/exwm-floating.el index 0210492b18e8..aa2f98822a2e 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -411,7 +411,7 @@ This is also used by X window containers.") (defun exwm-floating-hide () "Hide the current floating X window (which would show again when selected)." (interactive) - (when (and (eq major-mode 'exwm-mode) + (when (and (derived-mode-p 'exwm-mode) exwm--floating-frame) (exwm-layout--hide exwm--id) (select-frame-set-input-focus exwm-workspace--current))) @@ -641,7 +641,7 @@ This is also used by X window containers.") "Move a floating window right by DELTA-X pixels and down by DELTA-Y pixels. Both DELTA-X and DELTA-Y default to 1. This command should be bound locally." - (unless (and (eq major-mode 'exwm-mode) exwm--floating-frame) + (unless (and (derived-mode-p 'exwm-mode) exwm--floating-frame) (user-error "[EXWM] `exwm-floating-move' is only for floating X windows")) (unless delta-x (setq delta-x 1)) (unless delta-y (setq delta-y 1)) -- cgit 1.4.1