sawfish r4260 - in trunk: man src
- From: tkorvola svn gnome org
- To: svn-commits-list gnome org
- Subject: sawfish r4260 - in trunk: man src
- Date: Tue, 5 Aug 2008 20:28:05 +0000 (UTC)
Author: tkorvola
Date: Tue Aug 5 20:28:05 2008
New Revision: 4260
URL: http://svn.gnome.org/viewvc/sawfish?rev=4260&view=rev
Log:
Call property handlers in window-remprop.
Also, do not assume that (cddr plist) is a cons. It might be nil.
Modified:
trunk/man/sawmill.texi
trunk/src/windows.c
Modified: trunk/man/sawmill.texi
==============================================================================
--- trunk/man/sawmill.texi (original)
+++ trunk/man/sawmill.texi Tue Aug 5 20:28:05 2008
@@ -852,10 +852,8 @@
@end defun
@defun window-remprop window property
-Remove @var{property} of @var{window}. Returs @code{t} for success,
-otherwise @code{nil}.
-
-Do NOT remove a keymap with this function. Use @code{window-put} instead.
+Remove @var{property} of @var{window}. Returns @code{t} for success,
+ code{nil} if the property did not exist.
@end defun
@node Window Types, Window Attributes, Window Property Lists, Windows
Modified: trunk/src/windows.c
==============================================================================
--- trunk/src/windows.c (original)
+++ trunk/src/windows.c Tue Aug 5 20:28:05 2008
@@ -749,25 +749,29 @@
::doc:sawfish.wm.windows.subrs#window-prop-del::
window-put WINDOW PROPERTY
-Delete PROPERTY of WINDOW. Returs t for success, otherwise nil.
-
-Do NOT delete keymap with this function. Use `window-put' instead.
+Delete PROPERTY of WINDOW. Return t for success, nil if WINDOW
+did not have PROPERTY.
::end:: */
{
- repv plist;
+ repv *pplist;
rep_DECLARE1(win, XWINDOWP);
- plist = VWIN(win)->plist;
- while (rep_CONSP(plist) && rep_CONSP(rep_CDR(plist)))
+ pplist = &VWIN(win)->plist;
+ while (rep_CONSP(*pplist) && rep_CONSP(rep_CDR(*pplist)))
{
- if (rep_CAR(plist) == prop
+ if (rep_CAR(*pplist) == prop
|| (!rep_SYMBOLP(prop)
- && rep_value_cmp (rep_CAR(plist), prop) == 0))
+ && rep_value_cmp (rep_CAR(*pplist), prop) == 0))
{
- rep_CAR(plist) = rep_CADDR(plist);
- rep_CDR(plist) = rep_CDDDR(plist);
+ struct prop_handler *ph;
+ repv old = rep_CADR(*pplist);
+ if (old != Qnil)
+ for (ph = prop_handlers; ph != 0; ph = ph->next)
+ if (ph->prop == prop)
+ ph->callback(VWIN (win), prop, old, Qnil);
+ *pplist = rep_CDDR(*pplist);
return Qt;
}
- plist = rep_CDDR(plist);
+ pplist = &rep_CDDR(*pplist);
}
return Qnil;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]