[elpa] externals/xelb updated (28c0579 -> ddca322)

2016-05-12 Thread Chris Feng
ch11ng pushed a change to branch externals/xelb.

  from  28c0579   Avoid using the global value `x-display-name'
   new  ecd68de   Add 'MANAGER' atom
   new  ddca322   Implement basic authentication during connection setup


Summary of changes:
 xcb-icccm.el |2 +-
 xcb.el   |   60 ++
 2 files changed, 45 insertions(+), 17 deletions(-)



[elpa] externals/exwm updated (ddbbeda -> 2dcb26c)

2016-05-12 Thread Chris Feng
ch11ng pushed a change to branch externals/exwm.

  from  ddbbeda   Fix 2 multi-monitor issues
   new  367bdf2   Properly place undecorated X windows
   new  009854e   Announce manager selection with client message
   new  2dcb26c   Use `xcb:connect' instead of `xcb:connect-to-socket'


Summary of changes:
 exwm-manage.el |   20 ++--
 exwm-systemtray.el |   26 +-
 exwm.el|2 +-
 3 files changed, 40 insertions(+), 8 deletions(-)



[elpa] externals/exwm 367bdf2 1/3: Properly place undecorated X windows

2016-05-12 Thread Chris Feng
branch: externals/exwm
commit 367bdf2e1918dd61780e2284a4c89d5ef8cd1254
Author: Chris Feng 
Commit: Chris Feng 

Properly place undecorated X windows

* exwm-manage.el (exwm-manage--manage-window): Convert absolute position
of undecorated X windows.
---
 exwm-manage.el |   20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/exwm-manage.el b/exwm-manage.el
index b0657b9..1877033 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -126,12 +126,20 @@ corresponding buffer.")
 exwm-window-type)
   (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK
 exwm-window-type))
