Center floating windows by default

This commit makes a floating window centered to its leading window if it has
a valid WM_TRANSIENT_FOR property set. Other it's placed at the center of the
screen.
This commit is contained in:
Chris Feng 2015-08-11 15:06:11 +08:00
parent 801185c7cc
commit 1ce18afd05
3 changed files with 26 additions and 2 deletions

View file

@ -86,7 +86,6 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
"Update input focus."
(when (and (frame-parameter nil 'exwm-window-id) ;e.g. emacsclient frame
(eq (current-buffer) (window-buffer))) ;e.g. `with-temp-buffer'
(exwm--log "EXWM-INPUT--UPDATE-FOCUS")
(if (eq major-mode 'exwm-mode)
(progn (exwm--log "Set focus ID to #x%x" exwm--id)
(setq exwm-input--focus-id exwm--id)