[metacity] compositor: remove MetaScreen parameter from make_shadow
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: remove MetaScreen parameter from make_shadow
- Date: Sat, 4 Mar 2017 16:49:25 +0000 (UTC)
commit 28309e9cca5d4222b07320929f82cd20b5dad56a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 4 16:23:18 2017 +0200
compositor: remove MetaScreen parameter from make_shadow
src/compositor/meta-compositor-xrender.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 083a69c..76886d0 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -421,7 +421,6 @@ generate_shadows (MetaCompositorXRender *xrender)
static XImage *
make_shadow (MetaCompositorXRender *xrender,
MetaDisplay *display,
- MetaScreen *screen,
MetaShadowType shadow_type,
double opacity,
int width,
@@ -439,7 +438,7 @@ make_shadow (MetaCompositorXRender *xrender,
guchar d;
int x_diff;
int opacity_int = (int)(opacity * 25);
- int screen_number = meta_screen_get_screen_number (screen);
+ int screen_number;
shad = xrender->shadows[shadow_type];
msize = shad->gaussian_map->size;
@@ -449,6 +448,7 @@ make_shadow (MetaCompositorXRender *xrender,
data = g_malloc (swidth * sheight * sizeof (guchar));
+ screen_number = DefaultScreen (xdisplay);
ximage = XCreateImage (xdisplay, DefaultVisual (xdisplay, screen_number),
8, ZPixmap, 0, (char *) data,
swidth, sheight, 8, swidth * sizeof (guchar));
@@ -679,8 +679,9 @@ shadow_picture (MetaCompositorXRender *xrender,
Window xroot = meta_screen_get_xroot (screen);
GC gc;
- shadow_image = make_shadow (xrender, display, screen, cw->shadow_type,
+ shadow_image = make_shadow (xrender, display, cw->shadow_type,
opacity, width, height);
+
if (!shadow_image)
return None;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]