about summary refs log tree commit diff
path: root/exwm-input.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-02-19T09·12+0800
committerChris Feng <chris.w.feng@gmail.com>2016-02-19T09·12+0800
commitfc589b899b71e88e48931de41ea1df760f9c1edd (patch)
treedbe6814fba5e46262b1809d8331f39220ed47c52 /exwm-input.el
parentbfd43feb494a8a7675f3a882ea5ebeaa91fb3f82 (diff)
Fix system tray issues after updating workspaces
* exwm-workspace.el (exwm-workspace-switch-hook): New hook run by
`exwm-workspace-switch'.
* exwm-randr.el (exwm-randr-refresh-hook): New hook run by
`exwm-randr--refresh'.
* exwm-systemtray.el (exwm-systemtray--on-randr-refresh)
(exwm-systemtray--on-workspace-switch, exwm-systemtray--init): Update the
system tray in `exwm-randr-refresh-hook' and `exwm-workspace-switch-hook'.

* exwm-layout.el (exwm-layout--set-frame-fullscreen):
* exwm-workspace.el (exwm-workspace--post-init): Wait until all workspace
frames are set fullscreen.

* exwm-workspace.el (exwm-workspace--current-width)
(exwm-workspace--current-height): New functions for retrieving the width
and height of the current workspace.
* exwm-layout.el (exwm-layout-set-fullscreen):
* exwm-manage.el (exwm-manage--manage-window)
(exwm-manage--on-ConfigureRequest):
* exwm-systemtray.el (exwm-systemtray--refresh, exwm-systemtray--init):
* exwm-workspace.le (exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify): Switch to
`exwm-workspace--current-width' and `exwm-workspace--current-height'.

* exwm-core.el:
* exwm-floating.el:
* exwm-floating.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el:
Clean up loading file.  Set/Unset some functions as commands.

* README.md: Add intro to system tray.
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el21
1 files changed, 18 insertions, 3 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 85be1efb2023..5e078030c2ef 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -37,7 +37,6 @@
 
 (require 'xcb-keysyms)
 (require 'exwm-core)
-(eval-when-compile (require 'exwm-workspace))
 
 (defvar exwm-input-move-event 's-down-mouse-1
   "Emacs event to start moving a window.")
@@ -94,6 +93,11 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
             exwm-input--timer
             (run-with-idle-timer 0.01 nil #'exwm-input--update-focus)))))
 
+(defvar exwm-workspace--current)
+(defvar exwm-workspace--switch-history-outdated)
+(defvar exwm-workspace-current-index)
+(defvar exwm-workspace--minibuffer)
+
 (defun exwm-input--update-focus ()
   "Update input focus."
   (when (window-live-p exwm-input--focus-window)
@@ -158,6 +162,11 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
       (setq exwm-input--temp-line-mode nil)
       (exwm-input--release-keyboard))))
 
+(declare-function exwm-floating--start-moveresize "exwm-floating.el"
+                  (id &optional type))
+
+(defvar exwm-workspace--list)
+
 (defun exwm-input--on-ButtonPress (data _synthetic)
   "Handle ButtonPress event."
   (let ((obj (make-instance 'xcb:ButtonPress))
@@ -262,6 +271,7 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
 
 (defun exwm-input-set-key (key command)
   "Set a global key binding."
+  (interactive "KSet key globally: \nCSet key %s to command: ")
   (global-set-key key command)
   (cl-pushnew key exwm-input--global-keys))
 
@@ -273,7 +283,6 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
 (defvar exwm-input--during-command nil
   "Indicate whether between `pre-command-hook' and `post-command-hook'.")
 
-;;;###autoload
 (defun exwm-input--on-KeyPress-line-mode (key-press)
   "Parse X KeyPress event to Emacs key event and then feed the command loop."
   (with-slots (detail state) key-press
@@ -443,12 +452,13 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
 (defun exwm-input-set-simulation-keys (simulation-keys)
   "Set simulation keys.
 
-SIMULATION-KEYS is a list of alist (key-sequence1 . key-sequence2)."
+SIMULATION-KEYS is an alist of the form (original-key . simulated-key)."
   (setq exwm-input--simulation-keys nil)
   (dolist (i simulation-keys)
     (cl-pushnew `(,(vconcat (car i)) . ,(cdr i)) exwm-input--simulation-keys))
   (exwm-input--update-simulation-prefix-keys))
 
+;;;###autoload
 (defun exwm-input-send-simulation-key (times)
   "Fake a key event according to last input key sequence."
   (interactive "p")
@@ -461,6 +471,11 @@ SIMULATION-KEYS is a list of alist (key-sequence1 . key-sequence2)."
         (dolist (j pair)
           (exwm-input--fake-key j))))))
 
+(declare-function exwm-floating--stop-moveresize "exwm-floating.el"
+                  (&rest _args))
+(declare-function exwm-floating--do-moveresize "exwm-floating.el"
+                  (data _synthetic))
+
 (defun exwm-input--init ()
   "Initialize the keyboard module."
   ;; Refresh keyboard mapping