Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35

Thread: GNOME Terminal Gets Text Rewrap On Resizing

  1. #21
    Join Date
    Dec 2013
    Posts
    6

    Default

    Quote Originally Posted by Akka View Post
    How can anyone use a transparent terminal?
    If the clean up of the code base resulted in the rewrap functionality the loss of transparency was a good sacrifice.
    Small monitor (laptop/netbook) & reading/applying documentation. Having a cheat sheet for new/seldomly used software in the background (vim, tmux).
    I'm a software developer and I can totally understand that they wanted to get rid of a badly written codebase, but transparency is a essential feature for me.

  2. #22
    Join Date
    Apr 2010
    Posts
    770

    Default

    Quote Originally Posted by oleid View Post
    I'm wondering if this transparency was portable to wayland, anyway.
    I suspect not. I don't know about how gnome-terminal did it (I've never used that feature), but the approach taken elsewhere is pretty hacky. You can't get real transparency, so what they do is basically take a screenshot, and use that as a background image for the window. And that's definitely something that would be suspect under Wayland - it's a real security issue, for starters - and I know that with the port to Wayland, the Gnome screen capture tool had to be re-written such that the compositor does most of the work.

    The correct way to do it would be for the application to integrate with the compositor, requesting non-opaque blending for a particular region of the window... but I imagine that would need a bit of work to pull off.

  3. #23
    Join Date
    Sep 2011
    Posts
    277

    Default

    Quote Originally Posted by Delgarde View Post
    I suspect not. I don't know about how gnome-terminal did it (I've never used that feature), but the approach taken elsewhere is pretty hacky. You can't get real transparency, so what they do is basically take a screenshot, and use that as a background image for the window. And that's definitely something that would be suspect under Wayland - it's a real security issue, for starters - and I know that with the port to Wayland, the Gnome screen capture tool had to be re-written such that the compositor does most of the work.

    The correct way to do it would be for the application to integrate with the compositor, requesting non-opaque blending for a particular region of the window... but I imagine that would need a bit of work to pull off.
    fwiw, the screenshot-the-desktop approach is just fallback if you don't have a proper compositing window mgr.. and ARGB windows/surfaces are completely possible with wayland, probably easier since you don't have to worry so much about fallback paths (ie. non-compositing window mgr, etc)

    BR,
    -R

  4. #24
    Join Date
    Apr 2010
    Posts
    770

    Default

    Quote Originally Posted by robclark View Post
    fwiw, the screenshot-the-desktop approach is just fallback if you don't have a proper compositing window mgr.. and ARGB windows/surfaces are completely possible with wayland, probably easier since you don't have to worry so much about fallback paths (ie. non-compositing window mgr, etc)
    How does it work, for the application to declare that *part* of the window is, say, "black, 80% opaque"? It's easy for a compositor to automatically make an entire window translucent, or to make the window decorations and border glassy (like Windows 7 does), but it's much harder for the application to tell the compositor that "everything is opaque except for this bit in the middle"...

  5. #25
    Join Date
    Nov 2013
    Posts
    45

    Default

    Quote Originally Posted by Delgarde View Post
    How does it work, for the application to declare that *part* of the window is, say, "black, 80% opaque"? It's easy for a compositor to automatically make an entire window translucent, or to make the window decorations and border glassy (like Windows 7 does), but it's much harder for the application to tell the compositor that "everything is opaque except for this bit in the middle"...
    I don't know too much about wayland. Wayland doesn't draw on behalf of the clients, and the client does all the drawing themselves, that's where my idea comes from. What I want to ask is: considering the above, does "drawing" include alpha information? If so, then does it mean that the client can control the transparency of different parts of its window?

  6. #26
    Join Date
    Oct 2013
    Posts
    1

    Default

    Quote Originally Posted by Delgarde View Post
    How does it work, for the application to declare that *part* of the window is, say, "black, 80% opaque"? It's easy for a compositor to automatically make an entire window translucent, or to make the window decorations and border glassy (like Windows 7 does), but it's much harder for the application to tell the compositor that "everything is opaque except for this bit in the middle"...
    I don't know for sure, but I think what Rob's alluding to is the compositor should/could use the alpha transparency the application draws it's background with to do the blending. So if the alpha is 50% (128, 0x80) then the background will be blended 50% with what's behind it.

  7. #27
    Join Date
    Sep 2007
    Posts
    327

    Default

    Quote Originally Posted by robclark View Post
    fwiw, the screenshot-the-desktop approach is just fallback if you don't have a proper compositing window mgr.. and ARGB windows/surfaces are completely possible with wayland, probably easier since you don't have to worry so much about fallback paths (ie. non-compositing window mgr, etc)
    The fallback for the non-composed desktop was not using a screenshot, but the current desktop wallpaper. I don't know how the composed case worked, though.

    I don't know for sure, but I think what Rob's alluding to is the compositor should/could use the alpha transparency the application draws it's background with to do the blending. So if the alpha is 50% (128, 0x80) then the background will be blended 50% with what's behind it.
    That would be the cleanest solution, IMHO. It might work for wayland, but I have a feeling it won't work for X11. AFAIR X11-windows are opaque, however, you can make the whole window transparent.

  8. #28
    Join Date
    Nov 2010
    Location
    Stockholm, Sweden
    Posts
    411

    Default

    This is fantastic! But I guess it has a performance impact, the terminal has to keep all the output in a buffer of some sort, and reprint it to the new size of the terminal. Before, the terminal could just render the output, and then throw the text strings away, right? Or have they always kept the actual strings in memory?

  9. #29
    Join Date
    Sep 2011
    Posts
    277

    Default

    Quote Originally Posted by Delgarde View Post
    How does it work, for the application to declare that *part* of the window is, say, "black, 80% opaque"? It's easy for a compositor to automatically make an entire window translucent, or to make the window decorations and border glassy (like Windows 7 does), but it's much harder for the application to tell the compositor that "everything is opaque except for this bit in the middle"...
    surfaces can be ARGB, so if a app wants part of a window to be translucent, it just plugs in appropriate alpha component value

    (application can declare an opaque-region, but that is simply an optimization hint for the compositor)

  10. #30
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    5,182

    Default

    Quote Originally Posted by Azpegath View Post
    This is fantastic! But I guess it has a performance impact, the terminal has to keep all the output in a buffer of some sort, and reprint it to the new size of the terminal. Before, the terminal could just render the output, and then throw the text strings away, right? Or have they always kept the actual strings in memory?
    They keep them in the rollback buffer, but reflowing is some additional complexity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •