[dwm] EXPERIMENTAL large number of clients patch

From: David Tweed <tweed314_AT_yahoo.co.uk>
Date: Tue, 7 Nov 2006 06:22:32 +0000 (GMT)

Hi, recently I've been working with enough images I got annoyed enough to take a stab at preserving implied aspect ratio of certain listed clients. This is a very rough patch that's a first stab & not cleanly coded. (Also includes some "personal" stuff I normally remove from posted patches, like Fn keys for tags.) (Note you don't need xinerama for large number of clients patch, it just provides facilities if you do.) What it attempts to do is detect when client on list sends configure requests, take note of aspect ratio implied by it's requested size. If client is in a STACK column, or when it is later moved to a stack column, we _try_ and make height appropriate for aspect ratio. Actual assignment of clients to columns is same as existing algorithm, but "normal" clients get shrunk/expanded to fill space left by aspect ratio clients. However, if total height of "aspect ratio" clients in column exceeds actual height, give up and scale all clients equally. In the case that a stack column would only have an "aspect ratio" client in it, if the aspected image doesn't take up the column height we leave the space at the end rather than expanding to fill it. Client class name PREFIXES can be listed in respectAspectRatio in config.default.h. They're matched in determineIfAspectRatioClient() in client.c. (xine & xv are listed in provided config.default.h) A fast test for updating is applied in configurerequest() in event.c. I'm just throwing this out "as is" for anyone interested as I'll be very busy for next couple of weeks, but I do plan to try & simplify/refine algorithm soon-ish. However, algorithm is certainly tricky so I'd be interested if anyone can make it either crash or make dwm behave oddly (or any other comments). cheers, dave tweed Send instant messages to your online friends http://uk.messenger.yahoo.com

Received on Tue Nov 07 2006 - 07:23:03 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:21 UTC