After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614507 - add a radius to workspace corners
add a radius to workspace corners
Status: RESOLVED DUPLICATE of bug 642697
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-31 20:50 UTC by William Jon McCann
Modified: 2011-02-18 18:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
(WIP) Add rounded corners to workspaces (2.82 KB, patch)
2010-04-01 19:35 UTC, drago01
none Details | Review
(WIP) Add rounded corners to workspaces (2.90 KB, patch)
2010-04-02 21:52 UTC, drago01
rejected Details | Review

Description William Jon McCann 2010-03-31 20:50:12 UTC
I'd like to try adding a radius to workspace corners:

http://people.gnome.org/~mccann/screenshots/clips/20100331202800/shell-mockup-overview.png
http://people.gnome.org/~mccann/screenshots/clips/20100331202800/shell-mockup-desktop.png

Eventually we'll want to explore how we can modify windows to work together with this but for now probably just the wallpaper is ok.
Comment 1 drago01 2010-04-01 19:35:37 UTC
Created attachment 157716 [details] [review]
(WIP) Add rounded corners to workspaces

Note this does not work in we'd want it to as it just draws directly to the root window pixmap which does not interact well with nautilus drawing the desktop.

We probably should add a new META_LAYER for drawing the corners.

Another issue is dealing with the top panel. (no idea what's the best approach here).
Comment 2 Dan Winship 2010-04-01 20:00:16 UTC
if nautilus is drawing the desktop then we can just change the way we render the corresponding MutterWindow.

not sure what you mean about "dealing with the top panel"
Comment 3 drago01 2010-04-01 20:04:38 UTC
(In reply to comment #2)
> if nautilus is drawing the desktop then we can just change the way we render
> the corresponding MutterWindow.
> 
> not sure what you mean about "dealing with the top panel"

Well the top of the root window is under the top panel. Jon didn't like that he wanted it to be part of the visible workspace, just adding a PANEL_HEIGHT offset wouldn't work because in the overview we show the whole pixmap (including the area under the panel).
Comment 4 William Jon McCann 2010-04-01 20:13:29 UTC
See bug 591442 for the under top bar thing.
Comment 5 drago01 2010-04-02 21:52:26 UTC
Created attachment 157774 [details] [review]
(WIP) Add rounded corners to workspaces

*) Use floor to have better looking edges
Comment 6 William Jon McCann 2010-05-12 19:11:21 UTC
Doesn't seem to handle when I add a new monitor yet.
Comment 7 drago01 2010-05-12 20:03:03 UTC
(In reply to comment #6)
> Doesn't seem to handle when I add a new monitor yet.

Yeah it doesn't because it would conflict with what we show in the overview right now (we should only use the primary monitor for the background; not the whole screen).
Comment 8 Owen Taylor 2010-06-08 19:58:27 UTC
Can we clarify what the desired appearance is in the main view? In particular, does this affect only the wallpaper and not maximized applications?

I think in general we want to do this by drawing little black corner pieces rather than drawing on the root pixmap.

For the case of nautilus, positioning the little black corner pieces above the nautilus window probably requires mutter API additions (previous discussions were about having some way of adding actors between two window layers)

In the overview, I think the secret to getting things to look OK while animating is to draw the corner piece to look something like:

 +------------+
 |############|
 |#######_----+----------
 |#### . 
 |### /
 |###| 
 +---+
     |
     |
     |


That is, to extend maybe 2 pixels beyond the corner of the window so that you don't get corner of the window appearing beyond the corner of the black corner piece if rounding goes wrong.
Comment 9 Owen Taylor 2010-06-08 19:59:12 UTC
Review of attachment 157774 [details] [review]:

As noted in the comment, don't think this is the right approach - it's too inflexible.
Comment 10 Florian Müllner 2010-06-08 20:39:05 UTC
(In reply to comment #8)
> I think in general we want to do this by drawing little black corner pieces
> rather than drawing on the root pixmap.

... which will be tricky if the background does not have a uniform color (see bug 618479)
Comment 11 Owen Taylor 2010-06-08 20:49:55 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > I think in general we want to do this by drawing little black corner pieces
> > rather than drawing on the root pixmap.
> 
> ... which will be tricky if the background does not have a uniform color (see
> bug 618479)

Oh. Another approach you can do is draw the pixmap or background in 9 pieces


 +----+---------------------------------+----+
 |    |                                 |    |
 +----+---------------------------------+----+
 |    |                                 |    |
 |    |                                 |    |
 +----+---------------------------------+----+
 |    |                                 |    |
 +----+---------------------------------+----+

And use multitexturing to blend the corners with an alpha mask. You can even use the same alpha mask for all 4 corners, and just flip it around as necessary (You could also create an alpha mask the side of the drawn area, but that's going to hurt performance and waste a fair bit of memory.)
Comment 12 Florian Müllner 2010-06-08 21:04:52 UTC
(In reply to comment #11)
> [...] and use multitexturing to blend the corners with an alpha mask. You can even
> use the same alpha mask for all 4 corners, and just flip it around as necessary
> (You could also create an alpha mask the side of the drawn area, but that's
> going to hurt performance and waste a fair bit of memory.)

OK, this is not my bug, but: would this be material for a yet-to-be-written StImage actor? The above would then "simply" kick in if the border-radius property is non-zero.
Comment 13 drago01 2011-02-18 18:37:13 UTC

*** This bug has been marked as a duplicate of bug 642697 ***