[sawfish] Functions maybe-raise-window and maybe-lower-window are now obsolete.
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] Functions maybe-raise-window and maybe-lower-window are now obsolete.
- Date: Sat, 21 Aug 2010 05:21:17 +0000 (UTC)
commit cc735894d85dea9b9ca841e6a7dbeee119a2f42c
Author: Teika kazura <teika lavabit com>
Date: Sat Aug 21 08:04:37 2010 +0900
Functions maybe-raise-window and maybe-lower-window are now obsolete.
They're now aliases to raise-window* and lower-window*. The only
difference is that the obsolete version supports a nautilus feature
which was dropped long ago.
lisp/sawfish/wm/commands/raise-commands.jl | 6 ++--
lisp/sawfish/wm/ext/auto-raise.jl | 2 +-
lisp/sawfish/wm/util/compat.jl | 10 ++++++-
lisp/sawfish/wm/util/stacking.jl | 38 +--------------------------
man/news.texi | 7 +++++
man/sawfish.texi | 15 -----------
6 files changed, 21 insertions(+), 57 deletions(-)
---
diff --git a/lisp/sawfish/wm/commands/raise-commands.jl b/lisp/sawfish/wm/commands/raise-commands.jl
index 394334f..8b326ae 100644
--- a/lisp/sawfish/wm/commands/raise-commands.jl
+++ b/lisp/sawfish/wm/commands/raise-commands.jl
@@ -47,19 +47,19 @@
"Raise the window that received the current event, then replay any pointer
events that invoked the command."
(when (windowp w)
- (maybe-raise-window w))
+ (raise-window* w))
(replay-pointer w))
(define (and-pass-through-click-if-focused w)
"Raise the window that received the current event (if it's focused), then
replay any pointer events that invoked the command."
(when (and (windowp w) (eq w (input-focus)))
- (maybe-raise-window w))
+ (raise-window* w))
(replay-pointer w))
(define (or-pass-through-click w)
(if (and (windowp w) (not (window-on-top-p w)))
- (maybe-raise-window w)
+ (raise-window* w)
(replay-pointer w)))
;;###autoload
diff --git a/lisp/sawfish/wm/ext/auto-raise.jl b/lisp/sawfish/wm/ext/auto-raise.jl
index 7315ea0..f6f82dd 100644
--- a/lisp/sawfish/wm/ext/auto-raise.jl
+++ b/lisp/sawfish/wm/ext/auto-raise.jl
@@ -68,7 +68,7 @@
(if disable-auto-raise
(set-timer timer)
(setq rw-timer nil)
- (maybe-raise-window rw-window))))
+ (raise-window* rw-window))))
(delay (max 1 raise-window-timeout)))
(setq rw-timer (make-timer timer-callback
(quotient delay 1000)
diff --git a/lisp/sawfish/wm/util/compat.jl b/lisp/sawfish/wm/util/compat.jl
index cd47637..282244b 100644
--- a/lisp/sawfish/wm/util/compat.jl
+++ b/lisp/sawfish/wm/util/compat.jl
@@ -27,13 +27,16 @@
ws-remove-workspace
custom-set-color
custom-set-font
- custom-set-frame-style)
+ custom-set-frame-style
+ maybe-raise-window
+ maybe-lower-window)
(open rep
sawfish.wm.misc
sawfish.wm.custom
sawfish.wm.commands
- sawfish.wm.workspace)
+ sawfish.wm.workspace
+ sawfish.wm.util.stacking)
;;; obsolete functions are collected here
@@ -55,6 +58,9 @@
(define ws-insert-workspace insert-workspace)
(define ws-remove-workspace remove-workspace)
+ (define maybe-raise-window raise-window*)
+ (define maybe-lower-window lower-window*)
+
;;; obsolete commands
(define (define-commands index)
diff --git a/lisp/sawfish/wm/util/stacking.jl b/lisp/sawfish/wm/util/stacking.jl
index 6a56e97..3ba1b3b 100644
--- a/lisp/sawfish/wm/util/stacking.jl
+++ b/lisp/sawfish/wm/util/stacking.jl
@@ -24,9 +24,7 @@
(export raise-window*
lower-window*
- raise-lower-window*
- maybe-raise-window
- maybe-lower-window)
+ raise-lower-window*)
(open rep
sawfish.wm.windows
@@ -72,36 +70,4 @@ allowed."
(define-command 'lower-window lower-window* #:spec "%W")
(define-command 'raise-lower-window raise-lower-window* #:spec "%W")
-;;; application-assisted stacking functions
-
- (define (maybe-raise-window w)
- "If window W supports the _SAWFISH_WM_RAISE_WINDOW protocol, ask
-it whether it wants to raise itself or not. Else, raise the window
-unconditionally."
-
- ;; this only works symmetrically because the configure handler
- ;; uses raise-window*
-
- (if (window-supports-wm-protocol-p w '_SAWFISH_WM_RAISE_WINDOW)
- (send-client-message w 'WM_PROTOCOLS
- (vector (x-atom '_SAWFISH_WM_RAISE_WINDOW)
- ;; See windows.c:focus_on_window
- ;; for why the 1- is necessary..
- (1- (x-server-timestamp))) 32)
- (raise-window* w)))
-
- (define (maybe-lower-window w)
- "If window W supports the _SAWFISH_WM_LOWER_WINDOW protocol, ask
-it whether it wants to lower itself or not. Else, lower the window
-unconditionally."
-
- ;; this only works symmetrically because the configure handler
- ;; uses lower-window*
-
- (if (window-supports-wm-protocol-p w '_SAWFISH_WM_LOWER_WINDOW)
- (send-client-message w 'WM_PROTOCOLS
- (vector (x-atom '_SAWFISH_WM_LOWER_WINDOW)
- ;; See windows.c:focus_on_window
- ;; for why the 1- is necessary..
- (1- (x-server-timestamp))) 32)
- (lower-window* w))))
+ )
diff --git a/man/news.texi b/man/news.texi
index c583b7f..c38d4f5 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -35,6 +35,13 @@ your code. See @code{sawfish.wm.util.prompt} for details.
Sawfish is claimed to support mouse-buttons 1 - 9, but it is known
that drag of buttons 6 - 8 may not work. The button 9 doesn't work at
all, so we withdraw it.
+
+ item Functions @code{maybe-raise-window} and @code{maybe-lower-window} are
+now obsolete. [Teika Kazura]
+
+Replace them with @code{raise-window*} and @code{lower-window*} defined
+in @code{sawfish.wm.util.stacking}. Only difference is that the obsolete
+version supports a nautilus feature which was dropped long ago.
@end itemize
@item Build and Installation
diff --git a/man/sawfish.texi b/man/sawfish.texi
index 43b6405..c7ba16e 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -1833,21 +1833,6 @@ affected.
@end table
@end defvr
- defun maybe-raise-window w
-If window @var{w} supports the @code{_SAWFISH_WM_RAISE_WINDOW}
-protocol, ask it whether it wants to raise itself or not. Otherwise,
-raise the window unconditionally.
- end defun
-
- defun maybe-lower-window w
-If window @var{w} supports the @code{_SAWFISH_WM_LOWER_WINDOW}
-protocol, ask it whether it wants to lower itself or not. Otherwise,
-lower the window unconditionally.
- end defun
-
-These two protocols were used in nautilus, but the current situation
-is unknown.
-
Sawfish has more general operations that raising a window to the top
or lowering it to the bottom. It can place a window relative to one
or more other managed windows.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]