Re: Project idea on "Big one hook"
- From: Timo Korvola <Timo Korvola iki fi>
- To: sawfish-list gnome org
- Subject: Re: Project idea on "Big one hook"
- Date: Sun, 27 Sep 2009 14:35:20 +0300
On Saturday 26 September 2009 07:38:24 Teika Kazura wrote:
> Currently, each module independently puts their functions on hooks.
> So, it is quite obscure both for users and developers what is
> processed, e.g., when a window is mapped.
This is unavoidable in modular code, where different modules will need
to react to the same events. Fortunately it is easy to check the value
of the hook variable at run time. Hook functions should be given
reasonable names that are easy to locate.
Does Rep have a function that would return the structure (module) where
a given closure is defined? It might be useful for debugging. On the
other hand, grep works pretty well too.
> When you want to put something on a hook, you can easily choose
> whether it goes at the head or the tail of the hook.
You can already to that with add-hook. It does not provide very good
control for ordering hooks though, because it depends on the order in
which different modules are loaded, and that is difficult to control.
Similar problems have been faced elsewhere, e.g., Linux boot sequence.
But do we have an actual problem here with Sawfish? Have there been
situations where one would need better control on the calling order of
some hook?
--
Timo Korvola <URL:http://www.iki.fi/tkorvola>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]