[9fans] rio scaling - Plan9

This is a discussion on [9fans] rio scaling - Plan9 ; Hi, I often use rio-in-rio to group windows. If you draw a new window, rio prevents you from making the window too small to manage (goodrect), but it is possible to make windows smaller by starting a rio-in-rio, create a ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [9fans] rio scaling

  1. [9fans] rio scaling

    Hi,

    I often use rio-in-rio to group windows. If you draw a new window, rio
    prevents you from
    making the window too small to manage (goodrect), but it is possible to
    make windows
    smaller by starting a rio-in-rio, create a window in the subrio and
    shrink the parent window,
    so the parent scales its children down to a bad size. This results in
    rio to crash in
    libframe sometimes:

    "draw: frcanfit == 0: screen id in use"

    My question is:

    Should programs rely on rio making ther windows always a goodrect or
    should it deal with the
    case of drawing in a 10x10 or 1x1 image?

    I experimented a little bit to find a work arround to this problem. I
    added code to rio
    to not making windows smaller than 100 x (3*font->height), but if you
    make rio bigger again
    (after shrinking) the window gets too big. So i think about just not to
    scale subwindows at all
    to preserve position and size of the subwindows.

    Any better ideas?

    cinap


  2. Re: [9fans] rio scaling

    > Should programs rely on rio making ther windows always a goodrect or
    > should it deal with the
    > case of drawing in a 10x10 or 1x1 image?


    I've occasionally wanted to create tiny windows
    (for example I originally made bargraph less tall)
    and it's a little annoying that rio's requirements for
    text windows applies to windows that won't be
    managed by rio.

    The right solution is to fix libframe to gracefully handle
    the case where the window has no room for text.

    > I experimented a little bit to find a work arround to this problem. I
    > added code to rio
    > to not making windows smaller than 100 x (3*font->height), but if you
    > make rio bigger again
    > (after shrinking) the window gets too big. So i think about just not to
    > scale subwindows at all
    > to preserve position and size of the subwindows.


    It's nice that rio shrinks the subwindows when you
    resize. It just needs to be able to handle the consequences.

    Russ


+ Reply to Thread