-(xcb:+request exwm--connection
-(make-instance 'xcb:ReparentWindow
-   :window id
-   :parent (frame-parameter exwm-workspace--current
-'exwm-workspace)
-   :x x :y y)))
+(let ((frame-geometry (frame-parameter exwm-workspace--current
+   'exwm-geometry))
+  (workspace (frame-parameter exwm-workspace--current
+  'exwm-workspace)))
+  (when (and frame-geometry
+ (/= x 0)
+ (/= y 0))
+(setq x (- x (slot-value frame-geometry 'x))
+  y (- y (slot-value frame-geometry 'y
+  (xcb:+request exwm--connection
+  (make-instance 'xcb:ReparentWindow
+ :window id
+ :parent workspace
+ :x x :y y
   ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH
   (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type)
 (xcb:+request exwm--connection



[elpa] externals/xelb ecd68de 1/2: Add 'MANAGER' atom

2016-05-12 Thread Chris Feng
branch: externals/xelb
commit ecd68de3176291afcf377ab9465491947f1aacac
Author: Chris Feng 
Commit: Chris Feng 

Add 'MANAGER' atom

* xcb-icccm.el (xcb:icccm:-atoms): Add 'MANAGER' atom.
---
 xcb-icccm.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xcb-icccm.el b/xcb-icccm.el
index c333f3c..c7f3c12 100644
--- a/xcb-icccm.el
+++ b/xcb-icccm.el
@@ -47,7 +47,7 @@
 
 (eval-and-compile
   (defconst xcb:icccm:-atoms
-'(UTF8_STRING COMPOUND_TEXT TEXT C_STRING
+'(UTF8_STRING COMPOUND_TEXT TEXT C_STRING MANAGER
   WM_PROTOCOLS WM_TAKE_FOCUS WM_DELETE_WINDOW WM_STATE)
 "Atoms involved in ICCCM.")
 



[elpa] externals/exwm 2dcb26c 3/3: Use `xcb:connect' instead of `xcb:connect-to-socket'

2016-05-12 Thread Chris Feng
branch: externals/exwm
commit 2dcb26ce9d4411200c635f19c372fc6c34f3bafe
Author: Chris Feng 
Commit: Chris Feng 

Use `xcb:connect' instead of `xcb:connect-to-socket'

* exwm.el (exwm-init):
* exwm-systemtray.el (exwm-systemtray--init):
Use `xcb:connect' instead of `xcb:connect-to-socket'.
---
 exwm-systemtray.el |2 +-
 exwm.el|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index c85d743..cb08ba9 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -306,7 +306,7 @@ You shall use the default value if using auto-hide 
minibuffer.")
 (setq exwm-systemtray-height (max exwm-systemtray--icon-min-size
   (line-pixel-height
   ;; Create a new connection.
-  (setq exwm-systemtray--connection (xcb:connect-to-socket))
+  (setq exwm-systemtray--connection (xcb:connect))
   (set-process-query-on-exit-flag (slot-value exwm-systemtray--connection
   'process)
   nil)
diff --git a/exwm.el b/exwm.el
index f8a3fc7..c9dc6cd 100644
--- a/exwm.el
+++ b/exwm.el
@@ -481,7 +481,7 @@
   (exwm--log "Not running under X environment")
 (unless exwm--connection
   (exwm-enable 'undo)   ;never initialize again
-  (setq exwm--connection (xcb:connect-to-socket))
+  (setq exwm--connection (xcb:connect))
   (set-process-query-on-exit-flag (slot-value exwm--connection 'process)
   nil) ;prevent query message on exit
   (setq exwm--root



[elpa] externals/exwm 009854e 2/3: Announce manager selection with client message

2016-05-12 Thread Chris Feng
branch: externals/exwm
commit 009854e766728ed17741bf9f7e6d86f9ccc71871
Author: Chris Feng 
Commit: Chris Feng 

Announce manager selection with client message

* exwm-systemtray.el (exwm-systemtray--init): Send a client message to
announce the manager selection.
(xcb:systemtray:-ClientMessage): The client message.
---
 exwm-systemtray.el |   24 
 1 file changed, 24 insertions(+)

diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 861304a..c85d743 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -30,6 +30,7 @@
 
 ;;; Code:
 
+(require 'xcb-icccm)
 (require 'xcb-xembed)
 (require 'xcb-systemtray)
 (require 'exwm-core)
@@ -40,6 +41,15 @@
(visible :initarg :visible))
   :documentation "Attributes of a system tray icon.")
 
+(defclass xcb:systemtray:-ClientMessage
+  (xcb:icccm:--ClientMessage xcb:ClientMessage)
+  ((format :initform 32)
+   (type :initform xcb:Atom:MANAGER)
+   (time :initarg :time :type xcb:TIMESTAMP)  ;new slot
+   (selection :initarg :selection :type xcb:ATOM) ;new slot
+   (owner :initarg :owner :type xcb:WINDOW))  ;new slot
+  :documentation "A systemtray client message.")
+
 ;; GTK icons require at least 16 pixels to show normally.
 (defconst exwm-systemtray--icon-min-size 16 "Minimum icon size.")
 
@@ -325,6 +335,20 @@ You shall use the default value if using auto-hide 
minibuffer.")
:owner id
:selection xcb:Atom:_NET_SYSTEM_TRAY_S0
:time xcb:Time:CurrentTime))
+;; Send a client message to announce the selection.
+(xcb:+request exwm-systemtray--connection
+(make-instance 'xcb:SendEvent
+   :propagate 0
+   :destination exwm--root
+   :event-mask xcb:EventMask:StructureNotify
+   :event (xcb:marshal
+   (make-instance 'xcb:systemtray:-ClientMessage
+  :window exwm--root
+  :time xcb:Time:CurrentTime
+  :selection
+  xcb:Atom:_NET_SYSTEM_TRAY_S0
+  :owner id)
+   exwm-systemtray--connection)))
 ;; Set _NET_WM_NAME.
 (xcb:+request exwm-systemtray--connection
 (make-instance 'xcb:ewmh:set-_NET_WM_NAME



[elpa] master 06e8bd7 1/2: validate-setq takes any even number of args

2016-05-12 Thread Artur Malabarba
branch: master
commit 06e8bd7d4c31ba5b10cf5c18a13c5370045cea71
Author: Artur Malabarba 
Commit: Artur Malabarba 

validate-setq takes any even number of args
---
 validate.el |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/validate.el b/validate.el
index 286835e..7ca4b0a 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.4
+;; Version: 0.5
 
 ;;; Commentary:
 ;;
@@ -188,13 +188,23 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
-(defmacro validate-setq (symbol value)
+(defmacro validate-setq ( svs)
   "Like `setq', but throw an error if validation fails.
-VALUE is validated against SYMBOL's custom type."
-  `(if (boundp ',symbol)
-   (setq ,symbol (validate-value ,value (custom-variable-type ',symbol)))
- (user-error "Trying to validate a variable that's not defined yet: 
`%s'.\nYou need to require the package before validating"
- ',symbol)))
+VALUE is validated against SYMBOL's custom type.
+
+\(fn [SYM VAL] ...)"
+  (let ((out))
+(while svs
+  (let ((symbol (pop svs))
+(value (if (not svs)
+   (error "`validate-setq' takes an even number of 
arguments")
+ (pop svs
+(push `(if (boundp ',symbol)
+   (setq ,symbol (validate-value ,value (custom-variable-type 
',symbol)))
+ (user-error "Trying to validate a variable that's not defined 
yet: `%s'.\nYou need to require the package before validating"
+ ',symbol))
+  out)))
+`(progn ,@(reverse out
 
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master 423a6b2 2/2: Merge commit '06e8bd7d4c31ba5b10cf5c18a13c5370045cea71'

2016-05-12 Thread Artur Malabarba
branch: master
commit 423a6b218804a210486fdb06af44bcc700b1bca4
Merge: 40fd76b 06e8bd7
Author: Artur Malabarba 
Commit: Artur Malabarba 

Merge commit '06e8bd7d4c31ba5b10cf5c18a13c5370045cea71'
---
 packages/validate/validate.el |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
index 286835e..7ca4b0a 100644
--- a/packages/validate/validate.el
+++ b/packages/validate/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.4
+;; Version: 0.5
 
 ;;; Commentary:
 ;;
@@ -188,13 +188,23 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
-(defmacro validate-setq (symbol value)
+(defmacro validate-setq ( svs)
   "Like `setq', but throw an error if validation fails.
-VALUE is validated against SYMBOL's custom type."
-  `(if (boundp ',symbol)
-   (setq ,symbol (validate-value ,value (custom-variable-type ',symbol)))
- (user-error "Trying to validate a variable that's not defined yet: 
`%s'.\nYou need to require the package before validating"
- ',symbol)))
+VALUE is validated against SYMBOL's custom type.
+
+\(fn [SYM VAL] ...)"
+  (let ((out))
+(while svs
+  (let ((symbol (pop svs))
+(value (if (not svs)
+   (error "`validate-setq' takes an even number of 
arguments")
+ (pop svs
+(push `(if (boundp ',symbol)
+   (setq ,symbol (validate-value ,value (custom-variable-type 
',symbol)))
+ (user-error "Trying to validate a variable that's not defined 
yet: `%s'.\nYou need to require the package before validating"
+ ',symbol))
+  out)))
+`(progn ,@(reverse out
 
 (provide 'validate)
 ;;; validate.el ends here