After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137772 - Improved extensibility for window order
Improved extensibility for window order
Status: RESOLVED OBSOLETE
Product: Sawfish
Classification: Deprecated
Component: Window Manager
pre-1.3.x
Other Linux
: Normal enhancement
: 1.5.x
Assigned To: John Harper
sawfish QA Team
Depends on:
Blocks:
 
 
Reported: 2004-03-20 16:13 UTC by Martin Stjernholm
Modified: 2009-12-19 07:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for better extensibility of window order code (and some minor bug fixes) (7.19 KB, patch)
2004-03-20 16:16 UTC, Martin Stjernholm
none Details | Review

Description Martin Stjernholm 2004-03-20 16:13:58 UTC
[I directed this to the sawfish mailing list in the beginning of February
but got no answer, so I'm now filing it in Bugzilla so that it doesn't get
lost.]

I wanted to implement my own window order algorithm (based on window
position instead of an MRU stack). This turned out to be a bit awkward
since it requires me to override the whole x-cycle package with my own,
which would basically just be a copy. The code is nicely abstracted into
cycling in commands/x-cycle.jl and window order stuff in
util/window-order.jl, but the problem is that window-order.jl provides no
way to hook in a custom window order function.

The attached patch adds that to window-order.jl. The hook-in code is more
or less ripped from placement.jl but without the autoload stuff which I
haven't figured out.

The patch also fixes a bug in x-cycle.jl which appeared when I used my own
window order: In one place it assumed that MRU order is used and simply
added the currently focused window to the front of the order. To avoid
clumsy code I split up the window-order function into two: One that gets
the window list to order (get-windows-to-order) and another one that does
the actual sorting (sort-windows-in-order).

The patch includes a fix for another minor bug in x-cycle.jl (sorry for
mixing it together): When focusing a window it did not call
warp-pointer-if-necessary which had the effect that warp-to-window-enabled
wasn't heeded by the x-cycle package. (A little bit of refactoring between
that code and activate-window in windows.jl is probably in order to avoid
this kind of bug in the future.)

Can this patch or something like it get in? I'd like to know so I can make
my window order package available using a supported API.
Comment 1 Martin Stjernholm 2004-03-20 16:16:25 UTC
Created attachment 25829 [details] [review]
Patch for better extensibility of window order code (and some minor bug fixes)
Comment 2 Christopher Roy Bratusek 2008-05-25 07:17:54 UTC
If you still want your patch to get part of Sawfish split the bugfixes and the new functions. And then put both patches to Sawfish's new homepage: http://sawfish.wikia.com
Comment 3 Christopher Roy Bratusek 2009-12-19 07:13:28 UTC
OBSOLETE