about summary refs log tree commit diff
path: root/exwm-randr.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-09-04T01·09+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-04T01·15+0800
commit6d63c712808bcb12ce7190999d17c4a0d6959cdb (patch)
tree3bc22adbf1bb497fd57d95f765b33dac8b021144 /exwm-randr.el
parentf1d37b9a8c8d5dbe223b9099c09b2b25f0236c64 (diff)
Prepare for GNU ELPA release
* Transfer copyright to Free Software Foundation
* Add packaging components (e.g. headers)
* Coding style fixes:
  + Quote functions with "#'"
  + Wrap long lines
  + Fix doc strings / comments
* Replace `string-to-int' with `string-to-number'
* Fix compiling errors / eliminate compiling warnings
  + Add exwm-core.el to hold common variables, functions and macros
* Remove the redundant COPYING file
* Add .gitignore
* Rename README to README.md
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index 57ad569e2282..d14e0974c7ad 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -1,24 +1,23 @@
 ;;; exwm-randr.el --- RandR Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015 Chris Feng
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng <chris.w.feng@gmail.com>
-;; Keywords: unix
 
-;; This file is not part of GNU Emacs.
+;; This file is part of GNU Emacs.
 
-;; This file is free software: you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 ;; (at your option) any later version.
 
-;; This file is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this file.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -42,6 +41,8 @@
 ;;; Code:
 
 (require 'xcb-randr)
+(require 'exwm-core)
+(eval-when-compile (require 'exwm-workspace))
 
 (defvar exwm-randr-workspace-output-plist nil)
 
@@ -60,7 +61,7 @@
                                :output output
                                :config-timestamp config-timestamp))
           (setq name                    ;UTF-8 encoded
-                (decode-coding-string (apply 'unibyte-string name) 'utf-8))
+                (decode-coding-string (apply #'unibyte-string name) 'utf-8))
           (if (or (/= connection xcb:randr:Connection:Connected)
                   (= 0 crtc))           ;FIXME
               (plist-put output-plist name nil)
@@ -102,9 +103,9 @@
                        :window exwm--root :data (vconcat workareas)))
     ;; Update _NET_DESKTOP_VIEWPORT
     (xcb:+request exwm--connection
-      (make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT
-                     :window exwm--root
-                     :data (vconcat viewports)))
+        (make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT
+                       :window exwm--root
+                       :data (vconcat viewports)))
     (xcb:flush exwm--connection)))
 
 (defun exwm-randr--init ()
@@ -121,11 +122,11 @@
                  major-version minor-version)
         (exwm-randr--refresh)
         (xcb:+event exwm--connection 'xcb:randr:ScreenChangeNotify
-                    (lambda (data synthetic)
+                    (lambda (_data _synthetic)
                       (exwm--log "(RandR) ScreenChangeNotify")
                       (exwm-randr--refresh)))
         ;; (xcb:+event exwm--connection 'xcb:randr:Notify
-        ;;             (lambda (data synthetic)
+        ;;             (lambda (_data _synthetic)
         ;;               (exwm--log "(RandR) Notify")
         ;;               (exwm-randr--refresh)))
         (xcb:+request exwm--connection
@@ -142,7 +143,7 @@
 
 (defun exwm-randr-enable ()
   "Enable RandR support for EXWM."
-  (add-hook 'exwm-init-hook 'exwm-randr--init))
+  (add-hook 'exwm-init-hook #'exwm-randr--init))