|Re: [Sawfish] Beginner's Rep Question|
[ Thread Index |
| More lists.tuxfamily.org/sawfish Archives
- To: "sawfish@xxxxxxxxxxxxxxxxxxx" <sawfish@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [Sawfish] Beginner's Rep Question
- From: Richard <r_j_humphreys@xxxxxxxxxxx>
- Date: Thu, 31 Jan 2013 09:29:28 +0000 (GMT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1359624568; bh=bUodEB53aLMU9lbziXfEe7MBpORZOMFR2urMFiobmFs=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=T2zP/akL0BQ/cNIhocAawe6JPe7B0j4wmL+QzcQiWv7UQn/N5unRVbqdHqezxEVcGAuMCLoxvJ4D6+dvxXUz++tGj1NSEDyoZkg6wTkQscpy2JJxXYc8VtQAgvkvWMsNCBMrHs34KOmCt3Yv5mmQVnF59RpE534rssRWKPLgPz0=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Cp8OcFtlLpfP6cjBjnDpcaqyCIWY3hi7OCEA5Vo1SoJgXqzRTBT8OANzuAb2ZyLvlxPFd1ukgee+eg4jLTTL6cT9f1mLX8zMUI8ImX7G9AUJ+oe7tRdXw5dfil+Zfuo7d8YJP54F28Jo+mA9wLiexJddO8b2iYW6DJZJD3Zgxes=;
Thanks for the advice.
I don't have a specific use-case at present. I wanted to learn what facilities are available; then I can think of how to use them. In this particular case some cases which I was curious about were:
- Buttons which highlight as the mouse moves over/near them. (I know that this is addressed through the inactive/focussed/clicked states - but I like to play).
- Resize handles which only appear when the mouse is over/near them.
- Buttons which slide out of the title bar in response to a click or other event.
- Disabled buttons being completely hidden (rather than displayed inactive), which would involve the other buttons being shifted along.
It is fairly straightforward for some properties to vary for each window; the title bar is already showing different text for each window (generally by using window-name or a more complex function to derive some text) so it would be feasible to use a function call to provide coordinates, size, colours etc. So I may play with that method.
If I can get that working, the last hurdle will be that I was expecting a call to refresh-window to redraw all the frame parts immediately, but I was obviously wrong. I'll keep thinking about it.
Again, may thanks for the help.
----- Original Message -----
> From: D M German <dmg@xxxxxxx>
> To: sawfish@xxxxxxxxxxxxxxxxxxx
> Sent: Thursday, 31 January 2013, 2:29
> Subject: Re: [Sawfish] Beginner's Rep Question
> Hi Richard,
> I am not an expert on this, but from reading the documentation, it seems
> that there is a set number of window-frames to which windows refer
> to. In other words, not every window has its own frame. Windows share
> if you don't mind, why don't you explain us exactly what your use-case
> Richard> I'm playing with frame parts and I cannot work out if I am
> trying to do something that can't be done or if I am being stupid.
> Richard> How can I reliably change the properties of a frame part on one
> window only?
> Richard> Simple case; in sawfish-client it is simple to get a window and get
> it's frame:
> Richard> (setq a (select-window))
> Richard> (setq b (window-frame a))
> Richard> It is then simple to get to part of the frame - and change the
> Richard> (nth 2 (nth 3 b))
> Richard> -> shows (right-edge . 90)
> Richard> (rplacd (nth 2 (nth 3 b)) 100)
> Richard> -> shows (right-edge . 100)
> Richard> Now is where it starts to go wrong. Despite repeated calls to
> Richard> (refresh-window a)
> Richard> the change does not appear on screen - rather the change happens
> Richard> suddenly when the window is redrawn, for instance on a resize. Also,
> Richard> when I create a new window (or resize another window) I find that
> Richard> change has happened to that frame part on all windows.
> Richard> Am I trying to do something that cannot be done - or am I going
> about this stupidly?
> Richard> Many thanks, Richard.
> Richard> --
> Richard> Sawfish ML
> Daniel M. German "Great algorithms are
> Francis Sullivan -> the poetry of computation"
> dmg (at) uvic (dot) ca
> replace (at) with @ and (dot) with .
> Sawfish ML