From 6fe6fe52f619bc2e4648cebf137266363f0e19d4 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Sun, 6 Mar 2016 13:45:13 +0800 Subject: Untabify --- exwm-manage.el | 80 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'exwm-manage.el') diff --git a/exwm-manage.el b/exwm-manage.el index 9f9c844c86..adc8519664 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -101,7 +101,7 @@ corresponding buffer.") (memq xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL exwm-window-type))) ;; Check the _MOTIF_WM_HINTS property. (and exwm--mwm-hints - ;; See for fields definitions. + ;; See for fields definitions. (/= 0 (logand (elt exwm--mwm-hints 0) ;MotifWmHints.flags 2)) ;MWM_HINTS_DECORATIONS (= 0 (elt exwm--mwm-hints 2)) ;MotifWmHints.decorations @@ -334,54 +334,54 @@ corresponding buffer.") (let ((id exwm--id)) ;; Try to close the X window with WM_DELETE_WINDOW client message. (xcb:+request exwm--connection - (make-instance 'xcb:icccm:SendEvent - :destination id - :event (xcb:marshal - (make-instance 'xcb:icccm:WM_DELETE_WINDOW - :window id) - exwm--connection))) + (make-instance 'xcb:icccm:SendEvent + :destination id + :event (xcb:marshal + (make-instance 'xcb:icccm:WM_DELETE_WINDOW + :window id) + exwm--connection))) (xcb:flush exwm--connection) ;; (unless (memq xcb:Atom:_NET_WM_PING exwm--protocols) - ;; The window does not support _NET_WM_PING. To make sure it'll die, - ;; kill it after the time runs out. - ;; Hide the container to prevent flickering. - (xcb:+request exwm--connection - (make-instance 'xcb:UnmapWindow :window exwm--container)) - (xcb:flush exwm--connection) - (run-with-timer exwm-manage-ping-timeout nil - `(lambda () (exwm-manage--kill-client ,id))) - ;; Wait for DestroyNotify event. - (throw 'return nil)) + ;; The window does not support _NET_WM_PING. To make sure it'll die, + ;; kill it after the time runs out. + ;; Hide the container to prevent flickering. + (xcb:+request exwm--connection + (make-instance 'xcb:UnmapWindow :window exwm--container)) + (xcb:flush exwm--connection) + (run-with-timer exwm-manage-ping-timeout nil + `(lambda () (exwm-manage--kill-client ,id))) + ;; Wait for DestroyNotify event. + (throw 'return nil)) ;; Try to determine if the X window is dead with _NET_WM_PING. (setq exwm-manage--ping-lock t) (xcb:+request exwm--connection - (make-instance 'xcb:SendEvent - :propagate 0 - :destination id - :event-mask xcb:EventMask:NoEvent - :event (xcb:marshal - (make-instance 'xcb:ewmh:_NET_WM_PING - :window id - :timestamp 0 - :client-window id) - exwm--connection))) + (make-instance 'xcb:SendEvent + :propagate 0 + :destination id + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal + (make-instance 'xcb:ewmh:_NET_WM_PING + :window id + :timestamp 0 + :client-window id) + exwm--connection))) (xcb:flush exwm--connection) (with-timeout (exwm-manage-ping-timeout - (if (yes-or-no-p (format "'%s' is not responding. \ + (if (yes-or-no-p (format "'%s' is not responding. \ Would you like to kill it? " - (buffer-name))) - (progn (exwm-manage--kill-client id) - ;; Kill the unresponsive X window and - ;; wait for DestroyNotify event. - (throw 'return nil)) - ;; Give up. - (throw 'return nil))) - (while (and exwm-manage--ping-lock - (exwm--id->buffer id)) ;may have been destroyed. - (accept-process-output nil 0.1)) - ;; Give up. - (throw 'return nil))))) + (buffer-name))) + (progn (exwm-manage--kill-client id) + ;; Kill the unresponsive X window and + ;; wait for DestroyNotify event. + (throw 'return nil)) + ;; Give up. + (throw 'return nil))) + (while (and exwm-manage--ping-lock + (exwm--id->buffer id)) ;may have been destroyed. + (accept-process-output nil 0.1)) + ;; Give up. + (throw 'return nil))))) (defun exwm-manage--kill-client (&optional id) "Kill an X client." -- cgit 1.4.1