Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defvar my-fullscreen-p t "Check if fullscreen is on or off")
- (defun my-non-fullscreen ()
- (interactive)
- (if (fboundp 'w32-send-sys-command)
- ;; WM_SYSCOMMAND restore #xf120
- (w32-send-sys-command 61728)
- (progn (set-frame-parameter nil 'width 82)
- (set-frame-parameter nil 'fullscreen 'fullheight))))
- (defun my-fullscreen ()
- (interactive)
- (if (fboundp 'w32-send-sys-command)
- ;; WM_SYSCOMMAND maximaze #xf030
- (w32-send-sys-command 61488)
- (set-frame-parameter nil 'fullscreen 'fullboth)))
- (defun my-toggle-fullscreen ()
- (interactive)
- (setq my-fullscreen-p (not my-fullscreen-p))
- (if my-fullscreen-p
- (my-non-fullscreen)
- (my-fullscreen)))
- (global-set-key [(f11)] 'my-toggle-fullscreen)
- ;(run-with-idle-timer 0.1 nil 'my-toggle-fullscreen)
- ;(my-toggle-fullscreen)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement