Re: [Sawfish] Beginner's Rep Question

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


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.

R.



----- Original Message -----
> From: D M German <dmg@xxxxxxx>
> To: sawfish@xxxxxxxxxxxxxxxxxxx
> Cc: 
> 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
> frames.
> 
> if you don't mind, why don't you explain us exactly what your use-case
> is. 
> 
> --dmg
> 
> 
> 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 
> values:
> 
> 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 
> the
> 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"
> http://turingmachine.org/
> http://silvernegative.com/
> dmg (at) uvic (dot) ca
> replace (at) with @ and (dot) with .
> 
> 
> 
> --
> Sawfish ML
>

--
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/