[EGIT] [legacy/imlib2] master 05/05: Eliminate READ_RGBA()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=484bd5cc79500d6f345b6bd0bd624d94b467bc65 commit 484bd5cc79500d6f345b6bd0bd624d94b467bc65 Author: Kim Woelders Date: Sat Nov 9 08:04:05 2019 +0100 Eliminate READ_RGBA() --- src/lib/blend.h | 15 --- src/lib/grad.c | 28 ++-- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/lib/blend.h b/src/lib/blend.h index c848fba..d589833 100644 --- a/src/lib/blend.h +++ b/src/lib/blend.h @@ -19,21 +19,6 @@ #endif -/* FIXME: endian dependent */ -#define READ_RGB(p, r, g, b) \ - (r) = R_VAL(p); \ - (g) = G_VAL(p); \ - (b) = B_VAL(p); - -#define READ_ALPHA(p, a) \ - (a) = A_VAL(p); - -#define READ_RGBA(p, r, g, b, a) \ - (r) = R_VAL(p); \ - (g) = G_VAL(p); \ - (b) = B_VAL(p); \ - (a) = A_VAL(p); - #define INTERSECTS(x, y, w, h, xx, yy, ww, hh) \ ((x < (xx + ww)) && \ (y < (yy + hh)) && \ diff --git a/src/lib/grad.c b/src/lib/grad.c index b5085b2..5686a9e 100644 --- a/src/lib/grad.c +++ b/src/lib/grad.c @@ -8,6 +8,14 @@ #include "grad.h" #include "image.h" +#define ARGB_TO_R_G_B_A(argb, r, g, b, a) \ +do { \ +r = PIXEL_R(argb); \ +g = PIXEL_G(argb); \ +b = PIXEL_B(argb); \ +a = PIXEL_A(argb); \ +} while(0) + ImlibRange * __imlib_CreateRange(void) { @@ -334,7 +342,7 @@ __imlib_DrawGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_DST_ALPHA(r, g, b, a, p); p++; } @@ -352,7 +360,7 @@ __imlib_DrawGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND(r, g, b, a, p); p++; } @@ -370,7 +378,7 @@ __imlib_DrawGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_SUB(r, g, b, a, p); p++; } @@ -387,7 +395,7 @@ __imlib_DrawGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_SUB(r, g, b, a, p); p++; } @@ -404,7 +412,7 @@ __imlib_DrawGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_RE(r, g, b, a, p); p++; } @@ -527,7 +535,7 @@ __imlib_DrawHsvaGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_DST_ALPHA(r, g, b, a, p); p++; } @@ -545,7 +553,7 @@ __imlib_DrawHsvaGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND(r, g, b, a, p); p++; } @@ -563,7 +571,7 @@ __imlib_DrawHsvaGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_SUB(r, g, b, a, p); p++; } @@ -580,7 +588,7 @@ __imlib_DrawHsvaGradient(ImlibImage * im, int x, int y, int w, int h, i = 0; else if (i >= len) i = len - 1; - READ_RGBA(&(map[i]), r, g, b, a); + ARGB_TO_R_G_B_A(map[i], r, g, b, a); BLEND_SUB(r, g, b,
[EGIT] [legacy/imlib2] master 04/05: Use macro for pixel color access in savers
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=3e082b2310c02d086e4ee2c4f6d96ea74b44a79c commit 3e082b2310c02d086e4ee2c4f6d96ea74b44a79c Author: Kim Woelders Date: Sat Nov 9 07:48:34 2019 +0100 Use macro for pixel color access in savers --- src/lib/common.h | 5 + src/modules/loaders/loader_bmp.c | 6 +++--- src/modules/loaders/loader_jpeg.c | 9 + src/modules/loaders/loader_png.c | 9 ++--- src/modules/loaders/loader_pnm.c | 20 +++- src/modules/loaders/loader_tga.c | 22 ++ src/modules/loaders/loader_tiff.c | 8 7 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/lib/common.h b/src/lib/common.h index 201df30..0df2338 100644 --- a/src/lib/common.h +++ b/src/lib/common.h @@ -40,6 +40,11 @@ #define PIXEL_ARGB(a, r, g, b) ((a) << 24) | ((r) << 16) | ((g) << 8) | (b) +#define PIXEL_A(argb) (((argb) >> 24) & 0xff) +#define PIXEL_R(argb) (((argb) >> 16) & 0xff) +#define PIXEL_G(argb) (((argb) >> 8) & 0xff) +#define PIXEL_B(argb) (((argb) ) & 0xff) + #ifdef DO_MMX_ASM int __imlib_get_cpuid(void); diff --git a/src/modules/loaders/loader_bmp.c b/src/modules/loaders/loader_bmp.c index 0193cb9..fc868fa 100644 --- a/src/modules/loaders/loader_bmp.c +++ b/src/modules/loaders/loader_bmp.c @@ -941,9 +941,9 @@ save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) for (j = 0; j < im->w; j++) { pixel = im->data[im->w * (im->h - i - 1) + j]; - WriteleByte(f, pixel & 0xff); - WriteleByte(f, (pixel >> 8) & 0xff); - WriteleByte(f, (pixel >> 16) & 0xff); + WriteleByte(f, PIXEL_B(pixel)); + WriteleByte(f, PIXEL_G(pixel)); + WriteleByte(f, PIXEL_R(pixel)); } for (j = 0; j < pad; j++) WriteleByte(f, 0); diff --git a/src/modules/loaders/loader_jpeg.c b/src/modules/loaders/loader_jpeg.c index 314b61d..3957987 100644 --- a/src/modules/loaders/loader_jpeg.c +++ b/src/modules/loaders/loader_jpeg.c @@ -286,10 +286,11 @@ save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) /* convcert scaline from ARGB to RGB packed */ for (j = 0, i = 0; i < im->w; i++) { - buf[j++] = ((*ptr) >> 16) & 0xff; - buf[j++] = ((*ptr) >> 8) & 0xff; - buf[j++] = ((*ptr)) & 0xff; - ptr++; + DATA32 pixel = *ptr++; + + buf[j++] = PIXEL_R(pixel); + buf[j++] = PIXEL_G(pixel); + buf[j++] = PIXEL_B(pixel); } /* write scanline */ jbuf = (JSAMPROW *) (); diff --git a/src/modules/loaders/loader_png.c b/src/modules/loaders/loader_png.c index fb9541f..a6533e5 100644 --- a/src/modules/loaders/loader_png.c +++ b/src/modules/loaders/loader_png.c @@ -347,13 +347,16 @@ save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) { for (j = 0, x = 0; x < im->w; x++) { - data[j++] = (ptr[x] >> 16) & 0xff; - data[j++] = (ptr[x] >> 8) & 0xff; - data[j++] = (ptr[x]) & 0xff; + DATA32 pixel = ptr[x]; + + data[j++] = PIXEL_R(pixel); + data[j++] = PIXEL_G(pixel); + data[j++] = PIXEL_B(pixel); } row_ptr = (png_bytep) data; } png_write_rows(png_ptr, _ptr, 1); + if (progress) { charper; diff --git a/src/modules/loaders/loader_pnm.c b/src/modules/loaders/loader_pnm.c index 1b63b3c..b29c626 100644 --- a/src/modules/loaders/loader_pnm.c +++ b/src/modules/loaders/loader_pnm.c @@ -467,12 +467,13 @@ save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) bptr = buf; for (x = 0; x < im->w; x++) { - bptr[0] = ((*ptr) >> 16) & 0xff; - bptr[1] = ((*ptr) >> 8) & 0xff; - bptr[2] = ((*ptr)) & 0xff; - bptr[3] = ((*ptr) >> 24) & 0xff; + DATA32 pixel = *ptr++; + + bptr[0] = PIXEL_R(pixel); + bptr[1] = PIXEL_G(pixel); + bptr[2] = PIXEL_B(pixel); + bptr[3] = PIXEL_A(pixel); bptr += 4; - ptr++; } fwrite(buf, im->w * 4, 1, f); if (progress && @@ -495,11 +496,12 @@ save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) bptr = buf; for (x = 0; x < im->w; x++) { - bptr[0] = ((*ptr) >> 16) &
[EGIT] [legacy/imlib2] master 03/05: Use pixel instead of r, b, g, a in __imlib_render_str()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=755dc017f26e4756fed3402abaeac3598afc6817 commit 755dc017f26e4756fed3402abaeac3598afc6817 Author: Kim Woelders Date: Sat Nov 9 07:23:09 2019 +0100 Use pixel instead of r,b,g,a in __imlib_render_str() --- src/lib/api.c | 4 +--- src/lib/font.h | 3 +-- src/lib/font_draw.c | 11 --- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib/api.c b/src/lib/api.c index 062a71b..3476aa1 100644 --- a/src/lib/api.c +++ b/src/lib/api.c @@ -3299,9 +3299,7 @@ imlib_text_draw_with_return_metrics(int x, int y, const char *text, if (ctx->direction == IMLIB_TEXT_TO_ANGLE && ctx->angle == 0.0) dir = IMLIB_TEXT_TO_RIGHT; - __imlib_render_str(im, fn, x, y, text, (DATA8) ctx->color.red, - (DATA8) ctx->color.green, (DATA8) ctx->color.blue, - (DATA8) ctx->color.alpha, (char)dir, + __imlib_render_str(im, fn, x, y, text, ctx->pixel, dir, ctx->angle, width_return, height_return, 0, horizontal_advance_return, vertical_advance_return, ctx->operation, diff --git a/src/lib/font.h b/src/lib/font.h index 8b94141..af791c3 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -104,8 +104,7 @@ int __imlib_font_query_text_at_pos(ImlibFont * fn, Imlib_Font_Glyph *__imlib_font_cache_glyph_get(ImlibFont * fn, FT_UInt index); void__imlib_render_str(ImlibImage * im, ImlibFont * f, int drx, int dry, const char *text, - DATA8 r, DATA8 g, DATA8 b, DATA8 a, - char dir, double angle, + DATA32 pixel, int dir, double angle, int *retw, int *reth, int blur, int *nextx, int *nexty, ImlibOp op, int clx, int cly, int clw, int clh); diff --git a/src/lib/font_draw.c b/src/lib/font_draw.c index 7faac47..ea49e14 100644 --- a/src/lib/font_draw.c +++ b/src/lib/font_draw.c @@ -68,14 +68,14 @@ __imlib_font_cache_glyph_get(ImlibFont * fn, FT_UInt index) void __imlib_render_str(ImlibImage * im, ImlibFont * fn, int drx, int dry, - const char *text, DATA8 r, DATA8 g, DATA8 b, DATA8 a, - char dir, double angle, int *retw, int *reth, int blur, + const char *text, DATA32 pixel, int dir, double angle, + int *retw, int *reth, int blur, int *nextx, int *nexty, ImlibOp op, int clx, int cly, int clw, int clh) { int w, h, ascent; ImlibImage *im2; - DATA32 *data, col; + DATA32 *data; int nx, ny; __imlib_font_query_advance(fn, text, , NULL); @@ -95,12 +95,9 @@ __imlib_render_str(ImlibImage * im, ImlibFont * fn, int drx, int dry, } SET_FLAG(im2->flags, F_HAS_ALPHA); - /* TODO check for endianess */ - col = PIXEL_ARGB(a, r, g, b); - ascent = __imlib_font_max_ascent_get(fn); - __imlib_font_draw(im2, col, fn, 0, ascent, text, , , 0, 0, w, h); + __imlib_font_draw(im2, pixel, fn, 0, ascent, text, , , 0, 0, w, h); /* OK, now we have small ImlibImage with text rendered, * have to blend it on im */ --
[EGIT] [legacy/imlib2] master 01/05: Simplify autogen.sh
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=9f5af1341b912bbff88d09a8ed3093d6f475b6ee commit 9f5af1341b912bbff88d09a8ed3093d6f475b6ee Author: Kim Woelders Date: Sat Nov 9 06:16:35 2019 +0100 Simplify autogen.sh --- autogen.sh | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/autogen.sh b/autogen.sh index 753a7d3..0d43361 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,13 +1,9 @@ #!/bin/sh +# Run this to generate all the initial makefiles, etc. -rm -rf autom4te.cache -rm -f aclocal.m4 ltmain.sh +rm -rf autom4te.cache aclocal.m4 -echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 -echo "Running autoheader..." ; autoheader || exit 1 -echo "Running autoconf..." ; autoconf || exit 1 -echo "Running libtoolize..." ; (libtoolize --copy --automake $LIBTOOL_FLAGS || glibtoolize --automake) || exit 1 -echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 +autoreconf -vif if [ -z "$NOCONFIGURE" ]; then ./configure "$@" --
[EGIT] [legacy/imlib2] master 02/05: Simplify pixel color handling in api.c
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=e6269a9b9b1faceeb0c0f21a4a9aaea27facb32b commit e6269a9b9b1faceeb0c0f21a4a9aaea27facb32b Author: Kim Woelders Date: Fri Nov 8 21:14:18 2019 +0100 Simplify pixel color handling in api.c --- src/lib/api.c | 96 --- 1 file changed, 39 insertions(+), 57 deletions(-) diff --git a/src/lib/api.c b/src/lib/api.c index 58044e1..062a71b 100644 --- a/src/lib/api.c +++ b/src/lib/api.c @@ -94,6 +94,7 @@ struct _imlibcontext { Imlib_Text_Direction direction; double angle; Imlib_Color color; + DATA32 pixel; Imlib_Color_Range color_range; Imlib_Image image; Imlib_Image_Data_Memory_Function image_data_memory_func; @@ -187,6 +188,7 @@ imlib_context_new(void) context->color.red = 255; context->color.green = 255; context->color.blue = 255; + context->pixel = 0x; context->color_range = NULL; context->image = NULL; context->image_data_memory_func = NULL; @@ -842,11 +844,21 @@ imlib_context_get_direction(void) EAPI void imlib_context_set_color(int red, int green, int blue, int alpha) { + DATA8 r, g, b, a; + CHECK_CONTEXT(ctx); - ctx->color.red = red; - ctx->color.green = green; - ctx->color.blue = blue; - ctx->color.alpha = alpha; + + r = red; + g = green; + b = blue; + a = alpha; + + ctx->color.red = r; + ctx->color.green = g; + ctx->color.blue = b; + ctx->color.alpha = a; + + ctx->pixel = PIXEL_ARGB(a, r, g, b); } /** @@ -973,11 +985,21 @@ imlib_context_get_color_hlsa(float *hue, float *lightness, float *saturation, EAPI void imlib_context_set_color_cmya(int cyan, int magenta, int yellow, int alpha) { + DATA8 r, g, b, a; + CHECK_CONTEXT(ctx); - ctx->color.red = 255 - cyan; - ctx->color.green = 255 - magenta; - ctx->color.blue = 255 - yellow; - ctx->color.alpha = alpha; + + r = 255 - cyan; + g = 255 - magenta; + b = 255 - yellow; + a = alpha; + + ctx->color.red = r; + ctx->color.green = g; + ctx->color.blue = b; + ctx->color.alpha = a; + + ctx->pixel = PIXEL_ARGB(a, r, g, b); } /** @@ -4028,7 +4050,6 @@ EAPIImlib_Updates imlib_image_draw_pixel(int x, int y, char make_updates) { ImlibImage *im; - DATA32 color; CHECK_CONTEXT(ctx); CHECK_PARAM_POINTER_RETURN("imlib_image_draw_pixel", "image", ctx->image, @@ -4037,11 +4058,7 @@ imlib_image_draw_pixel(int x, int y, char make_updates) if (__imlib_LoadImageData(im)) return NULL; __imlib_DirtyImage(im); - A_VAL() = (DATA8) ctx->color.alpha; - R_VAL() = (DATA8) ctx->color.red; - G_VAL() = (DATA8) ctx->color.green; - B_VAL() = (DATA8) ctx->color.blue; - return (Imlib_Updates) __imlib_Point_DrawToImage(x, y, color, im, + return (Imlib_Updates) __imlib_Point_DrawToImage(x, y, ctx->pixel, im, ctx->cliprect.x, ctx->cliprect.y, ctx->cliprect.w, @@ -4068,7 +4085,6 @@ EAPIImlib_Updates imlib_image_draw_line(int x1, int y1, int x2, int y2, char make_updates) { ImlibImage *im; - DATA32 color; CHECK_CONTEXT(ctx); CHECK_PARAM_POINTER_RETURN("imlib_image_draw_line", "image", ctx->image, @@ -4077,12 +4093,8 @@ imlib_image_draw_line(int x1, int y1, int x2, int y2, char make_updates) if (__imlib_LoadImageData(im)) return NULL; __imlib_DirtyImage(im); - A_VAL() = (DATA8) ctx->color.alpha; - R_VAL() = (DATA8) ctx->color.red; - G_VAL() = (DATA8) ctx->color.green; - B_VAL() = (DATA8) ctx->color.blue; - return (Imlib_Updates) __imlib_Line_DrawToImage(x1, y1, x2, y2, color, im, - ctx->cliprect.x, + return (Imlib_Updates) __imlib_Line_DrawToImage(x1, y1, x2, y2, ctx->pixel, + im, ctx->cliprect.x, ctx->cliprect.y, ctx->cliprect.w, ctx->cliprect.h, @@ -4106,7 +4118,6 @@ EAPI void imlib_image_draw_rectangle(int x, int y, int width, int height) { ImlibImage *im; - DATA32 color; CHECK_CONTEXT(ctx); CHECK_PARAM_POINTER("imlib_image_draw_rectangle", "image", ctx->image); @@ -4114,11 +4125,7 @@ imlib_image_draw_rectangle(int x, int y, int width, int height) if (__imlib_LoadImageData(im)) return; __imlib_DirtyImage(im); - A_VAL() = (DATA8) ctx->color.alpha; - R_VAL() = (DATA8) ctx->color.red; - G_VAL() = (DATA8) ctx->color.green; - B_VAL() = (DATA8) ctx->color.blue; - __imlib_Rectangle_DrawToImage(x, y, width,
[EGIT] [core/efl] feature/themes/flat 01/01: TH - pkgkit improve
raster pushed a commit to branch feature/themes/flat. http://git.enlightenment.org/core/efl.git/commit/?id=5d13e41f6c130841ee3e8af143f65b0880bd7d68 commit 5d13e41f6c130841ee3e8af143f65b0880bd7d68 Author: Carsten Haitzler (Rasterman) Date: Sat Nov 9 20:58:20 2019 + TH - pkgkit improve --- data/elementary/themes/img/package.svg | 174 ++-- data/elementary/themes/img/pkg-base.png | Bin 2229 -> 3693 bytes 2 files changed, 101 insertions(+), 73 deletions(-) diff --git a/data/elementary/themes/img/package.svg b/data/elementary/themes/img/package.svg index 96e8b7bf26..a43b08fdf4 100644 --- a/data/elementary/themes/img/package.svg +++ b/data/elementary/themes/img/package.svg @@ -7,6 +7,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:svg="http://www.w3.org/2000/svg; xmlns="http://www.w3.org/2000/svg; + xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape; id="svg2" @@ -16,9 +17,9 @@ height="40" viewBox="0 0 40 40" sodipodi:docname="package.svg" - inkscape:export-filename="/home/raster/C/th-efl/th/img/eth.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-filename="/home/raster/C/th-efl/th/img/pkg-base.png" + inkscape:export-xdpi="384" + inkscape:export-ydpi="384"> @@ -32,7 +33,64 @@ + id="defs6"> + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + diff --git a/data/elementary/themes/img/pkg-base.png b/data/elementary/themes/img/pkg-base.png index 4c390dfae7..28d22548a1 100644 Binary files a/data/elementary/themes/img/pkg-base.png and b/data/elementary/themes/img/pkg-base.png differ --
[EGIT] [core/enlightenment] master 01/01: steam - special workaround for bad steam games so they match desktops
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=60324a7b2c58eb9e4fd177022dc162c8659e816a commit 60324a7b2c58eb9e4fd177022dc162c8659e816a Author: Carsten Haitzler (Rasterman) Date: Sun Nov 10 01:33:39 2019 + steam - special workaround for bad steam games so they match desktops many steam games don't provide much in properites - not enough to match to a desktop file. the only thing that actually consistently works is to use the STEAM_GAME property and match thyat to the uri provided to the steam command in the exec of the desktop file. this actually can work. nothing else works reliably across the board. and man can games be horrible and playing nice with desktops and having poor properties. even steam itself is not good. i had to add a workaround for that too to match steam-runtime explicitly. :( --- src/bin/e_client.c | 33 - src/bin/e_client.h | 4 src/bin/e_comp_x.c | 8 src/bin/e_hints.c | 20 src/bin/e_hints.h | 3 +++ 5 files changed, 67 insertions(+), 1 deletion(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index c1d84835b..2b2bcf696 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2193,6 +2193,29 @@ _e_client_eval(E_Client *ec) ec->desktop = d; } } +if (!ec->desktop) + { + if (ec->steam.steam_game_id) + { + Efreet_Desktop *d; + Eina_List *desks = efreet_util_desktop_name_glob_list("*"); + EINA_LIST_FREE(desks, d) +{ + if (!d->exec) continue; + if (!strncmp(d->exec, "steam ", 6)) + { +const char *st = strstr(d->exec, "steam://rungameid/"); +if (st) + { + st += strlen("steam://rungameid/"); + unsigned int id = atoi(st); + if (id == ec->steam.steam_game_id) + ec->desktop = d; + } + } +} + } + } if (!ec->desktop) { E_Exec_Instance *inst; @@ -2227,9 +2250,17 @@ _e_client_eval(E_Client *ec) } if (!ec->desktop) { + // special case hacks for specific apps that just don't do things + // right so we have to work around them + if (ec->icccm.class && ec->icccm.name && + (!strcmp(ec->icccm.class, "Steam")) && + (!strcmp(ec->icccm.name, "Steam"))) + { + ec->desktop = efreet_util_desktop_file_id_find("steam.desktop"); + } /* libreoffice and maybe others match window class with .desktop file name */ - if (ec->icccm.class) + else if (ec->icccm.class) { char buf[4096] = {0}; snprintf(buf, sizeof(buf), "%s.desktop", ec->icccm.class); diff --git a/src/bin/e_client.h b/src/bin/e_client.h index ceae23994..adb98fca1 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -568,6 +568,10 @@ struct E_Client unsigned char have_property E_BITFIELD; unsigned char vkbd E_BITFIELD; } vkbd; + + struct { + unsigned int steam_game_id; + } steam; struct { diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 0835ee912..21d139a7f 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -560,6 +560,8 @@ _e_comp_x_client_new_helper(E_Client *ec) ec->e.fetch.stack = 1; else if (atoms[i] == ATM_GTK_FRAME_EXTENTS) ec->comp_data->fetch_gtk_frame_extents = 1; + else if (atoms[i] == ATM_STEAM_GAME) + e_hints_window_steam_game_get(ec); else if (ec->re_manage) { if (atoms[i] == E_ATOM_DESKTOP_FILE) @@ -2200,6 +2202,12 @@ _e_comp_x_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_W _e_comp_x_client_data_get(ec)->fetch_gtk_frame_extents = 1; EC_CHANGED(ec); } + else if (ev->atom == ATM_STEAM_GAME) + { +e_hints_window_steam_game_get(ec); +ec->changes.icon = 1; +EC_CHANGED(ec); + } return ECORE_CALLBACK_RENEW; } diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index f1b8f6125..eabf467a7 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -15,6 +15,8 @@ E_API Ecore_X_Atom ATM_ENLIGHTENMENT_SCALE = 0; E_API Ecore_X_Atom ATM_NETWM_SHOW_WINDOW_MENU = 0; E_API Ecore_X_Atom ATM_NETWM_PERFORM_BUTTON_ACTION = 0; E_API Ecore_X_Atom
[EGIT] [core/efl] feature/themes/flat 01/02: TH - entry magnifier and handles
raster pushed a commit to branch feature/themes/flat. http://git.enlightenment.org/core/efl.git/commit/?id=ffdaabc0ade5d0090f5a47f1feb06fc13af9a547 commit ffdaabc0ade5d0090f5a47f1feb06fc13af9a547 Author: Carsten Haitzler (Rasterman) Date: Sat Nov 9 21:43:26 2019 + TH - entry magnifier and handles --- data/elementary/themes/edc/elm/entry.edc | 60 --- data/elementary/themes/img/handle_pick_up_left.png | Bin 1348 -> 237 bytes data/elementary/themes/img/handle_pick_up_left.svg | 65 + .../elementary/themes/img/handle_pick_up_right.png | Bin 1367 -> 222 bytes 4 files changed, 89 insertions(+), 36 deletions(-) diff --git a/data/elementary/themes/edc/elm/entry.edc b/data/elementary/themes/edc/elm/entry.edc index 40a7030a6a..8058b939ce 100644 --- a/data/elementary/themes/edc/elm/entry.edc +++ b/data/elementary/themes/edc/elm/entry.edc @@ -1021,40 +1021,34 @@ group { name: "elm/entry/base-password/default"; } group { name: "elm/entry/magnifier/default"; - images.image: "frame_rounded.png" COMP; parts { - part { name: "bg"; type: RECT; mouse_events: 0; + part { name: "shadow"; mouse_events: 0; description { state: "default" 0.0; -rel.to: "over"; -rel1.offset: 10 10; -rel2.offset: -11 -11; -color: 48 48 48 255; +rel.to: "bg"; +WIN_SHADOW; } description { state: "hidden" 0.0; inherit: "default" 0.0; visible: 0; } } - part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0; + part { name: "bg"; type: RECT; mouse_events: 0; + scale: 1; description { state: "default" 0.0; -rel.to: "over"; -rel1.offset: 10 10; -rel2.offset: -11 -11; +min: 80 40; +rel1.offset: 4 4; +rel2.offset: -5 -5; +color: 48 48 48 255; +offscale; } description { state: "hidden" 0.0; inherit: "default" 0.0; visible: 0; } } - part { name: "over"; mouse_events: 0; - scale: 1; + part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0; description { state: "default" 0.0; -min: 128 64; -align: 0 0; -image.normal: "frame_rounded.png"; -image.border: 14 14 14 14; -image.middle: 0; -fill.smooth: 0; +rel.to: "bg"; } description { state: "hidden" 0.0; inherit: "default" 0.0; @@ -1063,19 +1057,17 @@ group { name: "elm/entry/magnifier/default"; } } programs { - program { name: "magnifier_show"; - signal: "elm,action,show,magnifier"; source: "elm"; + program { signal: "elm,action,show,magnifier"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.swallow.content"; target: "bg"; - target: "over"; + target: "shadow"; } - program { name: "magnifier_hide"; - signal: "elm,action,hide,magnifier"; source: "elm"; + program { signal: "elm,action,hide,magnifier"; source: "elm"; action: STATE_SET "hidden" 0.0; target: "elm.swallow.content"; target: "bg"; - target: "over"; + target: "shadow"; } } } @@ -1086,10 +1078,10 @@ group { name: "elm/entry/handler/start/default"; part { name: "base"; mouse_events: 0; scale: 1; description { state: "default" 0.0; -min: 21 27; // 42 54 image.normal: "handle_pick_up_left.png"; +min: 21 27; // 42 54 align: (29/42) (11/54); -color_class: "entry_selection_handler"; +color: 51 153 255 255; visible: 0; } description { state: "visible" 0.0; @@ -1112,14 +1104,12 @@ group { name: "elm/entry/handler/start/default"; } } programs { - program { - signal: "elm,handler,show"; source: "elm"; + program { signal: "elm,handler,show"; source: "elm"; action: STATE_SET "visible" 0.0; target: "base"; target: "event"; } - program { - signal: "elm,handler,hide"; source: "elm"; + program { signal: "elm,handler,hide"; source: "elm"; action: STATE_SET "default" 0.0; target: "base"; target: "event"; @@ -1133,10 +1123,10 @@ group { name: "elm/entry/handler/end/default"; part { name: "base"; mouse_events: 0; scale: 1; description { state: "default" 0.0; -min: 21 27; // 42 54 image.normal: "handle_pick_up_right.png"; +min: 21 27; // 42 54 align: (12/42) (11/54); -color_class: "entry_selection_handler"; +color: 51 153 255 255; visible: 0; }
[EGIT] [core/efl] feature/themes/flat 02/02: TH - more packagekit
raster pushed a commit to branch feature/themes/flat. http://git.enlightenment.org/core/efl.git/commit/?id=8374d7b0b8ca076580b56ce677b76a7f3f5dd5f9 commit 8374d7b0b8ca076580b56ce677b76a7f3f5dd5f9 Author: Carsten Haitzler (Rasterman) Date: Sun Nov 10 02:13:00 2019 + TH - more packagekit --- data/elementary/themes/edc/packagekit.edc | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/data/elementary/themes/edc/packagekit.edc b/data/elementary/themes/edc/packagekit.edc index 2aaa113dfe..10ab717025 100644 --- a/data/elementary/themes/edc/packagekit.edc +++ b/data/elementary/themes/edc/packagekit.edc @@ -95,8 +95,8 @@ group { name: "e/modules/packagekit/main"; part { name: "num_updates"; type: TEXT; scale: 1; description { state: "default" 0.0; -rel1.relative: (9/40) (21/40); -rel2.relative: (32/40) (37/40); +rel1.relative: (8/40) (8/40); +rel2.relative: (32/40) (32/40); color: 255 255 255 255; text { font: FN; size: 10; } @@ -118,16 +118,16 @@ group { name: "e/modules/packagekit/main"; description { state: "updated" 0.0; inherit: "default" 0.0; visible: 1; -rel1.relative: (16/40) (25/40); -rel2.relative: (28/40) (35/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); image.normal: "pkg-ok.png"; color: 255 255 255 255; } description { state: "error" 0.0; inherit: "default" 0.0; visible: 1; -rel1.relative: (15/40) (24/40); -rel2.relative: (25/40) (34/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); image.normal: "pkg-err.png"; color: 255 255 255 255; } @@ -148,8 +148,8 @@ group { name: "e/modules/packagekit/main"; description { state: "default" 0.0; fixed: 1 1; image.normal: "pkg-busy1.png"; -rel1.relative: (13/40) (20/40); -rel2.relative: (27/40) (34/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); map.on: 1; map.smooth: 1; map.rotation.center: "busy1"; @@ -164,8 +164,8 @@ group { name: "e/modules/packagekit/main"; description { state: "default" 0.0; fixed: 1 1; image.normal: "pkg-busy2.png"; -rel1.relative: (13/40) (20/40); -rel2.relative: (27/40) (34/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); map.on: 1; map.smooth: 1; map.rotation.center: "busy1"; @@ -180,8 +180,8 @@ group { name: "e/modules/packagekit/main"; description { state: "default" 0.0; fixed: 1 1; image.normal: "pkg-busy3.png"; -rel1.relative: (13/40) (20/40); -rel2.relative: (27/40) (34/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); map.on: 1; map.smooth: 1; map.rotation.center: "busy1"; @@ -196,8 +196,8 @@ group { name: "e/modules/packagekit/main"; description { state: "default" 0.0; fixed: 1 1; image.normal: "pkg-busy4.png"; -rel1.relative: (13/40) (20/40); -rel2.relative: (27/40) (34/40); +rel1.relative: (5/40) (5/40); +rel2.relative: (35/40) (35/40); map.on: 1; map.smooth: 1; map.rotation.center: "busy1"; --