diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2015-08-17T09·47+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2015-08-17T09·47+0800 |
commit | 7120291197fb5ceb032671ba02345d181c77399d (patch) | |
tree | 9315c2b8a78cb8e5bc687552fc9e74fa0799786d /exwm-layout.el | |
parent | d998b42b89bc9e248b6d2250c56ddd17ec4b17cf (diff) | |
parent | d1806e91888cc2d56e252299d07cb6af05a3e9d0 (diff) |
Merge branch 'pipcet-robustness'
Diffstat (limited to 'exwm-layout.el')
-rw-r--r-- | exwm-layout.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index a6b450f7daf5..1ffb3b93fce0 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -93,6 +93,8 @@ "Make window ID fullscreen." (interactive) (with-current-buffer (if id (exwm--id->buffer id) (window-buffer)) + (when exwm--fullscreen + (user-error "Already in full-screen mode.")) ;; Set the floating frame fullscreen first when the client is floating (when exwm--floating-frame (let* ((outer-id (frame-parameter exwm--floating-frame 'exwm-outer-id)) @@ -130,7 +132,6 @@ :window exwm--id :data (vector xcb:Atom:_NET_WM_STATE_FULLSCREEN))) (xcb:flush exwm--connection) - (cl-assert (not exwm--fullscreen)) (setq exwm--fullscreen t) (exwm-input-release-keyboard))) @@ -138,6 +139,8 @@ "Restore window from fullscreen state." (interactive) (with-current-buffer (if id (exwm--id->buffer id) (window-buffer)) + (unless exwm--fullscreen + (user-error "Not in full-screen mode.")) ;; Restore the floating frame if the client is floating (when exwm--floating-frame (xcb:+request exwm--connection @@ -156,7 +159,6 @@ (xcb:+request exwm--connection (make-instance 'xcb:ewmh:set-_NET_WM_STATE :window exwm--id :data [])) (xcb:flush exwm--connection) - (cl-assert exwm--fullscreen) (setq exwm--fullscreen nil) (exwm-input-grab-keyboard))) |