summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 22:42:23 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 22:42:23 -0400
commit67a9a9459633dcf11ca4c37dc224ce8f9a8945b6 (patch)
tree92f7a6ccf259d521a3f11c16a924a5a093a0751b
parentRevert "Merge pull request #952 from SirCmpwn/revert-948-floating-titlebar-cl... (diff)
downloadsway-67a9a9459633dcf11ca4c37dc224ce8f9a8945b6.tar.gz
sway-67a9a9459633dcf11ca4c37dc224ce8f9a8945b6.tar.zst
sway-67a9a9459633dcf11ca4c37dc224ce8f9a8945b6.zip
Overwrite alpha when drawing borders
This does two important things when using alpha: 1. At corners, borders don't double in opacity 2. Foreground elements (text) can be made transparent and you can see fully through to the wallpaper
-rw-r--r--sway/border.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/border.c b/sway/border.c
index db1a3836..c96ae6fe 100644
--- a/sway/border.c
+++ b/sway/border.c
@@ -46,6 +46,7 @@ static cairo_t *create_border_buffer(swayc_t *view, struct wlc_geometry g, cairo
46 return NULL; 46 return NULL;
47 } 47 }
48 cr = cairo_create(*surface); 48 cr = cairo_create(*surface);
49 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
49 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS) { 50 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS) {
50 cairo_surface_destroy(*surface); 51 cairo_surface_destroy(*surface);
51 border_clear(view->border); 52 border_clear(view->border);