about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
committerChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
commitbc5f0b3ffac4d262d4b8537baae0baf72402d079 (patch)
tree53aef68c2b48afe8c907808ad98235ece354306a /exwm-floating.el
parent1364f80f09668a16358aa8f509266bae41d55685 (diff)
; Use `derived-mode-p'.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el4
1 files changed, 2 insertions, 2 deletions
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))