[EGIT] [legacy/imlib2] master 04/06: image.c: Enable non-dirty pixmap cache cleaning
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=a7be91805fe7e8c11786ff9d6ae663f999fa232a commit a7be91805fe7e8c11786ff9d6ae663f999fa232a Author: Kim Woelders Date: Tue Dec 24 08:56:44 2019 +0100 image.c: Enable non-dirty pixmap cache cleaning For whatever reason this does not seem to have ever been active. Let's activate it now. --- src/lib/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/image.c b/src/lib/image.c index ceaf727..c1c83f4 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -459,7 +459,7 @@ __imlib_CleanupImagePixmapCache(void) { ImlibImagePixmap *ip, *ip_last; int current_cache; - charoperation = 0; + charoperation = 1; current_cache = __imlib_CurrentCacheSize(); ip_last = NULL; --
[EGIT] [legacy/imlib2] master 05/06: image.c: Minor refactoring of pixmap cache cleaners
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=002df3c1fa24e600a06f64264178d808b7b9ddb5 commit 002df3c1fa24e600a06f64264178d808b7b9ddb5 Author: Kim Woelders Date: Tue Dec 24 09:13:35 2019 +0100 image.c: Minor refactoring of pixmap cache cleaners --- src/lib/image.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/lib/image.c b/src/lib/image.c index c1c83f4..f45929d 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -273,7 +273,6 @@ __imlib_CleanupImageCache(void) { ImlibImage *im, *im_last; int current_cache; - charoperation = 1; current_cache = __imlib_CurrentCacheSize(); im_last = NULL; @@ -291,10 +290,9 @@ __imlib_CleanupImageCache(void) } /* while the cache size of 0 ref coutn data is bigger than the set value */ /* clean out the oldest members of the imaeg cache */ - while ((current_cache > cache_size) && (operation)) + while (current_cache > cache_size) { im_last = NULL; -operation = 0; im = images; while (im) { @@ -302,14 +300,13 @@ __imlib_CleanupImageCache(void) im_last = im; im = im->next; } -if (im_last) - { - __imlib_RemoveImageFromCache(im_last); - __imlib_ConsumeImage(im_last); - operation = 1; - } -if (operation) - current_cache = __imlib_CurrentCacheSize(); +if (!im_last) + break; + +__imlib_RemoveImageFromCache(im_last); +__imlib_ConsumeImage(im_last); + +current_cache = __imlib_CurrentCacheSize(); } } @@ -459,7 +456,6 @@ __imlib_CleanupImagePixmapCache(void) { ImlibImagePixmap *ip, *ip_last; int current_cache; - charoperation = 1; current_cache = __imlib_CurrentCacheSize(); ip_last = NULL; @@ -474,10 +470,9 @@ __imlib_CleanupImagePixmapCache(void) __imlib_ConsumeImagePixmap(ip_last); } } - while ((current_cache > cache_size) && (operation)) + while (current_cache > cache_size) { ip_last = NULL; -operation = 0; ip = pixmaps; while (ip) { @@ -485,14 +480,13 @@ __imlib_CleanupImagePixmapCache(void) ip_last = ip; ip = ip->next; } -if (ip_last) - { - __imlib_RemoveImagePixmapFromCache(ip_last); - __imlib_ConsumeImagePixmap(ip_last); - operation = 1; - } -if (operation) - current_cache = __imlib_CurrentCacheSize(); +if (!ip_last) + break; + +__imlib_RemoveImagePixmapFromCache(ip_last); +__imlib_ConsumeImagePixmap(ip_last); + +current_cache = __imlib_CurrentCacheSize(); } } #endif --
[EGIT] [legacy/imlib2] master 01/06: image.c/h: Cleanups
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=0c7464f0dbabc0ead76e37fff306517f47ff97a3 commit 0c7464f0dbabc0ead76e37fff306517f47ff97a3 Author: Kim Woelders Date: Mon Dec 23 19:17:47 2019 +0100 image.c/h: Cleanups - Make a number of functions static - Shuffle prototypes around for nicer grouping - Remove unused __imlib_SetImageAlphaFlag() - Remove __imlib_FlushCache() prototype (not implemented) --- src/lib/api.c | 2 ++ src/lib/image.c | 60 ++- src/lib/image.h | 80 +++-- 3 files changed, 59 insertions(+), 83 deletions(-) diff --git a/src/lib/api.c b/src/lib/api.c index 3476aa1..2827c3a 100644 --- a/src/lib/api.c +++ b/src/lib/api.c @@ -1691,7 +1691,9 @@ imlib_image_set_border(Imlib_Border * border) im->border.right = MAX(0, border->right); im->border.top = MAX(0, border->top); im->border.bottom = MAX(0, border->bottom); +#ifdef BUILD_X11 __imlib_DirtyPixmapsForImage(im); +#endif } /** diff --git a/src/lib/image.c b/src/lib/image.c index d46871f..1a2c8fb 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -169,26 +169,8 @@ __imlib_FreeAllTags(ImlibImage * im) } } -/* set the cache size */ -void -__imlib_SetCacheSize(int size) -{ - cache_size = size; - __imlib_CleanupImageCache(); -#ifdef BUILD_X11 - __imlib_CleanupImagePixmapCache(); -#endif -} - -/* return the cache size */ -int -__imlib_GetCacheSize(void) -{ - return cache_size; -} - /* create an image data struct and fill it in */ -ImlibImage * +static ImlibImage * __imlib_ProduceImage(void) { ImlibImage *im; @@ -200,7 +182,7 @@ __imlib_ProduceImage(void) } /* free an image struct */ -void +static void __imlib_ConsumeImage(ImlibImage * im) { #ifdef BUILD_X11 @@ -234,7 +216,7 @@ __imlib_ConsumeImage(ImlibImage * im) #endif } -ImlibImage * +static ImlibImage * __imlib_FindCachedImage(const char *file) { ImlibImage *im, *previous_im; @@ -264,7 +246,7 @@ __imlib_FindCachedImage(const char *file) } /* add an image to the cache of images (at the start) */ -void +static void __imlib_AddImageToCache(ImlibImage * im) { im->next = images; @@ -272,7 +254,7 @@ __imlib_AddImageToCache(ImlibImage * im) } /* remove (unlink) an image from the cache of images */ -void +static void __imlib_RemoveImageFromCache(ImlibImage * im) { ImlibImage *current_im, *previous_im; @@ -385,8 +367,8 @@ __imlib_CurrentCacheSize(void) return current_cache; } -/* clean out images fromthe cache if the cache is overgrown */ -void +/* clean out images from the cache if the cache is overgrown */ +static void __imlib_CleanupImageCache(void) { ImlibImage *im, *im_last; @@ -431,6 +413,24 @@ __imlib_CleanupImageCache(void) } } +/* set the cache size */ +void +__imlib_SetCacheSize(int size) +{ + cache_size = size; + __imlib_CleanupImageCache(); +#ifdef BUILD_X11 + __imlib_CleanupImagePixmapCache(); +#endif +} + +/* return the cache size */ +int +__imlib_GetCacheSize(void) +{ + return cache_size; +} + #ifdef BUILD_X11 /* create a pixmap cache data struct */ ImlibImagePixmap * @@ -835,16 +835,6 @@ __imlib_ErrorFromErrno(int err, int save) } } -/* set or unset the alpha flag on the umage (alpha = 1 / 0 ) */ -void -__imlib_SetImageAlphaFlag(ImlibImage * im, char alpha) -{ - if (alpha) - SET_FLAG(im->flags, F_HAS_ALPHA); - else - UNSET_FLAG(im->flags, F_HAS_ALPHA); -} - /* create a new image struct from data passed that is wize w x h then return */ /* a pointer to that image sturct */ ImlibImage * diff --git a/src/lib/image.h b/src/lib/image.h index 5d6804d..cec85e3 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -104,28 +104,30 @@ struct _imlibloader { ImlibLoader*next; }; +void__imlib_RemoveAllLoaders(void); +ImlibLoader*__imlib_FindBestLoaderForFile(const char *file, + int for_save); +ImlibLoader*__imlib_FindBestLoaderForFormat(const char *format, +int for_save); + +ImlibImage *__imlib_CreateImage(int w, int h, DATA32 * data); +ImlibImage *__imlib_LoadImage(const char *file, + ImlibProgressFunction progress, + char progress_granularity, + char immediate_load, char dont_cache, + ImlibLoadError * er); +int __imlib_LoadImageData(ImlibImage * im); +void__imlib_DirtyImage(ImlibImage * im); +void__imlib_FreeImage(ImlibImage * im); +void__imlib_SaveImage(ImlibImage * im, const char *file, + Iml
[EGIT] [legacy/imlib2] master 06/06: image.c: Move data_memory_func assignment to better place
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=83e7e89348a20afb15f286a2f91527bbaa1584c5 commit 83e7e89348a20afb15f286a2f91527bbaa1584c5 Author: Kim Woelders Date: Wed Dec 25 20:57:27 2019 +0100 image.c: Move data_memory_func assignment to better place --- src/lib/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/image.c b/src/lib/image.c index f45929d..2f33d42 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -552,7 +552,6 @@ __imlib_LoadImageWrapper(const ImlibLoader * l, ImlibImage * im, int rc; immediate_load = immediate_load || progress || im->loader; - im->data_memory_func = imlib_context_get_image_data_memory_function(); rc = l->load(im, progress, progress_granularity, immediate_load); if (rc == 0) { @@ -644,6 +643,8 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress, im->moddate = __imlib_FileModDate(im->real_file); + im->data_memory_func = imlib_context_get_image_data_memory_function(); + /* ok - just check all our loaders are up to date */ __imlib_RescanLoaders(); --
[EGIT] [e16/e16] master 01/01: windowmatches: Remove some cruft
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=4df8199d60934d3e4965e396e870c7362d0ccf48 commit 4df8199d60934d3e4965e396e870c7362d0ccf48 Author: Kim Woelders Date: Thu Dec 26 09:12:53 2019 +0100 windowmatches: Remove some cruft --- src/windowmatch.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/windowmatch.c b/src/windowmatch.c index 7f1244e0..f0729696 100644 --- a/src/windowmatch.c +++ b/src/windowmatch.c @@ -929,12 +929,6 @@ WindowMatchSighan(int sig, void *prm __UNUSED__) WindowMatchConfigLoad, 1); #endif ConfigFileLoad("matches.cfg", NULL, WindowMatchConfigLoad2, 0); -#if 0 - WindowMatchConfigLoadUser(); -#endif -#if 0 - IcondefChecker(0, NULL); -#endif break; } } --
[EGIT] [e16/e16] master 01/04: Hide Group struct internals
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=7011dc150da9490e7921a41cd57b392218e0df17 commit 7011dc150da9490e7921a41cd57b392218e0df17 Author: Kim Woelders Date: Sat Feb 8 06:36:03 2020 +0100 Hide Group struct internals --- src/finders.c| 37 +++ src/groups.c | 77 ++-- src/groups.h | 32 +-- src/menus-misc.c | 20 +++ src/snaps.c | 9 +++ 5 files changed, 97 insertions(+), 78 deletions(-) diff --git a/src/finders.c b/src/finders.c index 1e9a793c..b14dbf14 100644 --- a/src/finders.c +++ b/src/finders.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2008-2019 Kim Woelders + * Copyright (C) 2008-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -259,39 +259,8 @@ ListWinGroupMembersForEwin(const EWin * ewin, int action, char nogroup, if (!grp) continue; - switch (action) - { - case GROUP_ACTION_SET_WINDOW_BORDER: -if (!grp->cfg.set_border) - continue; -break; - case GROUP_ACTION_ICONIFY: -if (!grp->cfg.iconify) - continue; -break; - case GROUP_ACTION_MOVE: -if (!grp->cfg.move) - continue; -break; - case GROUP_ACTION_STACKING: -if (!grp->cfg.raise) - continue; -break; - case GROUP_ACTION_STICK: -if (!grp->cfg.stick) - continue; -break; - case GROUP_ACTION_SHADE: -if (!grp->cfg.shade) - continue; -break; - case GROUP_ACTION_KILL: -if (!grp->cfg.kill) - continue; -break; - default: -break; - } + if (!GroupMatchAction(grp, action)) + continue; do_add: gwins = EREALLOC(EWin *, gwins, gwcnt + 1); diff --git a/src/groups.c b/src/groups.c index 8d8f4f7f..56e5b9c4 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -40,10 +40,33 @@ #define USE_GROUP_SHOWHIDE 1 /* Enable group borders */ +#define GROUP_SELECT_ALL 0 +#define GROUP_SELECT_EWIN_ONLY 1 +#define GROUP_SELECT_ALL_EXCEPT_EWIN 2 + #define SET_OFF0 #define SET_ON 1 #define SET_TOGGLE 2 +typedef struct _groupconfig { + chariconify; + charkill; + charmove; + charraise; + charset_border; + charshade; + charstick; +} GroupConfig; + +struct _group { + dlist_t list; + int index; + EWin **members; + int num_members; + GroupConfig cfg; + charsave; /* Used in snapshot - must save */ +}; + static LIST_HEAD(group_list); static struct { @@ -126,8 +149,22 @@ GroupFind(int gid) return LIST_FIND(Group, _list, GroupMatchId, INT2PTR(gid)); } +EWin *const * +GroupGetMembers(const Group * g, int *num) +{ + *num = g->num_members; + return g->members; +} + +int +GroupRemember(Group * g) +{ + g->save = 1; + return g->index; +} + void -GroupRemember(int gid) +GroupRememberByGid(int gid) { Group *g; @@ -138,6 +175,42 @@ GroupRemember(int gid) g->save = 1; } +int +GroupMatchAction(const Group * g, int action) +{ + int match; + + switch (action) + { + default: + match = 0; + break; + case GROUP_ACTION_SET_WINDOW_BORDER: + match = g->cfg.set_border; + break; + case GROUP_ACTION_ICONIFY: + match = g->cfg.iconify; + break; + case GROUP_ACTION_MOVE: + match = g->cfg.move; + break; + case GROUP_ACTION_STACKING: + match = g->cfg.raise; + break; + case GROUP_ACTION_STICK: + match = g->cfg.stick; + break; + case GROUP_ACTION_SHADE: + match = g->cfg.shade; + break; + case GROUP_ACTION_KILL: + match = g->cfg.kill; + break; + } + + return match; +} + static Group * GroupFind2(const char *groupid) { diff --git a/src/groups.h b/src/groups.h index 324aa752..6a3653b7 100644 --- a/src/groups
[EGIT] [e16/e16] master 03/04: configure.ac: Drop unnecessary prefix stuff
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=dca85018b7002cc915fd57d23c5939e33ee0b802 commit dca85018b7002cc915fd57d23c5939e33ee0b802 Author: Kim Woelders Date: Sat Mar 7 10:23:29 2020 +0100 configure.ac: Drop unnecessary prefix stuff --- configure.ac | 8 1 file changed, 8 deletions(-) diff --git a/configure.ac b/configure.ac index 56ed0df2..098dee45 100644 --- a/configure.ac +++ b/configure.ac @@ -11,14 +11,6 @@ AC_CONFIG_MACRO_DIR([m4]) AC_SUBST(E_RPM_REVISION, [rpm_revision]) -# reasonable guesses for where stuff is installed -if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix -fi -if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix -fi - AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC --
[EGIT] [e16/e16] master 04/04: Spec file: Add git tag to rpm file name (if built from git checkout)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=a35ea619802a7732b72f943cb65f9e6ddc88 commit a35ea619802a7732b72f943cb65f9e6ddc88 Author: Kim Woelders Date: Sat Mar 7 10:36:12 2020 +0100 Spec file: Add git tag to rpm file name (if built from git checkout) --- Makefile.am | 17 + configure.ac | 4 +--- e16.spec.in | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 69cc4d69..bab81333 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,12 +10,29 @@ MAINTAINERCLEANFILES = aclocal.m4 config.* compile configure depcomp \ po/*.header po/*.sed po/*.sin po/e16.pot \ *~ */*~ +CLEANFILES = $(PACKAGE).spec + SUBDIRS = dox eesh epp src lib config themes fonts scripts misc docs icons pix po EXTRA_DIST = \ +$(PACKAGE).spec.in \ sample-scripts/bouncingball.pl \ sample-scripts/lcdmover.sh \ sample-scripts/testroller.pl \ sample-scripts/shade-pagers.pl \ sample-scripts/place-pagers.pl \ AUTHORS COMPLIANCE COPYING ChangeLog + +if SRC_IS_GIT +RPM_RELEASE=`echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD` +else +RPM_RELEASE=1 +endif + +dist-hook: $(top_builddir)/$(PACKAGE).spec + +$(top_builddir)/$(PACKAGE).spec: FORCE + sed "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPM_RELEASE)/" \ + $(top_srcdir)/$(PACKAGE).spec.in > $@ + +FORCE: diff --git a/configure.ac b/configure.ac index 098dee45..d4c70e91 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,6 @@ m4_define([pkg_version], [1.0.21]) m4_define([pkg_revision], [000]) m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version])) -m4_define([rpm_revision], m4_ifdef([pkg_revision], ["0.%(date '+%y%m%d')"], [1])) AC_INIT([e16],[pkg_version],[enlightenment-de...@lists.sourceforge.net]) AM_INIT_AUTOMAKE([foreign dist-xz]) @@ -9,7 +8,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) -AC_SUBST(E_RPM_REVISION, [rpm_revision]) +AM_CONDITIONAL(SRC_IS_GIT, m4_ifdef([pkg_revision], [test -d $srcdir/.git], [false])) AC_USE_SYSTEM_EXTENSIONS @@ -460,7 +459,6 @@ scripts/Makefile misc/Makefile docs/Makefile po/Makefile.in -e16.spec ]) AC_OUTPUT diff --git a/e16.spec.in b/e16.spec.in index f11de399..355c3001 100644 --- a/e16.spec.in +++ b/e16.spec.in @@ -1,7 +1,7 @@ Summary: The Enlightenment window manager, DR16. Name: @PACKAGE@ Version: @VERSION@ -Release: @E_RPM_REVISION@%{?_rpm_pkg_ext:%{_rpm_pkg_ext}}%{?_vendorsuffix:.%{_vendorsuffix}} +Release: @RPM_RELEASE@%{?_rpm_pkg_ext:%{_rpm_pkg_ext}}%{?_vendorsuffix:.%{_vendorsuffix}} License: BSD Group: User Interface/Desktops URL: http://www.enlightenment.org/ --
[EGIT] [e16/e16] master 02/04: groups.c: Correct debug stuff
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=cee07a720a27eea090f50ad2488b827e7576b397 commit cee07a720a27eea090f50ad2488b827e7576b397 Author: Kim Woelders Date: Tue Feb 11 19:22:53 2020 +0100 groups.c: Correct debug stuff --- src/groups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/groups.c b/src/groups.c index 56e5b9c4..dd8478da 100644 --- a/src/groups.c +++ b/src/groups.c @@ -234,7 +234,7 @@ BreakWindowGroup(EWin * ewin, Group * g) EWin *ewin2; Group *g2; - Dprintf("ewin=%p group=%p gid=%d\n", ewin, g, g->index); + Dprintf("ewin=%p group=%p gid=%d\n", ewin, g, g ? g->index : 0); if (!ewin || !ewin->groups) return; --
[EGIT] [e16/e16-themes] master 04/07: Drop obsolete menu styles
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=53f34cd4d7659010cde27fc8023da4fe219aaf67 commit 53f34cd4d7659010cde27fc8023da4fe219aaf67 Author: Kim Woelders Date: Wed Dec 25 15:12:06 2019 +0100 Drop obsolete menu styles --- BlueSteel/data/menustyles/menustyles.cfg | 10 +- BrushedMetal-Tigert/data/menustyles/menustyles.cfg | 5 + Ganymede/data/menustyles/menustyles.cfg| 5 + ShinyMetal/data/menustyles/menustyles.cfg | 5 + winter/data/menustyles/menustyles.cfg | 5 + 5 files changed, 5 insertions(+), 25 deletions(-) diff --git a/BlueSteel/data/menustyles/menustyles.cfg b/BlueSteel/data/menustyles/menustyles.cfg index 97bea1d..4e0be66 100644 --- a/BlueSteel/data/menustyles/menustyles.cfg +++ b/BlueSteel/data/menustyles/menustyles.cfg @@ -33,15 +33,7 @@ __TCLASS __BGN __END NORMAL_MENU_STYLE_VERTICAL("DEFAULT", "VERYSMALLFIXED", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) - -NORMAL_MENU_STYLE_VERTICAL("ROOT", "TRANSIENT", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) - -NORMAL_MENU_STYLE_VERTICAL("ROOT_IMAGE", "TRANSIENT", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 20) - NORMAL_MENU_STYLE_VERTICAL("EMPTY", "VERYSMALLFIXED", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) - -NORMAL_MENU_STYLE_VERTICAL("TASK_MENU", "VERYSMALLFIXED", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) - -NORMAL_MENU_STYLE_VERTICAL("DESK_MENU", "VERYSMALLFIXED", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) +NORMAL_MENU_STYLE_VERTICAL("ROOT", "TRANSIENT", "MENU_TEXT", "MENU_BG", "MENU_SELECTED", "MENU_SUBMENU", 40) /* (Menu type, Border type, Text type, Background, Selected item, Selected submenu) */ diff --git a/BrushedMetal-Tigert/data/menustyles/menustyles.cfg b/BrushedMetal-Tigert/data/menustyles/menustyles.cfg index 91ad08e..1c42b77 100644 --- a/BrushedMetal-Tigert/data/menustyles/menustyles.cfg +++ b/BrushedMetal-Tigert/data/menustyles/menustyles.cfg @@ -44,8 +44,5 @@ __END /* must define these menustyles */ NORMAL_MENU_STYLE_VERTICAL("DEFAULT", "MENU", "MENU", "M1", "M2", "M3", 40) -NORMAL_MENU_STYLE_VERTICAL("DESK_MENU", "MENU_BORDER_ONLY", "MENU", "M1", "M2", "M3", 40) -NORMAL_MENU_STYLE_VERTICAL("ROOT", "MENU", "MENU", "M1", "M2", "M3", 40) -NORMAL_MENU_STYLE_VERTICAL("ROOT_IMAGE", "MENU", "MENU", "M1", "M2", "M3", 20) NORMAL_MENU_STYLE_VERTICAL("EMPTY", "MENU_BORDER_ONLY", "MENU", "M1", "M2", "M3", 40) -NORMAL_MENU_STYLE_VERTICAL("GROUP_MENU", "MENU_BORDER_ONLY", "MENU", "M1", "M2", "M3", 40) +NORMAL_MENU_STYLE_VERTICAL("ROOT", "MENU", "MENU", "M1", "M2", "M3", 40) diff --git a/Ganymede/data/menustyles/menustyles.cfg b/Ganymede/data/menustyles/menustyles.cfg index 07c8778..65744dd 100644 --- a/Ganymede/data/menustyles/menustyles.cfg +++ b/Ganymede/data/menustyles/menustyles.cfg @@ -101,12 +101,9 @@ __END NORMAL_MENU_STYLE_VERTICAL("DEFAULT","MENU_BORDER", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", "DEFAULT_MENU_SUB", 40) -NORMAL_MENU_STYLE_VERTICAL("ROOT", "MENU_BORDER", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", "DEFAULT_MENU_SUB", 20) -NORMAL_MENU_STYLE_VERTICAL("ROOT_IMAGE", "MENU_BORDER", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", "DEFAULT_MENU_SUB", 10) NORMAL_MENU_STYLE_VERTICAL("EMPTY", "MENU_NOTITLE", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", "DEFAULT_MENU_SUB", 25) +NORMAL_MENU_STYLE_VERTICAL("ROOT", "MENU_BORDER", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", "DEFAULT_MENU_SUB", 20) NORMAL_MENU_STYLE_VERTICAL("CONFIG", "MENU_NOTITLE", "GANYMEDE_MENU", "MENU_FOCUS", "MENUBACK", &qu
[EGIT] [e16/e16-themes] master 06/07: autogen.sh: Add -n as alternative to NOCONFIGURE
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=503f602fe76352ee4f7078e6133647af55d13e5e commit 503f602fe76352ee4f7078e6133647af55d13e5e Author: Kim Woelders Date: Wed Jan 8 18:51:18 2020 +0100 autogen.sh: Add -n as alternative to NOCONFIGURE --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 0d43361..245fe71 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,6 +5,6 @@ rm -rf autom4te.cache aclocal.m4 autoreconf -vif -if [ -z "$NOCONFIGURE" ]; then +if [ -z "$NOCONFIGURE" -a "$1" != "-n" ]; then ./configure "$@" fi --
[EGIT] [e16/e16-themes] master 07/07: configure.ac: Drop unnecessary prefix stuff
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=75806437b9e0ed477ed2d90c232f58146312ce09 commit 75806437b9e0ed477ed2d90c232f58146312ce09 Author: Kim Woelders Date: Sat Mar 7 10:27:29 2020 +0100 configure.ac: Drop unnecessary prefix stuff --- configure.ac | 8 1 file changed, 8 deletions(-) diff --git a/configure.ac b/configure.ac index be5406f..5a0485b 100644 --- a/configure.ac +++ b/configure.ac @@ -8,14 +8,6 @@ AM_INIT_AUTOMAKE([foreign]) AC_SUBST(E_RPM_REVISION, [rpm_revision]) -dnl reasonable guesses for where stuff is installed -if test "x$prefix" = "xNONE"; then - prefix=$ac_default_prefix -fi -if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix -fi - AC_PROG_INSTALL THEMES="BlueSteel BrushedMetal-Tigert Ganymede ShinyMetal" --
[EGIT] [e16/e16-themes] master 03/07: Enable out-of-tree build
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=7d1780be92f77a1721c8e8207d38b0e188e55bde commit 7d1780be92f77a1721c8e8207d38b0e188e55bde Author: Kim Woelders Date: Fri Jul 5 07:36:55 2019 +0200 Enable out-of-tree build Also - Drop obsolete .svn references - Drop tar v flag when building to reduce noisyness. --- BlueSteel/Makefile.am | 3 ++- BrushedMetal-Tigert/Makefile.am | 3 ++- Ganymede/Makefile.am| 3 ++- ShinyMetal/Makefile.am | 3 ++- winter/Makefile.am | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BlueSteel/Makefile.am b/BlueSteel/Makefile.am index 56eb781..f42dc0e 100644 --- a/BlueSteel/Makefile.am +++ b/BlueSteel/Makefile.am @@ -24,4 +24,5 @@ uninstall-local: .PHONY: etheme $(THEME).etheme etheme: $(THEME).etheme $(THEME).etheme: - test ! -d data || (cd data; tar -czvf ../$(THEME).etheme --exclude .svn *) + test ! -d $(srcdir)/data || \ + (cd $(srcdir)/data; tar -czf $(abs_builddir)/$(THEME).etheme *) diff --git a/BrushedMetal-Tigert/Makefile.am b/BrushedMetal-Tigert/Makefile.am index 9a4a58a..936091c 100644 --- a/BrushedMetal-Tigert/Makefile.am +++ b/BrushedMetal-Tigert/Makefile.am @@ -24,4 +24,5 @@ uninstall-local: .PHONY: etheme $(THEME).etheme etheme: $(THEME).etheme $(THEME).etheme: - test ! -d data || (cd data; tar -czvf ../$(THEME).etheme --exclude .svn *) + test ! -d $(srcdir)/data || \ + (cd $(srcdir)/data; tar -czf $(abs_builddir)/$(THEME).etheme *) diff --git a/Ganymede/Makefile.am b/Ganymede/Makefile.am index a611a7c..161fbd2 100644 --- a/Ganymede/Makefile.am +++ b/Ganymede/Makefile.am @@ -24,4 +24,5 @@ uninstall-local: .PHONY: etheme $(THEME).etheme etheme: $(THEME).etheme $(THEME).etheme: - test ! -d data || (cd data; tar -czvf ../$(THEME).etheme --exclude .svn *) + test ! -d $(srcdir)/data || \ + (cd $(srcdir)/data; tar -czf $(abs_builddir)/$(THEME).etheme *) diff --git a/ShinyMetal/Makefile.am b/ShinyMetal/Makefile.am index 5bab21c..5b923c4 100644 --- a/ShinyMetal/Makefile.am +++ b/ShinyMetal/Makefile.am @@ -24,4 +24,5 @@ uninstall-local: .PHONY: etheme $(THEME).etheme etheme: $(THEME).etheme $(THEME).etheme: - test ! -d data || (cd data; tar -czvf ../$(THEME).etheme --exclude .svn *) + test ! -d $(srcdir)/data || \ + (cd $(srcdir)/data; tar -czf $(abs_builddir)/$(THEME).etheme *) diff --git a/winter/Makefile.am b/winter/Makefile.am index 6bde9f7..c54eff0 100644 --- a/winter/Makefile.am +++ b/winter/Makefile.am @@ -27,4 +27,5 @@ uninstall-local: .PHONY: etheme $(THEME).etheme etheme: $(THEME).etheme $(THEME).etheme: - test ! -d data || (cd data; tar -czvf ../$(THEME).etheme --exclude .svn *) + test ! -d $(srcdir)/data || \ + (cd $(srcdir)/data; tar -czf $(abs_builddir)/$(THEME).etheme *) --
[EGIT] [e16/e16-themes] master 05/07: Drop obsolete USE_ICON_IMAGECLASS_FOR_CLIENT_...() examples
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=1156873efa3bf6e7d046ee37c2d51371be6dcac5 commit 1156873efa3bf6e7d046ee37c2d51371be6dcac5 Author: Kim Woelders Date: Wed Dec 25 15:53:17 2019 +0100 Drop obsolete USE_ICON_IMAGECLASS_FOR_CLIENT_...() examples --- BlueSteel/data/windowmatches.cfg | 3 --- Ganymede/data/windowmatches.cfg | 3 --- ShinyMetal/data/windowmatches.cfg | 13 - 3 files changed, 19 deletions(-) diff --git a/BlueSteel/data/windowmatches.cfg b/BlueSteel/data/windowmatches.cfg index c8f6047..fabdf50 100644 --- a/BlueSteel/data/windowmatches.cfg +++ b/BlueSteel/data/windowmatches.cfg @@ -69,9 +69,6 @@ USE_BORDER_FOR_SHAPED_CLIENT("BORDERLESS") USE_ICON_IMAGE_FOR_CLIENT_CLASS("XClock", "pix/wait1.png") USE_BORDER_FOR_CLIENT_WITH_NAME(name, border_name) USE_BORDER_FOR_CLIENT_WITH_CLASS(class, border_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_TITLE(title, icon_class_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_NAME(name, icon_class_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_CLASS(class, icon_class_name) USE_ICON_IMAGE_FOR_CLIENT_TITLE(title, icon_image_filename) USE_ICON_IMAGE_FOR_CLIENT_NAME(name, icon_image_filename) USE_ICON_IMAGE_FOR_CLIENT_CLASS(class, icon_image_filename) diff --git a/Ganymede/data/windowmatches.cfg b/Ganymede/data/windowmatches.cfg index c867250..5bf0bb3 100644 --- a/Ganymede/data/windowmatches.cfg +++ b/Ganymede/data/windowmatches.cfg @@ -42,9 +42,6 @@ __MATCH_WINDOW __BGN __HAS_TITLE "*Remote*" __END -USE_ICON_IMAGECLASS_FOR_CLIENT_TITLE("*Rootshell*", RED_ICON_BUTTON ) -USE_ICON_IMAGECLASS_FOR_CLIENT_TITLE("*Remote*", GREEN_ICON_BUTTON ) - /* Anything narrower than 150 pixels gets the rotated border: */ __MATCH_WINDOW __BGN __NAME NARROW_WINDOWS diff --git a/ShinyMetal/data/windowmatches.cfg b/ShinyMetal/data/windowmatches.cfg index 42bc99a..a902736 100644 --- a/ShinyMetal/data/windowmatches.cfg +++ b/ShinyMetal/data/windowmatches.cfg @@ -21,23 +21,11 @@ USE_ICON_IMAGE_FOR_CLIENT_CLASS("XClock", "pix/wait1.png") /* USE_BORDER_FOR_CLIENT_WITH_NAME(name, border_name) USE_BORDER_FOR_CLIENT_WITH_CLASS(class, border_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_TITLE(title, icon_class_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_NAME(name, icon_class_name) -USE_ICON_IMAGECLASS_FOR_CLIENT_CLASS(class, icon_class_name) USE_ICON_IMAGE_FOR_CLIENT_TITLE(title, icon_image_filename) USE_ICON_IMAGE_FOR_CLIENT_NAME(name, icon_image_filename) USE_ICON_IMAGE_FOR_CLIENT_CLASS(class, icon_image_filename) */ - - - - - - - - - /* The LONG way */ /* This is an example of explicitly doing a window match the LONG way */ /* @@ -78,4 +66,3 @@ __MATCH_WINDOW __BGN __CANNOT_RESIZE_VERTICALLY __ON __END */ - --
[EGIT] [e16/e16-themes] master 01/07: 1.0.2.000
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=e54ed1ee116cf81b695bfa615d431c35e8056997 commit e54ed1ee116cf81b695bfa615d431c35e8056997 Author: Kim Woelders Date: Sat Mar 7 18:48:48 2020 +0100 1.0.2.000 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 428b68c..be5406f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ m4_define([pkg_version], [1.0.2]) -#m4_define([pkg_revision], [000]) +m4_define([pkg_revision], [000]) m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version])) m4_define([rpm_revision], m4_ifdef([pkg_revision], ["0.%(date '+%y%m%d')"], [1])) --
[EGIT] [e16/e16-themes] master 02/07: Clean up .gitignore
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16-themes.git/commit/?id=32f928d045592977f2dfa67a54cc27ef780372a6 commit 32f928d045592977f2dfa67a54cc27ef780372a6 Author: Kim Woelders Date: Fri Jul 5 07:05:36 2019 +0200 Clean up .gitignore --- .gitignore | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index deb32bb..728db5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,19 @@ -.svn -Makefile +/aclocal.m4 +/autom4te.cache +/configure +/install-sh +/missing Makefile.in -aclocal.m4 -autom4te.cache -config.log -config.status -configure -install-sh -missing -e16-themes.spec -e16-themes-*.tar.gz +/config.log +/config.status +/e16-themes.spec +Makefile + +/BlueSteel/BlueSteel.etheme +/BrushedMetal-Tigert/BrushedMetal-Tigert.etheme +/Ganymede/Ganymede.etheme +/ShinyMetal/ShinyMetal.etheme +/winter/winter.etheme -BlueSteel/BlueSteel.etheme -BrushedMetal-Tigert/BrushedMetal-Tigert.etheme -Ganymede/Ganymede.etheme -ShinyMetal/ShinyMetal.etheme -winter/winter.etheme +/e16-themes-*.tar.gz --
[EGIT] [e16/e16] master 02/06: edox: Fix missing return value (at previously unreachable function exit)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=7d7ec4add291781b1b14bb0487ae3370dffa29ab commit 7d7ec4add291781b1b14bb0487ae3370dffa29ab Author: Kim Woelders Date: Thu Apr 30 20:21:07 2020 +0200 edox: Fix missing return value (at previously unreachable function exit) --- dox/dox.h| 4 ++-- dox/format.c | 12 +++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dox/dox.h b/dox/dox.h index 80c5dc43..ac748c17 100644 --- a/dox/dox.h +++ b/dox/dox.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007-2011 Kim Woelders + * Copyright (C) 2007-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -96,7 +96,7 @@ voidfreestrlist(char **l, int num); voidword(char *s, int num, char *wd); /* format.c */ -int GetObjects(FILE * f); +voidGetObjects(FILE * f); int FixPage(int p); int GetPage(char *name); voidGetLinkColors(int page_num, int *r, int *g, int *b); diff --git a/dox/format.c b/dox/format.c index 32146463..68cdb63a 100644 --- a/dox/format.c +++ b/dox/format.c @@ -392,7 +392,7 @@ GetTextUntilTag(void) return NULL; } -int +void GetObjects(FILE * f) { static char have_font = 0; @@ -476,19 +476,13 @@ GetObjects(FILE * f) else { if (!GetNextTag()) - { - Efree(fdat); - return 0; - } +break; } } else { if (!GetNextTag()) - { - Efree(fdat); - return 0; - } + break; } if (obj.type == PAGE) { --
[EGIT] [e16/e16] master 04/06: Enable sounds in combined configuration dialog
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=cf552ef7f9fdfa7c9437debdadf6feff861cdbf1 commit cf552ef7f9fdfa7c9437debdadf6feff861cdbf1 Author: Kim Woelders Date: Fri May 1 06:39:59 2020 +0200 Enable sounds in combined configuration dialog --- src/dialog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dialog.c b/src/dialog.c index f3de26c9..9c6527c5 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -505,6 +505,8 @@ DialogFill(Dialog * d, DItem * parent, const DialogDef * dd, void *data) DialogAddFooter(d, parent, dd->flags, dd->func_apply); DialogSetExitFunction(d, dd->func_exit); + + SoundPlay(dd->sound); } void @@ -520,7 +522,6 @@ DialogShowSimpleWithName(const DialogDef * dd, const char *name, void *data) DialogShow(d); return; } - SoundPlay(dd->sound); d = DialogCreate(name); if (!d) --
[EGIT] [e16/e16] master 05/06: Autofoo sound configuration cosmetics
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=0ef79b87715c4bcc9d8cbca1ae48b83013d138b0 commit 0ef79b87715c4bcc9d8cbca1ae48b83013d138b0 Author: Kim Woelders Date: Fri May 1 10:13:58 2020 +0200 Autofoo sound configuration cosmetics --- configure.ac | 21 +++-- src/ipc.c | 4 ++-- src/mod-misc.c| 6 +++--- src/settings.c| 4 ++-- src/sound.c | 22 +++--- src/sound_esd.c | 6 +++--- src/sound_load.c | 6 +++--- src/sound_pa.c| 6 +++--- src/sound_sndio.c | 5 +++-- src/sounds.h | 4 ++-- 10 files changed, 43 insertions(+), 41 deletions(-) diff --git a/configure.ac b/configure.ac index d4c70e91..941aba2b 100644 --- a/configure.ac +++ b/configure.ac @@ -114,8 +114,7 @@ fi if test "x$enable_sound" = "xpulseaudio"; then PKG_CHECK_MODULES(PA, libpulse, -AC_DEFINE(HAVE_SOUND, 1, [Sound support]) -AC_DEFINE(HAVE_SOUND_PA, 1, [PulseAudio sound support]), +AC_DEFINE(USE_SOUND_PULSE, 1, [PulseAudio sound support]), enable_sound=no) fi AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound" = "xpulseaudio") @@ -126,8 +125,7 @@ if test "x$enable_sound" = "xesound"; then AC_MSG_WARN([EsounD sound support was requested but not found.]) ]) if test "x$enable_sound" = "xesound"; then -AC_DEFINE(HAVE_SOUND, 1, [Sound support]) -AC_DEFINE(HAVE_SOUND_ESD, 1, [EsounD sound support]) +AC_DEFINE(USE_SOUND_ESD, 1, [EsounD sound support]) fi fi AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound" = "xesound") @@ -138,16 +136,19 @@ if test "x$enable_sound" = "xsndio"; then AC_CHECK_LIB(sndio, sio_open, SNDIO_LIBS="-lsndio", enable_sound=no) AC_SUBST(SNDIO_LIBS) if test "x$enable_sound" = "xsndio"; then -AC_DEFINE(HAVE_SOUND, 1, [Sound support]) -AC_DEFINE(HAVE_SOUND_SNDIO, 1, [Sndio sound support]) -enable_sound=sndio +AC_DEFINE(USE_SOUND_SNDIO, 1, [Sndio sound support]) fi fi AM_CONDITIONAL(USE_LIBSNDIO, test "x$enable_sound" = "xsndio") -if test "x$enable_sound" != "xno" -a "x$with_sndldr" = "xnone"; then - AC_MSG_ERROR([Sound support requires a sound loader]) -fi +case x$enable_sound in +xpulseaudio|xesound|xsndio) + if test "x$with_sndldr" = "xnone"; then +AC_MSG_ERROR([Sound support requires a sound loader]) + fi + AC_DEFINE(ENABLE_SOUND, 1, [Sound support]) + ;; +esac # Save CPPFLAGS/LDFLAGS and add X_... to each SAVE_CPPFLAGS="$CPPFLAGS" diff --git a/src/ipc.c b/src/ipc.c index b9a094bf..5c7bcfed 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -1508,7 +1508,7 @@ IPC_Compat(const char *params) _("composite")); } #endif -#if !HAVE_SOUND +#if !ENABLE_SOUND else if (!strcmp(param1, "sound")) { DialogOK(_("Message"), _("e16 was built without %s support"), diff --git a/src/mod-misc.c b/src/mod-misc.c index 0a8b8478..131d84d1 100644 --- a/src/mod-misc.c +++ b/src/mod-misc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2018 Kim Woelders + * Copyright (C) 2003-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -57,7 +57,7 @@ extern const EModule ModMisc; extern const EModule ModPagers; extern const EModule ModSlideouts; -#if HAVE_SOUND +#if ENABLE_SOUND extern const EModule ModSound; #endif extern const EModule ModTextclass; @@ -91,7 +91,7 @@ const EModule *const p_modules[] = { , , , -#if HAVE_SOUND +#if ENABLE_SOUND , #endif , diff --git a/src/settings.c b/src/settings.c index cfd8fddc..dfa34c08 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -697,7 +697,7 @@ static const DialogDef *const dialogs[] = { , , , -#if HAVE_SOUND +#if ENABLE_SOUND , #endif , diff --git a/src/sound.c b/src/sound.c index 2433f6a0..cbe9e78f 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 C
[EGIT] [e16/e16] master 03/06: Espawn(): Use variable argument list
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=8b106100954c36cd1fb221ec9afc4292926bdc99 commit 8b106100954c36cd1fb221ec9afc4292926bdc99 Author: Kim Woelders Date: Fri May 1 04:02:56 2020 +0200 Espawn(): Use variable argument list --- src/E.h | 4 ++-- src/actions.c | 12 +--- src/main.c| 8 ++-- src/snaps.c | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/E.h b/src/E.h index dd90bfa4..99bedd65 100644 --- a/src/E.h +++ b/src/E.h @@ -3,7 +3,7 @@ /*/ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -447,7 +447,7 @@ voidAbout(void); #define EXEC_SET_STARTUP_ID 0x02 voidEexec(const char *cmd); int EspawnApplication(const char *params, int flags); -voidEspawn(const char *cmd); +voidEspawn(const char *fmt, ...); int __PRINTF__ Esystem(const char *fmt, ...); /* config.c */ diff --git a/src/actions.c b/src/actions.c index 8d5dd573..1252f1d4 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2017 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -211,12 +211,18 @@ _Espawn(int argc __UNUSED__, char **argv) } void -Espawn(const char *cmd) +Espawn(const char *fmt, ...) { + va_list args; + charbuf[FILEPATH_LEN_MAX]; int argc; char **argv; - argv = StrlistDecodeEscaped(cmd, ); + va_start(args, fmt); + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + + argv = StrlistDecodeEscaped(buf, ); _Espawn(argc, argv); StrlistFree(argv, argc); } diff --git a/src/main.c b/src/main.c index f8b22c41..58033629 100644 --- a/src/main.c +++ b/src/main.c @@ -471,17 +471,13 @@ RunDocBrowser(void) if (!canread(buf)) return; - Esnprintf(buf, sizeof(buf), "%s/edox %s/E-docs", EDirBin(), EDirRoot()); - Espawn(buf); + Espawn("%s/edox %s/E-docs", EDirBin(), EDirRoot()); } static void RunMenuGen(void) { - charbuf[FILEPATH_LEN_MAX]; - - Esnprintf(buf, sizeof(buf), "%s/scripts/e_gen_menu", EDirRoot()); - Espawn(buf); + Espawn("%s/scripts/e_gen_menu", EDirRoot()); } static void diff --git a/src/snaps.c b/src/snaps.c index 369d68f5..9c801bfe 100644 --- a/src/snaps.c +++ b/src/snaps.c @@ -1170,7 +1170,7 @@ SnapshotsSpawn(void) !sn->used && !(sn->match_flags & SNAP_MATCH_MULTIPLE)) { sn->startup_id = ++Mode.apps.startup_id; - Espawn(sn->cmd); + Espawn("%s", sn->cmd); } } } --
[EGIT] [e16/e16] master 01/06: edox: Add a couple of forgotten casts
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=893ccb4bce7ea6d707498b3ac8b83f6e25c5d7f1 commit 893ccb4bce7ea6d707498b3ac8b83f6e25c5d7f1 Author: Kim Woelders Date: Fri May 1 14:10:12 2020 +0200 edox: Add a couple of forgotten casts --- dox/format.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dox/format.c b/dox/format.c index ceefa84e..32146463 100644 --- a/dox/format.c +++ b/dox/format.c @@ -153,7 +153,7 @@ BuildObj(Object * obj, char *var, char *param) switch (obj->type) { case IMG: - img = obj->object; + img = (Img_ *) obj->object; if (!img) { img = EMALLOC(Img_, 1); @@ -183,7 +183,7 @@ BuildObj(Object * obj, char *var, char *param) case BR: break; case FONT: - fn = obj->object; + fn = (Font_ *) obj->object; if (!fn) { fn = EMALLOC(Font_, 1); @@ -214,7 +214,7 @@ BuildObj(Object * obj, char *var, char *param) } break; case P: - p = obj->object; + p = (P_ *) obj->object; if (!p) { p = EMALLOC(P_, 1); @@ -231,7 +231,7 @@ BuildObj(Object * obj, char *var, char *param) case TEXT: break; case PAGE: - pg = obj->object; + pg = (Page *) obj->object; if (!pg) { pg = EMALLOC(Page, 1); --
[EGIT] [e16/e16] master 06/06: Optionally play sounds using audio player
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=1ea08c20751ba43ad8b935cdb173d172799567c9 commit 1ea08c20751ba43ad8b935cdb173d172799567c9 Author: Kim Woelders Date: Thu Apr 30 21:39:14 2020 +0200 Optionally play sounds using audio player --- configure.ac | 15 +++ src/sound.c | 39 --- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 941aba2b..d3e615d0 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,9 @@ xyes) enable_sound=pulseaudio;; xpulseaudio|xesound|xsndio) ;; +xplayer) + with_sndldr=none + ;; *) enable_sound=no;; esac @@ -141,6 +144,15 @@ if test "x$enable_sound" = "xsndio"; then fi AM_CONDITIONAL(USE_LIBSNDIO, test "x$enable_sound" = "xsndio") +if test "x$enable_sound" = "xplayer"; then + AC_DEFINE(USE_SOUND_PLAYER, 1, [Play sounds using audio player]) + AC_ARG_WITH(sndplayer, +AC_HELP_STRING([--with-sndplayer], + [select sound player @<:@default="/usr/bin/aplay -q %s"@:>@]),, +with_sndplayer="/usr/bin/aplay -q %s") +AC_DEFINE_UNQUOTED(SOUND_PLAYER_FMT, "$with_sndplayer", [Audio player]), +fi + case x$enable_sound in xpulseaudio|xesound|xsndio) if test "x$with_sndldr" = "xnone"; then @@ -148,6 +160,9 @@ xpulseaudio|xesound|xsndio) fi AC_DEFINE(ENABLE_SOUND, 1, [Sound support]) ;; +xplayer) + AC_DEFINE(ENABLE_SOUND, 1, [Sound support]) + ;; esac # Save CPPFLAGS/LDFLAGS and add X_... to each diff --git a/src/sound.c b/src/sound.c index cbe9e78f..a47bb72f 100644 --- a/src/sound.c +++ b/src/sound.c @@ -30,12 +30,16 @@ #include "sound.h" #include "sounds.h" +#define HAVE_SOUND_OPS 1 + #if USE_SOUND_ESD #define SOUND_SERVER_NAME "esd" #elif USE_SOUND_PULSE #define SOUND_SERVER_NAME "pulseaudio" #elif USE_SOUND_SNDIO #define SOUND_SERVER_NAME "sndio" +#elif USE_SOUND_PLAYER +#undef HAVE_SOUND_OPS #else #error Invalid sound configuration #endif @@ -153,8 +157,10 @@ _SclassSampleDestroy(void *data, void *user_data __UNUSED__) if (!sclass || !sclass->sample) return; +#if HAVE_SOUND_OPS if (ops) ops->SampleDestroy(sclass->sample); +#endif sclass->sample = NULL; } @@ -196,12 +202,29 @@ _SclassDestroy(void *data, void *user_data __UNUSED__) SclassDestroy((SoundClass *) data); } +#if USE_SOUND_PLAYER +static void +_SclassPlayAplay(SoundClass * sclass) +{ + char *file; + + file = FindFile(sclass->file, SOUND_THEME_PATH, FILE_TYPE_SOUND); + if (!file) + return; + Espawn(SOUND_PLAYER_FMT, file); + Efree(file); +} +#endif + static void SclassApply(SoundClass * sclass) { if (!sclass || !Conf_sound.enable) return; +#if USE_SOUND_PLAYER + _SclassPlayAplay(sclass); +#else if (!sclass->sample) { char *file; @@ -226,6 +249,7 @@ SclassApply(SoundClass * sclass) } ops->SamplePlay(sclass->sample); +#endif } static int @@ -291,12 +315,11 @@ SoundFree(const char *name) static void SoundInit(void) { - int err; - if (!Conf_sound.enable) return; - err = -1; +#if HAVE_SOUND_OPS + #if USE_MODULES if (!ops) #if USE_SOUND_ESD @@ -304,11 +327,9 @@ SoundInit(void) #elif USE_SOUND_PULSE ops = ModLoadSym("sound", "SoundOps", "pa"); #endif -#endif - if (ops && ops->Init) - err = ops->Init(); +#endif /* USE_MODULES */ - if (err) + if (!ops || ops->Init()) { Conf_sound.enable = 0; AlertX(_("Error initialising sound"), _("OK"), NULL, NULL, @@ -317,6 +338,8 @@ SoundInit(void) "Audio will now be disabled.\n"), SOUND_SERVER_NAME); } +#endif /* HAVE_SOUND_OPS */ + _SoundConfigLoad(); } @@ -327,8 +350,10 @@ SoundExit(void) LIST_FOR_EACH(SoundClass, _list, sc) _SclassSampleDestroy(sc, NULL); +#if HAVE_SOUND_OPS if (ops) ops->Exit(); +#endif Conf_sound.enable = 0; } --
[EGIT] [e16/e16] master 02/03: Minor cleanups after sound by audio player feature
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=42447b16d301b97a7b18666849e74f5550505152 commit 42447b16d301b97a7b18666849e74f5550505152 Author: Kim Woelders Date: Fri May 1 19:06:07 2020 +0200 Minor cleanups after sound by audio player feature - Correct configure.ac help string - Issue warning if player is not executable Also change sound server problem warning message from GSOD to dialog. --- configure.ac | 2 +- src/sound.c | 21 + 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index d3e615d0..3dae8a8e 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,7 @@ AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes") AC_ARG_ENABLE(sound, AC_HELP_STRING([--enable-sound], - [compile with sound support (pulseaudio/esound/sndio/no)@<:@default=pulseaudio@:>@]),, + [compile with sound support (pulseaudio/esound/sndio/player/no)@<:@default=pulseaudio@:>@]),, enable_sound=pulseaudio) case x$enable_sound in xyes) diff --git a/src/sound.c b/src/sound.c index a47bb72f..9dc796c3 100644 --- a/src/sound.c +++ b/src/sound.c @@ -25,6 +25,7 @@ #if ENABLE_SOUND #include "dialog.h" #include "emodule.h" +#include "file.h" #include "list.h" #include "settings.h" #include "sound.h" @@ -332,10 +333,22 @@ SoundInit(void) if (!ops || ops->Init()) { Conf_sound.enable = 0; - AlertX(_("Error initialising sound"), _("OK"), NULL, NULL, - _("Audio was enabled for Enlightenment but there was an error\n" -"communicating with the audio server (%s).\n" -"Audio will now be disabled.\n"), SOUND_SERVER_NAME); + DialogOK(_("Error initialising sound"), +_ +("Audio was enabled for Enlightenment but there was an error\n" + "communicating with the audio server (%s).\n" + "Audio will now be disabled.\n"), SOUND_SERVER_NAME); + } + +#elif USE_SOUND_PLAYER + + if (!path_canexec0(SOUND_PLAYER_FMT)) + { + Conf_sound.enable = 0; + DialogOK(_("Error initialising sound"), +_ +("The sound player is not executable (%s).\n" + "Audio will now be disabled.\n"), SOUND_PLAYER_FMT); } #endif /* HAVE_SOUND_OPS */ --
[EGIT] [e16/e16] master 03/03: GSOD: Avoid rendering artifacts when unmapped
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=d24cdd303bc7e88cc93104f33103c9751132f4fc commit d24cdd303bc7e88cc93104f33103c9751132f4fc Author: Kim Woelders Date: Sat May 2 06:43:11 2020 +0200 GSOD: Avoid rendering artifacts when unmapped Somewhat hacky as the compositor may discard window events if the window destroy event is received in the same batch as the map(reparent) event, hence the delay before destroy. --- src/alert.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/alert.c b/src/alert.c index 37e13af7..0b9c8640 100644 --- a/src/alert.c +++ b/src/alert.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -277,7 +277,10 @@ ShowAlert(const char *title, { root = DefaultRootWindow(dd); } - win = XCreateWindow(dd, root, -100, -100, 1, 1, 0, + + x = y = -100; + ww = hh = 1; + win = XCreateWindow(dd, root, x, y, ww, hh, 0, CopyFromParent, InputOutput, CopyFromParent, mask, ); gc = XCreateGC(dd, win, 0, ); @@ -530,6 +533,16 @@ ShowAlert(const char *title, XFreeFontSet(dd, xfs); done: XUngrabServer(dd); +#if USE_COMPOSITE_OVERLAY_WINDOW + /* Force damage on root window where GSOD is/was rendered */ + if (root != DefaultRootWindow(dd)) + { + XReparentWindow(dd, win, DefaultRootWindow(dd), x, y); + XUnmapWindow(dd, win); + XSync(dd, False); + SleepUs(2); + } +#endif XDestroyWindow(dd, win); XFreeGC(dd, gc); if (cnum > 0) --
[EGIT] [e16/e16] master 01/03: Introduce path_canexec0() for convenience
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9a6825fadf78e15b8f11c75340f04c8006829edd commit 9a6825fadf78e15b8f11c75340f04c8006829edd Author: Kim Woelders Date: Sat May 2 07:59:58 2020 +0200 Introduce path_canexec0() for convenience --- src/file.c | 12 +++- src/file.h | 3 ++- src/menus-misc.c | 3 +-- src/menus.c | 5 + 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/file.c b/src/file.c index 94ff234c..c1153732 100644 --- a/src/file.c +++ b/src/file.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007-2015 Kim Woelders + * Copyright (C) 2007-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -321,3 +321,13 @@ path_canexec(const char *file) Efree(s); return 1; } + +int +path_canexec0(const char *cmd) +{ + charexe[4096]; + + sscanf(cmd, "%4000s", exe); + + return path_canexec(exe); +} diff --git a/src/file.h b/src/file.h index 6c1a0e8b..0ac70439 100644 --- a/src/file.h +++ b/src/file.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007 Kim Woelders + * Copyright (C) 2007-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -60,5 +60,6 @@ const char *fullfileof(const char *s); char *path_test(const char *file, unsigned int test); int path_canexec(const char *file); +int path_canexec0(const char *cmd); #endif /* _FILE_H_ */ diff --git a/src/menus-misc.c b/src/menus-misc.c index b0749094..e6c93c2a 100644 --- a/src/menus-misc.c +++ b/src/menus-misc.c @@ -316,8 +316,7 @@ FillFlatFileMenu(Menu * m, const char *file) if ((act) && (!strcmp(act, "exec")) && (params)) { - sscanf(params, "%4000s", wd); - if (path_canexec(wd)) + if (path_canexec0(params)) { Esnprintf(wd, sizeof(wd), "exec %s", params); mi = MenuItemCreate(txt, icon, wd, NULL); diff --git a/src/menus.c b/src/menus.c index ba693234..359801c4 100644 --- a/src/menus.c +++ b/src/menus.c @@ -1846,10 +1846,7 @@ MenuConfigLoad(FILE * fs) /* if its an execute line then check to see if the exec is * on your system before adding the menu entry */ if (!strcmp(s2, "exec")) - { - sscanf(p3, "%1000s", s3); - ok = path_canexec(s3); - } +ok = path_canexec0(p3); if (ok) { mi = MenuItemCreate(txt, icon, p2, NULL); --
[EGIT] [e16/e16] master 01/01: Avoid potential crash when attempting to enable sound, cosmetics
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=26e106a6134d8131bd71581e639a091de9baa70f commit 26e106a6134d8131bd71581e639a091de9baa70f Author: Kim Woelders Date: Fri May 1 21:09:10 2020 +0200 Avoid potential crash when attempting to enable sound, cosmetics IF sound initialization fails AND then attempting to enabling sound with "eesh set sound.enable 1" (which didn't actually enable sound), e16 could crash. --- src/sound.c | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/sound.c b/src/sound.c index 9dc796c3..1ab4b18d 100644 --- a/src/sound.c +++ b/src/sound.c @@ -35,10 +35,13 @@ #if USE_SOUND_ESD #define SOUND_SERVER_NAME "esd" +#define SOUND_MODULE_NAME "esd" #elif USE_SOUND_PULSE #define SOUND_SERVER_NAME "pulseaudio" +#define SOUND_MODULE_NAME "pa" #elif USE_SOUND_SNDIO #define SOUND_SERVER_NAME "sndio" +#define SOUND_MODULE_NAME "sndio" #elif USE_SOUND_PLAYER #undef HAVE_SOUND_OPS #else @@ -323,12 +326,8 @@ SoundInit(void) #if USE_MODULES if (!ops) -#if USE_SOUND_ESD - ops = ModLoadSym("sound", "SoundOps", "esd"); -#elif USE_SOUND_PULSE - ops = ModLoadSym("sound", "SoundOps", "pa"); + ops = ModLoadSym("sound", "SoundOps", SOUND_MODULE_NAME); #endif -#endif /* USE_MODULES */ if (!ops || ops->Init()) { @@ -338,6 +337,7 @@ SoundInit(void) ("Audio was enabled for Enlightenment but there was an error\n" "communicating with the audio server (%s).\n" "Audio will now be disabled.\n"), SOUND_SERVER_NAME); + return; } #elif USE_SOUND_PLAYER @@ -349,6 +349,7 @@ SoundInit(void) _ ("The sound player is not executable (%s).\n" "Audio will now be disabled.\n"), SOUND_PLAYER_FMT); + return; } #endif /* HAVE_SOUND_OPS */ @@ -371,6 +372,19 @@ SoundExit(void) Conf_sound.enable = 0; } +static void +_SoundConfigure(int enable) +{ + if (Conf_sound.enable == enable) + return; + Conf_sound.enable = enable; + + if (Conf_sound.enable) + SoundInit(); + else + SoundExit(); +} + /* * Configuration load/save */ @@ -435,6 +449,12 @@ _SoundConfigUnload(void) Mode_sound.cfg_loaded = 0; } +static void +_SoundEnableChange(void *item __UNUSED__, const char *sval) +{ + _SoundConfigure(!!atoi(sval)); +} + static void _SoundThemeChange(void *item __UNUSED__, const char *theme) { @@ -483,12 +503,7 @@ static void _Dlg_ApplySound(Dialog * d __UNUSED__, int val __UNUSED__, void *data __UNUSED__) { - Conf_sound.enable = tmp_audio; - if (Conf_sound.enable) - SoundInit(); - else - SoundExit(); - + _SoundConfigure(tmp_audio); autosave(); } @@ -554,13 +569,12 @@ SoundIpc(const char *params) } else if (!strncmp(cmd, "off", 2)) { - SoundExit(); + _SoundConfigure(0); autosave(); } else if (!strncmp(cmd, "on", 2)) { - Conf_sound.enable = 1; - SoundInit(); + _SoundConfigure(1); autosave(); } else if (!strncmp(cmd, "play", 2)) @@ -584,7 +598,7 @@ static const IpcItem SoundIpcArray[] = { #define N_IPC_FUNCS (sizeof(SoundIpcArray)/sizeof(IpcItem)) static const CfgItem SoundCfgItems[] = { - CFG_ITEM_BOOL(Conf_sound, enable, 0), + CFG_FUNC_BOOL(Conf_sound, enable, 0, _SoundEnableChange), CFG_FUNC_STR(Conf_sound, theme, _SoundThemeChange), CFG_ITEM_HEX(Conf_sound, mask1, 0), CFG_ITEM_HEX(Conf_sound, mask2, 0), --
[EGIT] [e16/e16] master 02/02: Add alsa-lib sound backend
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=be8c4faf6099782261518a8c1bf33e980f730efe commit be8c4faf6099782261518a8c1bf33e980f730efe Author: Kim Woelders Date: Thu Apr 30 21:39:14 2020 +0200 Add alsa-lib sound backend --- configure.ac | 13 -- src/Makefile.am | 19 ++-- src/sound.c | 6 +++ src/sound_alsa.c | 139 +++ 4 files changed, 169 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 3dae8a8e..4bdafbcc 100644 --- a/configure.ac +++ b/configure.ac @@ -85,12 +85,12 @@ AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes") AC_ARG_ENABLE(sound, AC_HELP_STRING([--enable-sound], - [compile with sound support (pulseaudio/esound/sndio/player/no)@<:@default=pulseaudio@:>@]),, + [compile with sound support (pulseaudio/esound/sndio/alsa/player/no)@<:@default=pulseaudio@:>@]),, enable_sound=pulseaudio) case x$enable_sound in xyes) enable_sound=pulseaudio;; -xpulseaudio|xesound|xsndio) +xpulseaudio|xesound|xsndio|xalsa) ;; xplayer) with_sndldr=none @@ -153,8 +153,15 @@ if test "x$enable_sound" = "xplayer"; then AC_DEFINE_UNQUOTED(SOUND_PLAYER_FMT, "$with_sndplayer", [Audio player]), fi +if test "x$enable_sound" = "xalsa"; then + PKG_CHECK_MODULES(ALSA, alsa, +AC_DEFINE(USE_SOUND_ALSA, 1, [ALSA sound support]), +enable_sound=no) +fi +AM_CONDITIONAL(USE_LIBALSA, test "x$enable_sound" = "xalsa") + case x$enable_sound in -xpulseaudio|xesound|xsndio) +xpulseaudio|xesound|xsndio|xalsa) if test "x$with_sndldr" = "xnone"; then AC_MSG_ERROR([Sound support requires a sound loader]) fi diff --git a/src/Makefile.am b/src/Makefile.am index 40534f96..0d798849 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -172,7 +172,7 @@ MODULE_LIBS = $(DLOPEN_LIBS) libe16dir = $(pkglibdir) -libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PA) $(LIBSND_SNDIO) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) +libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PA) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) if USE_LIBESD LIBSND_ESD = libsound_esd.la @@ -193,11 +193,19 @@ endif if USE_LIBSNDIO LIBSND_SNDIO = libsound_sndio.la libsound_sndio_la_SOURCES = sound_sndio.c sound_load.c -libsound_sndio_la_CFLAGS = $(SNDIO_CFLAGS) $(AUDIOFILE_CFLAGS) $(CWARNFLAGS) -libsound_sndio_la_LIBADD = $(SNDIO_LIBS) $(AUDIOFILE_LIBS) +libsound_sndio_la_CFLAGS = $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) +libsound_sndio_la_LIBADD = $(SNDIO_LIBS) $(SNDLDR_LIBS) libsound_sndio_la_LDFLAGS = -module -avoid-version endif +if USE_LIBALSA +LIBSND_ALSA = libsound_alsa.la +libsound_alsa_la_SOURCES = sound_alsa.c sound_load.c +libsound_alsa_la_CFLAGS = $(ALSA_CFLAGS) $(SNDLDR_CFLAGS) +libsound_alsa_la_LIBADD = $(ALSA_LIBS) $(SNDLDR_LIBS) +libsound_alsa_la_LDFLAGS = -module -avoid-version +endif + LIBFNT_IFT = libfont_ift.la libfont_ift_la_SOURCES= ttfont.c libfont_ift_la_CFLAGS = $(IMLIB2_CFLAGS) @@ -222,8 +230,9 @@ endif else -MODULE_SRCS = sound_esd.c sound_pa.c sound_sndio.c sound_load.c ttfont.c text_xft.c text_pango.c -MODULE_LIBS = $(ESD_LIBS) $(PA_LIBS) $(SNDIO_LIBS) $(SNDLDR_LIBS) $(PANGO_LIBS) $(XFT_LIBS) +MODULE_SRCS = sound_esd.c sound_pa.c sound_sndio.c sound_alsa.c sound_load.c \ + ttfont.c text_xft.c text_pango.c +MODULE_LIBS = $(ESD_LIBS) $(PA_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) $(PANGO_LIBS) $(XFT_LIBS) MODULE_CFLAGS = $(ESD_CFLAGS) $(PA_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) $(PANGO_CFLAGS) $(XFT_CFLAGS) endif diff --git a/src/sound.c b/src/sound.c index 1ab4b18d..ace6db43 100644 --- a/src/sound.c +++ b/src/sound.c @@ -42,6 +42,9 @@ #elif USE_SOUND_SNDIO #define SOUND_SERVER_NAME "sndio" #define SOUND_MODULE_NAME "sndio" +#elif USE_SOUND_ALSA +#define SOUND_SERVER_NAME "ALSA" +#define SOUND_MODULE_NAME "alsa" #elif USE_SOUND_PLAYER #undef HAVE_SOUND_OPS #else @@ -86,6 +89,9 @@ static const SoundOps *ops = _pa; #elif USE_SOUND_SNDIO extern const SoundOps SoundOps_sndio; static const SoundOps *ops = _sndio; +#elif USE_SOUND_ALSA +extern const SoundOps SoundOps_alsa; +static const SoundOps *ops = _alsa; #endif #endif diff --git a/src/sound_alsa.c b/src/sound_alsa.c new file mode 100644 index ..b22558e3 --- /dev/null +++ b/src/sound_alsa.c @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2020 Kim Woelders + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Softwa
[EGIT] [e16/e16] master 01/02: Minor cleanups in sound players
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=47d955586120fb74d529098b5695d3e13542c63e commit 47d955586120fb74d529098b5695d3e13542c63e Author: Kim Woelders Date: Tue May 5 06:17:53 2020 +0200 Minor cleanups in sound players The sample pointers will never be NULL in _Play() and _Destroy() so drop checks. Also drop some pointless pointer clearing. --- src/sound_esd.c | 7 ++- src/sound_pa.c| 12 +--- src/sound_sndio.c | 7 ++- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/sound_esd.c b/src/sound_esd.c index 28c67717..6c0d8e84 100644 --- a/src/sound_esd.c +++ b/src/sound_esd.c @@ -95,9 +95,6 @@ _sound_esd_Load(const char *file) static void _sound_esd_Destroy(Sample * s) { - if (!s) - return; - if (s->id && sound_fd >= 0) { /* Why the hell is this symbol not in esd? */ @@ -105,14 +102,14 @@ _sound_esd_Destroy(Sample * s) /* esd_sample_kill(sound_fd,s->id); */ esd_sample_free(sound_fd, s->id); } - EFREE_NULL(s->ssd.data); + Efree(s->ssd.data); Efree(s); } static void _sound_esd_Play(Sample * s) { - if (sound_fd < 0 || !s) + if (sound_fd < 0) return; if (s->id > 0) diff --git a/src/sound_pa.c b/src/sound_pa.c index 7814a7fd..0944425e 100644 --- a/src/sound_pa.c +++ b/src/sound_pa.c @@ -182,9 +182,7 @@ _sound_pa_Destroy(Sample * s) { pa_operation *op; - D2printf("%s beg: %s\n", __func__, s ? s->name : "?"); - if (!s) - return; + D2printf("%s beg: %s\n", __func__, s->name); if (pa_ctx && s->name) { @@ -196,8 +194,8 @@ _sound_pa_Destroy(Sample * s) } D2printf("%s end\n", __func__); - EFREE_NULL(s->name); - EFREE_NULL(s->ssd.data); + Efree(s->name); + Efree(s->ssd.data); Efree(s); } @@ -270,8 +268,8 @@ _sound_pa_Play(Sample * s) { pa_operation *op; - D2printf("%s beg: %s\n", __func__, s ? s->name : "?"); - if (!pa_ctx || !s) + D2printf("%s beg: %s\n", __func__, s->name); + if (!pa_ctx) return; op = pa_context_play_sample(pa_ctx, s->name, NULL, PA_VOLUME_NORM, diff --git a/src/sound_sndio.c b/src/sound_sndio.c index 0155818b..39ac7997 100644 --- a/src/sound_sndio.c +++ b/src/sound_sndio.c @@ -63,10 +63,7 @@ _sound_sndio_Load(const char *file) static void _sound_sndio_Destroy(Sample * s) { - if (!s) - return; - - EFREE_NULL(s->ssd.data); + Efree(s->ssd.data); Efree(s); } @@ -75,7 +72,7 @@ _sound_sndio_Play(Sample * s) { struct sio_par params; - if (hdl == NULL || !s) + if (hdl == NULL) return; sio_initpar(); --
[EGIT] [legacy/imlib2] master 01/01: imlib2_load: Optionally use imlib_load_image_fd()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=06aa6d1bfce88d26176f5127b57c856fef493398 commit 06aa6d1bfce88d26176f5127b57c856fef493398 Author: Kim Woelders Date: Tue Feb 25 19:31:07 2020 +0100 imlib2_load: Optionally use imlib_load_image_fd() --- src/bin/imlib2_load.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/bin/imlib2_load.c b/src/bin/imlib2_load.c index 03b1632..1b65178 100644 --- a/src/bin/imlib2_load.c +++ b/src/bin/imlib2_load.c @@ -1,6 +1,8 @@ #include "config.h" +#include #include #include +#include #include #include @@ -19,6 +21,7 @@ static FILE*fout; " imlib2_load [OPTIONS] FILE...\n" \ "OPTIONS:\n" \ " -e : Break on error\n" \ + " -f : Load with imlib_load_image_fd()\n" \ " -n N: Reeat load N times\n" \ " -p : Check that progress is called\n" \ " -x : Print to stderr\n" @@ -47,6 +50,25 @@ time_us(void) #endif } +static Imlib_Image * +image_load_fd(const char *file) +{ + Imlib_Image*im; + int fd; + const char *ext; + + ext = strchr(file, '.'); + if (ext) + ext += 1; + else + ext = file; + + fd = open(file, O_RDONLY); + im = imlib_load_image_fd(fd, ext); + + return im; +} + static int progress(Imlib_Image im, char percent, int update_x, int update_y, int update_w, int update_h) @@ -66,20 +88,25 @@ main(int argc, char **argv) int break_on_error; int show_time; int load_cnt, cnt; + int load_fd; fout = stdout; check_progress = 0; break_on_error = 0; load_cnt = 1; show_time = 0; + load_fd = 0; - while ((opt = getopt(argc, argv, "en:px")) != -1) + while ((opt = getopt(argc, argv, "efn:px")) != -1) { switch (opt) { case 'e': break_on_error += 1; break; + case 'f': + load_fd = 1; + break; case 'n': load_cnt = atoi(optarg); show_time = 1; @@ -125,6 +152,8 @@ main(int argc, char **argv) if (check_progress) im = imlib_load_image_with_error_return(argv[0], ); + else if (load_fd) +im = image_load_fd(argv[0]); else im = imlib_load_image(argv[0]); @@ -134,7 +163,7 @@ main(int argc, char **argv) lerr, argv[0]); if (break_on_error & 2) goto quit; - continue; + goto next; } imlib_context_set_image(im); @@ -154,6 +183,8 @@ main(int argc, char **argv) if (break_on_error & 1) goto quit; } + next: +; } quit: --
[EGIT] [legacy/imlib2] master 01/01: configure.ac: Drop initial config.cache removal
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=0547caa67aa8dd152d014a4d33dc745d452703c7 commit 0547caa67aa8dd152d014a4d33dc745d452703c7 Author: Kim Woelders Date: Sat Mar 7 08:49:37 2020 +0100 configure.ac: Drop initial config.cache removal Not removing config.cache does not seem to cause trouble elsewhere. --- configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3e8f6e6..89a0898 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,3 @@ -# get rid of that stupid cache mechanism -rm -f config.cache - AC_INIT([imlib2], [1.6.1], [enlightenment-de...@lists.sourceforge.net]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_MACRO_DIR([m4]) --
[EGIT] [e16/e16] master 02/03: Fix obscure m4 problem
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=33a0c3e595e410c12e8730dedf12d11d09cfaab4 commit 33a0c3e595e410c12e8730dedf12d11d09cfaab4 Author: Kim Woelders Date: Tue May 5 20:09:20 2020 +0200 Fix obscure m4 problem The line define(ec_c_compile_cpp, ifelse([$1], [cpp], [yes], [no])) potentially caused weird problems later in configure.ac. Using m4_define instead cured that. So let's do define() -> m4_define() elsewhere too. --- m4/ec_visibility.m4 | 2 +- m4/ec_warnflags.m4 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/ec_visibility.m4 b/m4/ec_visibility.m4 index ed64b12a..2116bf3c 100644 --- a/m4/ec_visibility.m4 +++ b/m4/ec_visibility.m4 @@ -26,7 +26,7 @@ AC_DEFUN([EC_C_VISIBILITY], [ AC_REQUIRE([AC_PROG_CC]) - define(ec_c_vis_default, ifelse([$1], [no], [no], [yes])) + m4_define([ec_c_vis_default], ifelse([$1], [no], [no], [yes])) CFLAGS_VISIBILITY= HAVE_VISIBILITY=0 diff --git a/m4/ec_warnflags.m4 b/m4/ec_warnflags.m4 index 83f3e2eb..d55e80d2 100644 --- a/m4/ec_warnflags.m4 +++ b/m4/ec_warnflags.m4 @@ -9,7 +9,7 @@ dnl Usage: EC_C_WARNINGS([LANG]) dnl Set LANG to 'cpp' when compiling for C++ AC_DEFUN([EC_C_WARNINGS], [ - define(ec_c_compile_cpp, ifelse([$1], [cpp], [yes], [no])) + m4_define([ec_c_compile_cpp], ifelse([$1], [cpp], [yes], [no])) AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], @@ -20,7 +20,7 @@ AC_DEFUN([EC_C_WARNINGS], [ CFLAGS_WARNINGS="-W -Wall -Waggregate-return -Wcast-align -Wpointer-arith -Wshadow -Wwrite-strings" ifelse(ec_c_compile_cpp, no, [ CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes" -],) +]) if test "x$enable_werror" = "xyes"; then CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Werror" --
[EGIT] [e16/e16] master 01/03: Autofoo cosmetics (AC_HELP_STRING -> AS_HELP_STRING).
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=258d174ffabd9373a163b761511bc2c501a6fa0c commit 258d174ffabd9373a163b761511bc2c501a6fa0c Author: Kim Woelders Date: Tue May 5 22:28:46 2020 +0200 Autofoo cosmetics (AC_HELP_STRING -> AS_HELP_STRING). --- configure.ac | 54 +++--- m4/ec_warnflags.m4 | 3 ++- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/configure.ac b/configure.ac index 4bdafbcc..faeb08bf 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,7 @@ if test "x$have_clock_gettime" != xno; then fi AC_ARG_ENABLE(hints-gnome, - AC_HELP_STRING([--enable-hints-gnome], + AS_HELP_STRING([--enable-hints-gnome], [compile with GNOME(<2.0) hints support @<:@default=no@:>@]),, enable_hints_gnome=no) @@ -84,7 +84,7 @@ fi AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes") AC_ARG_ENABLE(sound, - AC_HELP_STRING([--enable-sound], + AS_HELP_STRING([--enable-sound], [compile with sound support (pulseaudio/esound/sndio/alsa/player/no)@<:@default=pulseaudio@:>@]),, enable_sound=pulseaudio) case x$enable_sound in @@ -100,7 +100,7 @@ xplayer) esac AC_ARG_WITH(sndldr, - AC_HELP_STRING([--with-sndldr], + AS_HELP_STRING([--with-sndldr], [select sound loader (audiofile/sndfile/none) @<:@default=sndfile@:>@]),, with_sndldr=sndfile) @@ -147,7 +147,7 @@ AM_CONDITIONAL(USE_LIBSNDIO, test "x$enable_sound" = "xsndio") if test "x$enable_sound" = "xplayer"; then AC_DEFINE(USE_SOUND_PLAYER, 1, [Play sounds using audio player]) AC_ARG_WITH(sndplayer, -AC_HELP_STRING([--with-sndplayer], +AS_HELP_STRING([--with-sndplayer], [select sound player @<:@default="/usr/bin/aplay -q %s"@:>@]),, with_sndplayer="/usr/bin/aplay -q %s") AC_DEFINE_UNQUOTED(SOUND_PLAYER_FMT, "$with_sndplayer", [Audio player]), @@ -193,7 +193,7 @@ AC_CHECK_LIB(Imlib2, imlib_set_ximage_cache_count_max, $IMLIB2_LIBS) AC_ARG_ENABLE(sm, - AC_HELP_STRING([--enable-sm], [compile with session management support @<:@default=yes@:>@]),, + AS_HELP_STRING([--enable-sm], [compile with session management support @<:@default=yes@:>@]),, enable_sm=yes) if test "x$enable_sm" = "xyes"; then PKG_CHECK_MODULES(SM, sm ice, , @@ -205,7 +205,7 @@ if test "x$enable_sm" = "xyes"; then fi AC_ARG_ENABLE(pango, - AC_HELP_STRING([--enable-pango], [compile with pango-xft support @<:@default=yes@:>@]),, + AS_HELP_STRING([--enable-pango], [compile with pango-xft support @<:@default=yes@:>@]),, enable_pango=yes) if test "x$enable_pango" = "xyes"; then PKG_CHECK_MODULES(PANGO, pangoxft gobject-2.0, AC_DEFINE(USE_PANGO, 1, [pango-xft support]), enable_pango=no) @@ -213,7 +213,7 @@ fi AM_CONDITIONAL(USE_LIBPANGO, test "x$enable_pango" = "xyes") AC_ARG_ENABLE(xft, - AC_HELP_STRING([--enable-xft], [compile with Xft support @<:@default=yes@:>@]),, + AS_HELP_STRING([--enable-xft], [compile with Xft support @<:@default=yes@:>@]),, enable_xft=yes) if test "x$enable_xft" = "xyes"; then PKG_CHECK_MODULES(XFT, xft, AC_DEFINE(USE_XFT, 1, [Xft support]), enable_xft=no) @@ -221,14 +221,14 @@ fi AM_CONDITIONAL(USE_LIBXFT, test "x$enable_xft" = "xyes") AC_ARG_ENABLE(xi2, - AC_HELP_STRING([--enable-xi2], [compile with XI2 support (experimental) @<:@default=no@:>@]),, + AS_HELP_STRING([--enable-xi2], [compile with XI2 support (experimental) @<:@default=no@:>@]),, enable_xi2=no) if test "x$enable_xi2" = "xyes"; then PKG_CHECK_MODULES(XI, xi >= 1.3, AC_DEFINE(USE_XI2, 1, [XI2 support]), enable_xi2=no) fi AC_ARG_ENABLE(glx, - AC_HELP_STRING([--enable-glx], [compile with GLX support (experimental) @<:@default=no@:>@]),, + AS_HELP_STRING([--enable-glx], [compile with GLX support (experimental) @<:@default=no@:>@]),, enable_glx=no) if test "x$enable_glx" = "xyes"; then PKG_CHECK_MODULES(GLX, gl glu, @@ -247,7 +247,7 @@ AC_CHECK_LIB(Xext, XShapeQueryExtension, -lX11) AC_ARG_ENABLE(xsync, - AC_HELP_STRING([--enable-xsync], [compile with SYNC support @<:@default=yes@:>@]),, + AS_HELP_STRING([--enable-xsync], [compile with SYNC support @<:@default=yes@:>@]),, enable_xsync=yes) if test "x$enable_xsync" = "xyes"; then AC_CHECK_LIB(Xext, XSyncQueryExtension, @@ -258,7 +258,7 @@ if test "x$enable_xsync" = "xyes"; then fi AC_ARG_ENABLE(xinerama, - AC_HELP_STRING([--enable-xinerama], [compile with xinerama support @<:@default=yes@:>@]),, + AS_HELP_STR
[EGIT] [e16/e16] master 03/03: Add feature to build with ASAN (--enable-gcc-asan)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=01a2163989707693bfdd5e34c12ab0d9035a128c commit 01a2163989707693bfdd5e34c12ab0d9035a128c Author: Kim Woelders Date: Tue May 5 11:04:13 2020 +0200 Add feature to build with ASAN (--enable-gcc-asan) --- configure.ac | 2 ++ dox/Makefile.am | 2 ++ eesh/Makefile.am | 2 ++ lib/Makefile.am | 2 ++ m4/ec_asan.m4| 20 src/Makefile.am | 3 +++ 6 files changed, 31 insertions(+) diff --git a/configure.ac b/configure.ac index faeb08bf..1da8a26c 100644 --- a/configure.ac +++ b/configure.ac @@ -458,6 +458,8 @@ else EC_C_WARNINGS() fi +EC_C_ASAN() + AC_DEFINE(USE_EXT_INIT_WIN, 1, [Use external init window during restart]) AC_DEFINE(ENABLE_DESKRAY,0, [Enable deskrays (not functional)]) diff --git a/dox/Makefile.am b/dox/Makefile.am index d1f3d21f..6008616d 100644 --- a/dox/Makefile.am +++ b/dox/Makefile.am @@ -9,5 +9,7 @@ edox_SOURCES = dox.c dox.h file.c format.c text.c ttfont.c edox_CPPFLAGS = -I$(top_builddir) $(IMLIB2_CFLAGS) $(X_CFLAGS) \ $(CFLAGS_WARNINGS) -D ENLIGHTENMENT_ROOT=\"$(pkgdatadir)\" +edox_CFLAGS = $(CFLAGS_ASAN) + LDADD = $(IMLIB2_LIBS) $(X_LIBS) $(XINERAMA_LIBS) -lX11 -lm diff --git a/eesh/Makefile.am b/eesh/Makefile.am index 3f0ade62..02b46058 100644 --- a/eesh/Makefile.am +++ b/eesh/Makefile.am @@ -5,5 +5,7 @@ eesh_SOURCES = E.h comms.c main.c eesh_CPPFLAGS = -I$(top_builddir) $(X_CFLAGS) $(CFLAGS_WARNINGS) +eesh_CFLAGS = $(CFLAGS_ASAN) + LDADD = $(X_LIBS) -lX11 diff --git a/lib/Makefile.am b/lib/Makefile.am index 8323da3c..a7ebd68e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -5,6 +5,8 @@ libe16_LTLIBRARIES = $(LIB_HACK) $(LIB_TRIP) AM_CPPFLAGS = -I$(top_srcdir)/src $(X_CFLAGS) \ $(CFLAGS_WARNINGS) $(CFLAGS_VISIBILITY) +AM_CFLAGS = $(CFLAGS_ASAN) + if BUILD_LIBHACK LIB_HACK = libhack.la diff --git a/m4/ec_asan.m4 b/m4/ec_asan.m4 new file mode 100644 index ..c7d9bfb4 --- /dev/null +++ b/m4/ec_asan.m4 @@ -0,0 +1,20 @@ +dnl Copyright (C) 2020 Kim Woelders +dnl This code is public domain and can be freely used or copied. + +dnl Macro to set compiler flags in CFLAGS_ASAN + +dnl Usage: EC_C_ASAN() + +AC_DEFUN([EC_C_ASAN], [ + AC_ARG_ENABLE(gcc-asan, +[AS_HELP_STRING([--enable-gcc-asan], +[compile with ASAN support @<:@default=no@:>@])],, +enable_gcc_asan=no) + + if test "x$GCC" = "xyes"; then +if test "x$enable_gcc_asan" = "xyes"; then + CFLAGS_ASAN="-fsanitize=address -fno-omit-frame-pointer" +fi + fi + AC_SUBST(CFLAGS_ASAN) +]) diff --git a/src/Makefile.am b/src/Makefile.am index 0d798849..d6bb01ee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -119,6 +119,9 @@ e16_SOURCES = \ $(SRCS_DBUS)\ $(SRCS_SNPRINTF) +AM_CFLAGS = \ + $(CFLAGS_ASAN) + AM_CPPFLAGS = \ $(CFLAGS_WARNINGS) \ $(CFLAGS_VISIBILITY) \ --
[EGIT] [e16/e16] master 06/22: groups.c: Refactor _GroupEwinRemove()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=32f42552701d3017e86c09efd16a1df11f94801b commit 32f42552701d3017e86c09efd16a1df11f94801b Author: Kim Woelders Date: Sun May 3 10:06:26 2020 +0200 groups.c: Refactor _GroupEwinRemove() --- src/groups.c | 106 --- 1 file changed, 64 insertions(+), 42 deletions(-) diff --git a/src/groups.c b/src/groups.c index e32d26c3..5c66cc22 100644 --- a/src/groups.c +++ b/src/groups.c @@ -224,14 +224,35 @@ _GroupFind2(const char *groupid) return _GroupFind(gid); } -static void -_GroupAddEwin(Group * g, EWin * ewin) +static int +_EwinGroupIndex(const EWin * ewin, const Group * g) { int i; for (i = 0; i < ewin->num_groups; i++) if (ewin->groups[i] == g) -return; +return i; + + return -1; +} + +static int +_GroupEwinIndex(const Group * g, const EWin * ewin) +{ + int i; + + for (i = 0; i < g->num_members; i++) + if (g->members[i] == ewin) +return i; + + return -1; +} + +static void +_GroupAddEwin(Group * g, EWin * ewin) +{ + if (_EwinGroupIndex(ewin, g) >= 0) + return; /* Already there */ ewin->num_groups++; ewin->groups = EREALLOC(Group *, ewin->groups, ewin->num_groups); @@ -254,54 +275,55 @@ _GroupEwinAdd(Group * g, EWin * ewin) static void _GroupEwinRemove(Group * g, EWin * ewin) { - int i, j, k, i2; + int i, ie, ig; if (!ewin || !g) return; - for (k = 0; k < ewin->num_groups; k++) + ie = _EwinGroupIndex(ewin, g); + if (ie < 0) { - /* is the window actually part of the given group */ - if (ewin->groups[k] != g) - continue; + /* Should not happen */ + Dprintf("%s: g=%p gid=%8d: %s: Group not found?!?\n", __func__, + g, g->index, EoGetName(ewin)); + return; + } - for (i = 0; i < g->num_members; i++) - { -if (g->members[i] != ewin) - continue; + ig = _GroupEwinIndex(g, ewin); + if (ig < 0) + { + /* Should not happen */ + Dprintf("%s: g=%p gid=%8d: %s: Ewin not found?!?\n", __func__, + g, g->index, EoGetName(ewin)); + return; + } -/* remove it from the group */ -for (j = i; j < g->num_members - 1; j++) - g->members[j] = g->members[j + 1]; -g->num_members--; -if (g->num_members > 0) - g->members = EREALLOC(EWin *, g->members, g->num_members); -else if (g->save) - { - EFREE_NULL(g->members); - } -else - { - _GroupDestroy(g); - } + Dprintf("%s: gid=%8d index=%d/%d: %s\n", __func__, + g->index, ie, ig, EoGetName(ewin)); -/* and remove the group from the groups that the window is in */ -for (i2 = k; i2 < ewin->num_groups - 1; i2++) - ewin->groups[i2] = ewin->groups[i2 + 1]; -ewin->num_groups--; -if (ewin->num_groups <= 0) - { - EFREE_NULL(ewin->groups); - ewin->num_groups = 0; - } -else - ewin->groups = - EREALLOC(Group *, ewin->groups, ewin->num_groups); + /* remove it from the group */ + g->num_members--; + for (i = ig; i < g->num_members; i++) + g->members[i] = g->members[i + 1]; -GroupsSave(); -return; - } - } + if (g->num_members > 0) + g->members = EREALLOC(EWin *, g->members, g->num_members); + else if (g->save) + EFREE_NULL(g->members); + else + _GroupDestroy(g); + + /* and remove the group from the groups that the window is in */ + ewin->num_groups--; + for (i = ie; i < ewin->num_groups; i++) + ewin->groups[i] = ewin->groups[i + 1]; + + if (ewin->num_groups > 0) + ewin->groups = EREALLOC(Group *, ewin->groups, ewin->num_groups); + else + EFREE_NULL(ewin->groups); + + GroupsSave(); } static void --
[EGIT] [e16/e16] master 22/22: groups.c: Fold "groups" into "group_op" IPC command
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=db38aae9e698d96bd48daaabd80a90184a68029e commit db38aae9e698d96bd48daaabd80a90184a68029e Author: Kim Woelders Date: Tue May 5 17:55:43 2020 +0200 groups.c: Fold "groups" into "group_op" IPC command --- config/winops_groups.menu | 8 +-- src/groups.c | 131 ++ 2 files changed, 42 insertions(+), 97 deletions(-) diff --git a/config/winops_groups.menu b/config/winops_groups.menu index 6bd3258d..4888781f 100644 --- a/config/winops_groups.menu +++ b/config/winops_groups.menu @@ -1,8 +1,8 @@ "Groups" "EMPTY" -"Configure this window's group(s)" NULL "groups cfg group" +"Configure this window's group(s)" NULL "gop * cfg" "Start a new group"NULL "gop * start" "Add this window to the current group" NULL "gop * add" -"Select group to add this window to" NULL "groups cfg add" -"Remove this window from a group" NULL "groups cfg del" -"Destroy a group this window belongs to" NULL "groups cfg break" +"Select group to add this window to" NULL "gop * add =" +"Remove this window from a group" NULL "gop * del =" +"Destroy a group this window belongs to" NULL "gop * break =" #"Show/Hide this window's group(s)"NULL "gop * showhide" diff --git a/src/groups.c b/src/groups.c index 3c786370..37e06d33 100644 --- a/src/groups.c +++ b/src/groups.c @@ -226,6 +226,12 @@ _GroupFind2(const char *groupid) if (groupid[0] == '*' || groupid[0] == '\0') return Mode_groups.current; +#if ENABLE_DIALOGS +#define GROUP_CHOOSE ((Group*)1) + if (groupid[0] == '=') + return GROUP_CHOOSE; +#endif + gid = 0; sscanf(groupid, "%d", ); if (gid == 0) @@ -1112,49 +1118,6 @@ const DialogDef DlgGroupDefaults = { _DlgFillGroupDefaults, DLG_OAC, _DlgApplyGroupDefaults, NULL }; - -static void -_GroupsConfigure(const char *params) -{ - chars[128]; - const char *p; - int l; - EWin *ewin; - - p = params; - l = 0; - s[0] = '\0'; - sscanf(p, "%100s %n", s, ); - p += l; - - ewin = GetContextEwin(); - if (*p) - { - ewin = EwinFindByExpr(p); - if (!ewin) - { -IpcPrintf("Error: no such window: %s\n", p); -return; - } - } - - if (!strcmp(s, "group")) - { - _EwinGroupsConfig(ewin); - } - else if (!strcmp(s, "add")) - { - _EwinGroupChooseDialog(ewin, GROUP_OP_ADD); - } - else if (!strcmp(s, "del")) - { - _EwinGroupChooseDialog(ewin, GROUP_OP_DEL); - } - else if (!strcmp(s, "break")) - { - _EwinGroupChooseDialog(ewin, GROUP_OP_BREAK); - } -} #endif /* ENABLE_DIALOGS */ /* @@ -1243,35 +1206,52 @@ IPC_GroupOps(const char *params) return; } +#if ENABLE_DIALOGS + if (!strcmp(operation, "cfg")) + { + _EwinGroupsConfig(ewin); + } + else +#endif if (!strcmp(operation, "start")) { group = _GroupCreate(-1, 1); Mode_groups.current = group; _GroupEwinAdd(group, ewin, 1); - IpcPrintf("start %8x\n", win); } else if (!strcmp(operation, "add")) { group = _GroupFind2(groupid); - _GroupEwinAdd(group, ewin, 1); - IpcPrintf("add %8x\n", win); +#if ENABLE_DIALOGS + if (group == GROUP_CHOOSE) + _EwinGroupChooseDialog(ewin, GROUP_OP_ADD); + else + _GroupEwinAdd(group, ewin, 1); +#endif } else if (!strcmp(operation, "del")) { group = _GroupFind2(groupid); - _GroupEwinRemove(group, ewin, 1); - IpcPrintf("del %8x\n", win); +#if ENABLE_DIALOGS + if (group == GROUP_CHOOSE) + _EwinGroupChooseDialog(ewin, GROUP_OP_DEL); + else +#endif + _GroupEwinRemove(group, ewin, 1); } else if (!strcmp(operation, "break")) { group = _GroupFind2(groupid); - _GroupDelete(group); - IpcPrintf("break %8x\n", win); +#if ENABLE_DIALOGS + if (group == GROUP_CHOOSE) + _EwinGroupChooseDialog(ewin, GROUP_OP_BREAK); + else +#endif + _GroupDelete(group); } else if (!strcmp(operation, "showhide")) { _EwinGroupsShowHide(ewin, -1, SET_TOGGLE); - IpcPrintf("showhide %8x\n", win); } else { @@ -1414,59 +1394,24 @@ IPC_Group(const char *params) _GroupsSave(); } -static void -IPC_GroupsConfig(const char *params) -{ - cons
[EGIT] [e16/e16] master 11/22: groups.c: Fix handling groups with negative id
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=d28388ad701f01e201f182da2fc19c7f392ed003 commit d28388ad701f01e201f182da2fc19c7f392ed003 Author: Kim Woelders Date: Mon May 4 08:01:37 2020 +0200 groups.c: Fix handling groups with negative id --- src/groups.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groups.c b/src/groups.c index d11d4a28..19d04bb9 100644 --- a/src/groups.c +++ b/src/groups.c @@ -216,9 +216,9 @@ _GroupFind2(const char *groupid) if (groupid[0] == '*' || groupid[0] == '\0') return Mode_groups.current; - gid = -1; + gid = 0; sscanf(groupid, "%d", ); - if (gid <= 0) + if (gid == 0) return NULL; return _GroupFind(gid); --
[EGIT] [e16/e16] master 05/22: groups.c: Rename functions for more consistency
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=4e97cbb637e2c111ca528f7b46dcf0d3d1ba4a80 commit 4e97cbb637e2c111ca528f7b46dcf0d3d1ba4a80 Author: Kim Woelders Date: Sun May 3 09:36:21 2020 +0200 groups.c: Rename functions for more consistency Swap a couple of arguments too. No functional changes. --- src/groups.c | 127 +-- 1 file changed, 63 insertions(+), 64 deletions(-) diff --git a/src/groups.c b/src/groups.c index 4b7c3188..e32d26c3 100644 --- a/src/groups.c +++ b/src/groups.c @@ -85,7 +85,7 @@ GroupsGetSwapmove(void) } static Group * -GroupCreate(int gid) +_GroupCreate(int gid) { Group *g; @@ -119,7 +119,7 @@ GroupCreate(int gid) } static void -GroupDestroy(Group * g) +_GroupDestroy(Group * g) { if (!g) return; @@ -135,15 +135,15 @@ GroupDestroy(Group * g) } static int -GroupMatchId(const void *data, const void *match) +_GroupMatchId(const void *data, const void *match) { return ((const Group *)data)->index != PTR2INT(match); } static Group * -GroupFind(int gid) +_GroupFind(int gid) { - return LIST_FIND(Group, _list, GroupMatchId, INT2PTR(gid)); + return LIST_FIND(Group, _list, _GroupMatchId, INT2PTR(gid)); } EWin *const * @@ -165,7 +165,7 @@ GroupRememberByGid(int gid) { Group *g; - g = GroupFind(gid); + g = _GroupFind(gid); if (!g) return; @@ -209,7 +209,7 @@ GroupMatchAction(const Group * g, int action) } static Group * -GroupFind2(const char *groupid) +_GroupFind2(const char *groupid) { int gid; @@ -221,7 +221,7 @@ GroupFind2(const char *groupid) if (gid <= 0) return NULL; - return GroupFind(gid); + return _GroupFind(gid); } static void @@ -242,7 +242,7 @@ _GroupAddEwin(Group * g, EWin * ewin) } static void -AddEwinToGroup(EWin * ewin, Group * g) +_GroupEwinAdd(Group * g, EWin * ewin) { if (!ewin || !g) return; @@ -252,7 +252,7 @@ AddEwinToGroup(EWin * ewin, Group * g) } static void -RemoveEwinFromGroup(EWin * ewin, Group * g) +_GroupEwinRemove(Group * g, EWin * ewin) { int i, j, k, i2; @@ -282,7 +282,7 @@ RemoveEwinFromGroup(EWin * ewin, Group * g) } else { - GroupDestroy(g); + _GroupDestroy(g); } /* and remove the group from the groups that the window is in */ @@ -305,7 +305,7 @@ RemoveEwinFromGroup(EWin * ewin, Group * g) } static void -BreakWindowGroup(EWin * ewin, Group * g) +_GroupEwinDestroy(Group * g, EWin * ewin) { int i, j; EWin *ewin2; @@ -324,7 +324,7 @@ BreakWindowGroup(EWin * ewin, Group * g) for (i = 0; i < g2->num_members; i++) { ewin2 = g2->members[0]; -RemoveEwinFromGroup(ewin2, g2); +_GroupEwinRemove(g2, ewin2); SnapshotEwinUpdate(ewin2, SNAP_USE_GROUPS); } } @@ -338,7 +338,7 @@ GroupsGetList(int *pnum) #if ENABLE_DIALOGS static Group ** -ListWinGroups(const EWin * ewin, char group_select, int *num) +_EwinListGroups(const EWin * ewin, char group_select, int *num) { Group **groups; Group **groups2; @@ -406,12 +406,12 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) for (i = 0; i < ngid; i++) { gid = pgid[i]; - g = GroupFind(gid); + g = _GroupFind(gid); Dprintf("ewin=%p gid=%d grp=%p\n", ewin, gid, g); if (!g) { /* This should not happen, but may if group/snap configs are corrupted */ -g = GroupCreate(gid); +g = _GroupCreate(gid); } _GroupAddEwin(g, ewin); } @@ -425,11 +425,11 @@ GroupsEwinRemove(EWin * ewin) num = ewin->num_groups; for (i = 0; i < num; i++) - RemoveEwinFromGroup(ewin, ewin->groups[0]); + _GroupEwinRemove(ewin->groups[0], ewin); } static int -EwinInGroup(const EWin * ewin, const Group * g) +_EwinInGroup(const EWin * ewin, const Group * g) { int i; @@ -453,7 +453,7 @@ EwinsInGroup(const EWin * ewin1, const EWin * ewin2) { for (i = 0; i < ewin1->num_groups; i++) { -if (EwinInGroup(ewin2, ewin1->groups[i])) +if (_EwinInGroup(ewin2, ewin1->groups[i])) return ewin1->groups[i]; } } @@ -462,7 +462,7 @@ EwinsInGroup(const EWin * ewin1, const EWin * ewin2) #if ENABLE_DIALOGS static char ** -GetWinGroupMemberNames(Group ** groups, int num) +_GrouplistMemberNames(Group ** groups, int num) { int i, j, len; char **group_member_strings; @@ -499,7 +499,7 @@ GetWinGroupMemberNames(Group ** groups, int num) #if USE_GRO
[EGIT] [e16/e16] master 18/22: groups: Rework group configuration saving
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=d511dd782cdf195f0ae8ccb95566db032ff44616 commit d511dd782cdf195f0ae8ccb95566db032ff44616 Author: Kim Woelders Date: Mon May 4 11:21:04 2020 +0200 groups: Rework group configuration saving - No longer just store groups that are referenced by snaps Makes to logic somewhat simpler. - Only and always write group configuration when changed Previously we updated the group configuration way too often (on any snap change). --- src/groups.c | 80 +++- src/groups.h | 6 ++--- src/snaps.c | 9 --- 3 files changed, 60 insertions(+), 35 deletions(-) diff --git a/src/groups.c b/src/groups.c index a731ae19..4e6c50b4 100644 --- a/src/groups.c +++ b/src/groups.c @@ -64,7 +64,8 @@ struct _group { EWin **members; int num_members; GroupConfig cfg; - charsave; /* Used in snapshot - must save */ + charkeep; /* Don't destroy when empty */ + charused; /* Don't discard when saving */ }; static LIST_HEAD(group_list); @@ -78,6 +79,8 @@ static struct { Group *current; } Mode_groups; +static void _GroupsSave(void); + int GroupsGetSwapmove(void) { @@ -85,7 +88,7 @@ GroupsGetSwapmove(void) } static Group * -_GroupCreate(int gid) +_GroupCreate(int gid, int cfg_update) { Group *g; @@ -116,11 +119,14 @@ _GroupCreate(int gid) Dprintf("%s: grp=%p gid=%d\n", __func__, g, g->index); + if (cfg_update) + _GroupsSave(); + return g; } static void -_GroupDestroy(Group * g) +_GroupDestroy(Group * g, int cfg_update) { if (!g) return; @@ -134,6 +140,9 @@ _GroupDestroy(Group * g) Efree(g->members); Efree(g); + + if (cfg_update) + _GroupsSave(); } static int @@ -156,14 +165,13 @@ GroupGetMembers(const Group * g, int *num) } int -GroupRemember(Group * g) +GroupGetIndex(const Group * g) { - g->save = 1; return g->index; } void -GroupRememberByGid(int gid) +GroupSetUsed(int gid) { Group *g; @@ -171,7 +179,7 @@ GroupRememberByGid(int gid) if (!g) return; - g->save = 1; + g->used = 1; } int @@ -310,10 +318,10 @@ _GroupEwinRemove(Group * g, EWin * ewin, int snap_update) if (g->num_members > 0) g->members = EREALLOC(EWin *, g->members, g->num_members); - else if (g->save) + else if (g->keep) EFREE_NULL(g->members); else - _GroupDestroy(g); + _GroupDestroy(g, snap_update); /* and remove the group from the groups that the window is in */ ewin->num_groups--; @@ -327,8 +335,6 @@ _GroupEwinRemove(Group * g, EWin * ewin, int snap_update) if (snap_update) SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); - - GroupsSave(); } static void @@ -341,13 +347,13 @@ _GroupDelete(Group * g) Dprintf("%s: gid=%d\n", __func__, g->index); - g->save = 1; + g->keep = 1; while (g->num_members > 0) { ewin = g->members[0]; _GroupEwinRemove(g, ewin, 1); } - _GroupDestroy(g); + _GroupDestroy(g, 1); } Group ** @@ -432,7 +438,7 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) if (!g) { /* This should not happen, but may if group/snap configs are corrupted */ -g = _GroupCreate(gid); +g = _GroupCreate(gid, 1); } _GroupEwinAdd(g, ewin, 0); } @@ -559,16 +565,13 @@ _EwinGroupsShowHide(EWin * ewin, int group_index, char onoff) #endif /* USE_GROUP_SHOWHIDE */ -void -GroupsSave(void) +static void +_GroupsSave(void) { Group *g; FILE *f; chars[1024]; - if (LIST_IS_EMPTY(_list)) - return; - Dprintf("%s\n", __func__); Esnprintf(s, sizeof(s), "%s.groups", EGetSavePrefix()); @@ -578,9 +581,6 @@ GroupsSave(void) LIST_FOR_EACH(Group, _list, g) { - if (!g->save) -continue; - fprintf(f, "NEW: %i\n", g->index); fprintf(f, "ICONIFY: %i\n", g->cfg.iconify); fprintf(f, "KILL: %i\n", g->cfg.kill); @@ -594,6 +594,30 @@ GroupsSave(void) fclose(f); } +void +GroupsPrune(void) +{ + Group *g, *tmp; + int pruned; + + pruned = 0; + + LIST_FOR_EACH_SAFE(Group, _list, g, tmp) + { + if (g->used) +continue; + if (g->members) +continue; + _GroupDestroy(g, 0); + pruned += 1; + } + + Dprintf("%s: Pruned=%d\n", __func__, pruned); + + if (pruned) + _GroupsSave(); +} + static int _GroupsLoad(FILE * fs) { @@ -612,7 +636,7 @@ _GroupsLoad(FILE * fs)
[EGIT] [e16/e16] master 16/22: groups.c: Fix snapshot updating
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=c2e9649cd562e5bac9e3dc2a4f822650bca37a0a commit c2e9649cd562e5bac9e3dc2a4f822650bca37a0a Author: Kim Woelders Date: Mon May 4 09:16:12 2020 +0200 groups.c: Fix snapshot updating --- src/groups.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/groups.c b/src/groups.c index ea7fb573..a731ae19 100644 --- a/src/groups.c +++ b/src/groups.c @@ -251,8 +251,11 @@ _GroupEwinIndex(const Group * g, const EWin * ewin) } static void -_GroupAddEwin(Group * g, EWin * ewin) +_GroupEwinAdd(Group * g, EWin * ewin, int snap_update) { + if (!ewin || !g) + return; + if (_EwinGroupIndex(ewin, g) >= 0) return; /* Already there */ @@ -264,20 +267,13 @@ _GroupAddEwin(Group * g, EWin * ewin) g->num_members++; g->members = EREALLOC(EWin *, g->members, g->num_members); g->members[g->num_members - 1] = ewin; -} - -static void -_GroupEwinAdd(Group * g, EWin * ewin) -{ - if (!ewin || !g) - return; - _GroupAddEwin(g, ewin); - SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); + if (snap_update) + SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } static void -_GroupEwinRemove(Group * g, EWin * ewin) +_GroupEwinRemove(Group * g, EWin * ewin, int snap_update) { int i, ie, ig; @@ -329,6 +325,9 @@ _GroupEwinRemove(Group * g, EWin * ewin) else EFREE_NULL(ewin->groups); + if (snap_update) + SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); + GroupsSave(); } @@ -346,8 +345,7 @@ _GroupDelete(Group * g) while (g->num_members > 0) { ewin = g->members[0]; - _GroupEwinRemove(g, ewin); - SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); + _GroupEwinRemove(g, ewin, 1); } _GroupDestroy(g); } @@ -419,6 +417,7 @@ _EwinListGroups(const EWin * ewin, char group_select, int *num) } #endif /* ENABLE_DIALOGS */ +/* Update groups on snapped window appearance */ void GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) { @@ -435,16 +434,16 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) /* This should not happen, but may if group/snap configs are corrupted */ g = _GroupCreate(gid); } - _GroupAddEwin(g, ewin); + _GroupEwinAdd(g, ewin, 0); } - SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } +/* Update groups on snapped window disappearance */ void GroupsEwinRemove(EWin * ewin) { while (ewin->num_groups > 0) - _GroupEwinRemove(ewin->groups[0], ewin); + _GroupEwinRemove(ewin->groups[0], ewin, 0); } static int @@ -691,10 +690,10 @@ _DlgApplyGroupChoose(Dialog * d, int val __UNUSED__, void *data __UNUSED__) switch (dd->action) { case GROUP_OP_ADD: - _GroupEwinAdd(dd->groups[dd->cur_grp], dd->ewin); + _GroupEwinAdd(dd->groups[dd->cur_grp], dd->ewin, 1); break; case GROUP_OP_DEL: - _GroupEwinRemove(dd->groups[dd->cur_grp], dd->ewin); + _GroupEwinRemove(dd->groups[dd->cur_grp], dd->ewin, 1); break; case GROUP_OP_BREAK: _GroupDelete(dd->groups[dd->cur_grp]); @@ -1218,19 +1217,19 @@ IPC_GroupOps(const char *params) { group = _GroupCreate(-1); Mode_groups.current = group; - _GroupEwinAdd(group, ewin); + _GroupEwinAdd(group, ewin, 1); IpcPrintf("start %8x\n", win); } else if (!strcmp(operation, "add")) { group = _GroupFind2(groupid); - _GroupEwinAdd(group, ewin); + _GroupEwinAdd(group, ewin, 1); IpcPrintf("add %8x\n", win); } else if (!strcmp(operation, "del")) { group = _GroupFind2(groupid); - _GroupEwinRemove(group, ewin); + _GroupEwinRemove(group, ewin, 1); IpcPrintf("del %8x\n", win); } else if (!strcmp(operation, "break")) --
[EGIT] [e16/e16] master 10/22: groups.c: Mostly cosmetic tweaks
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=cc7fe7a2fb12b76446c266b035e52f127b0683d2 commit cc7fe7a2fb12b76446c266b035e52f127b0683d2 Author: Kim Woelders Date: Sun May 3 21:05:21 2020 +0200 groups.c: Mostly cosmetic tweaks --- src/groups.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/groups.c b/src/groups.c index e303640f..d11d4a28 100644 --- a/src/groups.c +++ b/src/groups.c @@ -436,10 +436,7 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) void GroupsEwinRemove(EWin * ewin) { - int num, i; - - num = ewin->num_groups; - for (i = 0; i < num; i++) + while (ewin->num_groups > 0) _GroupEwinRemove(ewin->groups[0], ewin); } --
[EGIT] [e16/e16] master 21/22: groups.c: Add group list ipc comand
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=f0029d9f633754497ed179512d8574868271b4b3 commit f0029d9f633754497ed179512d8574868271b4b3 Author: Kim Woelders Date: Tue May 5 15:56:02 2020 +0200 groups.c: Add group list ipc comand --- src/groups.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/groups.c b/src/groups.c index a0080327..3c786370 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1161,6 +1161,35 @@ _GroupsConfigure(const char *params) * Groups module */ +static void +_GroupShowEwins(Group * g) +{ + int i; + + IpcPrintf(" gid=%8d: ", g->index); + for (i = 0; i < g->num_members; i++) + IpcPrintf(" %s", EoGetName(g->members[i])); + IpcPrintf("\n"); +} + +static void +_GroupsShowGroups(void) +{ + Group *g; + + IpcPrintf("%s:\n", __func__); + LIST_FOR_EACH(Group, _list, g) + { + _GroupShowEwins(g); + } +} + +static void +_GroupsShow(void) +{ + _GroupsShowGroups(); +} + static void _GroupShow(Group * g) { @@ -1275,6 +1304,11 @@ IPC_Group(const char *params) LIST_FOR_EACH(Group, _list, group) _GroupShow(group); return; } + else if (!strcmp(groupid, "list")) + { + _GroupsShow(); + return; + } if (!operation[0]) { --
[EGIT] [e16/e16] master 19/22: groups.c: Simplify _GroupDelete() some more
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=f5324ebd5ae58fb445c919c45c0db95baaa8c8ba commit f5324ebd5ae58fb445c919c45c0db95baaa8c8ba Author: Kim Woelders Date: Tue May 5 16:18:53 2020 +0200 groups.c: Simplify _GroupDelete() some more --- src/groups.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/groups.c b/src/groups.c index 4e6c50b4..0e009b24 100644 --- a/src/groups.c +++ b/src/groups.c @@ -340,8 +340,6 @@ _GroupEwinRemove(Group * g, EWin * ewin, int snap_update) static void _GroupDelete(Group * g) { - EWin *ewin; - if (!g) return; @@ -349,10 +347,7 @@ _GroupDelete(Group * g) g->keep = 1; while (g->num_members > 0) - { - ewin = g->members[0]; - _GroupEwinRemove(g, ewin, 1); - } + _GroupEwinRemove(g, g->members[0], 1); _GroupDestroy(g, 1); } --
[EGIT] [e16/e16] master 04/22: groups.c: Reshuffle code to avoid forward declarations
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=c4026c585cbda428b0269bfc72bd8fc33379f65f commit c4026c585cbda428b0269bfc72bd8fc33379f65f Author: Kim Woelders Date: Sun May 3 08:56:25 2020 +0200 groups.c: Reshuffle code to avoid forward declarations --- src/groups.c | 183 +-- 1 file changed, 90 insertions(+), 93 deletions(-) diff --git a/src/groups.c b/src/groups.c index 488c145e..4b7c3188 100644 --- a/src/groups.c +++ b/src/groups.c @@ -78,9 +78,6 @@ static struct { Group *current; } Mode_groups; -static void AddEwinToGroup(EWin * ewin, Group * g); -static void RemoveEwinFromGroup(EWin * ewin, Group * g); - int GroupsGetSwapmove(void) { @@ -227,6 +224,86 @@ GroupFind2(const char *groupid) return GroupFind(gid); } +static void +_GroupAddEwin(Group * g, EWin * ewin) +{ + int i; + + for (i = 0; i < ewin->num_groups; i++) + if (ewin->groups[i] == g) +return; + + ewin->num_groups++; + ewin->groups = EREALLOC(Group *, ewin->groups, ewin->num_groups); + ewin->groups[ewin->num_groups - 1] = g; + g->num_members++; + g->members = EREALLOC(EWin *, g->members, g->num_members); + g->members[g->num_members - 1] = ewin; +} + +static void +AddEwinToGroup(EWin * ewin, Group * g) +{ + if (!ewin || !g) + return; + + _GroupAddEwin(g, ewin); + SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); +} + +static void +RemoveEwinFromGroup(EWin * ewin, Group * g) +{ + int i, j, k, i2; + + if (!ewin || !g) + return; + + for (k = 0; k < ewin->num_groups; k++) + { + /* is the window actually part of the given group */ + if (ewin->groups[k] != g) + continue; + + for (i = 0; i < g->num_members; i++) + { +if (g->members[i] != ewin) + continue; + +/* remove it from the group */ +for (j = i; j < g->num_members - 1; j++) + g->members[j] = g->members[j + 1]; +g->num_members--; +if (g->num_members > 0) + g->members = EREALLOC(EWin *, g->members, g->num_members); +else if (g->save) + { + EFREE_NULL(g->members); + } +else + { + GroupDestroy(g); + } + +/* and remove the group from the groups that the window is in */ +for (i2 = k; i2 < ewin->num_groups - 1; i2++) + ewin->groups[i2] = ewin->groups[i2 + 1]; +ewin->num_groups--; +if (ewin->num_groups <= 0) + { + EFREE_NULL(ewin->groups); + ewin->num_groups = 0; + } +else + ewin->groups = + EREALLOC(Group *, ewin->groups, ewin->num_groups); + +GroupsSave(); +return; + } + } +} + static void BreakWindowGroup(EWin * ewin, Group * g) { @@ -320,33 +397,6 @@ ListWinGroups(const EWin * ewin, char group_select, int *num) } #endif /* ENABLE_DIALOGS */ -static void -_GroupAddEwin(Group * g, EWin * ewin) -{ - int i; - - for (i = 0; i < ewin->num_groups; i++) - if (ewin->groups[i] == g) -return; - - ewin->num_groups++; - ewin->groups = EREALLOC(Group *, ewin->groups, ewin->num_groups); - ewin->groups[ewin->num_groups - 1] = g; - g->num_members++; - g->members = EREALLOC(EWin *, g->members, g->num_members); - g->members[g->num_members - 1] = ewin; -} - -static void -AddEwinToGroup(EWin * ewin, Group * g) -{ - if (!ewin || !g) - return; - - _GroupAddEwin(g, ewin); - SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); -} - void GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) { @@ -368,6 +418,16 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } +void +GroupsEwinRemove(EWin * ewin) +{ + int num, i; + + num = ewin->num_groups; + for (i = 0; i < num; i++) + RemoveEwinFromGroup(ewin, ewin->groups[0]); +} + static int EwinInGroup(const EWin * ewin, const Group * g) { @@ -400,69 +460,6 @@ EwinsInGroup(const EWin * ewin1, const EWin * ewin2) return NULL; } -static void -RemoveEwinFromGroup(EWin * ewin, Group * g) -{ - int i, j, k, i2; - - if (!ewin || !g) - return; - - for (k = 0; k < ewin->num_groups; k++) - { - /* is the window actually part of the given group */ - if (ewin->groups[k] != g) - continue; - - for (i = 0; i < g->num_members; i++) - { -if (g->members[i] != ewin) - continue; - -
[EGIT] [e16/e16] master 09/22: groups.c: _GroupEwinDestroy() -> _GroupDelete()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=c2be7e7c14ce819aa64305d7659d35552d7f1883 commit c2be7e7c14ce819aa64305d7659d35552d7f1883 Author: Kim Woelders Date: Sun May 3 19:42:03 2020 +0200 groups.c: _GroupEwinDestroy() -> _GroupDelete() Drop the possibility to delete all groups to which an EWin belongs. It wasn't possible to go down that path anyway. --- src/groups.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/groups.c b/src/groups.c index 9a21dc6b..e303640f 100644 --- a/src/groups.c +++ b/src/groups.c @@ -327,28 +327,21 @@ _GroupEwinRemove(Group * g, EWin * ewin) } static void -_GroupEwinDestroy(Group * g, EWin * ewin) +_GroupDelete(Group * g) { - int i, j; - EWin *ewin2; - Group *g2; + int i; + EWin *ewin; - Dprintf("ewin=%p group=%p gid=%d\n", ewin, g, g ? g->index : 0); - if (!ewin || !ewin->groups) + if (!g) return; - for (j = 0; j < ewin->num_groups; j++) - { - g2 = ewin->groups[j]; - if (g && g != g2) - continue; + Dprintf("group=%p gid=%d\n", g, g->index); - for (i = 0; i < g2->num_members; i++) - { -ewin2 = g2->members[0]; -_GroupEwinRemove(g2, ewin2); -SnapshotEwinUpdate(ewin2, SNAP_USE_GROUPS); - } + for (i = 0; i < g->num_members; i++) + { + ewin = g->members[0]; + _GroupEwinRemove(g, ewin); + SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } } @@ -694,7 +687,7 @@ _DlgApplyGroupChoose(Dialog * d, int val __UNUSED__, void *data __UNUSED__) _GroupEwinRemove(dd->groups[dd->cur_grp], dd->ewin); break; case GROUP_OP_BREAK: - _GroupEwinDestroy(dd->groups[dd->cur_grp], dd->ewin); + _GroupDelete(dd->groups[dd->cur_grp]); break; default: break; @@ -1233,7 +1226,7 @@ IPC_GroupOps(const char *params) else if (!strcmp(operation, "break")) { group = _GroupFind2(groupid); - _GroupEwinDestroy(group, ewin); + _GroupDelete(group); IpcPrintf("break %8x\n", win); } else if (!strcmp(operation, "showhide")) --
[EGIT] [e16/e16] master 15/22: groups.c: Add some debug
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9c18d93735b1e2ea1f45c5ba726f35d1569c3aa2 commit 9c18d93735b1e2ea1f45c5ba726f35d1569c3aa2 Author: Kim Woelders Date: Mon May 4 08:14:21 2020 +0200 groups.c: Add some debug --- src/groups.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/groups.c b/src/groups.c index 8feba8ba..ea7fb573 100644 --- a/src/groups.c +++ b/src/groups.c @@ -114,7 +114,8 @@ _GroupCreate(int gid) g->cfg.stick = Conf_groups.dflt.stick; g->cfg.shade = Conf_groups.dflt.shade; - Dprintf("grp=%p gid=%d\n", g, g->index); + Dprintf("%s: grp=%p gid=%d\n", __func__, g, g->index); + return g; } @@ -124,13 +125,14 @@ _GroupDestroy(Group * g) if (!g) return; - Dprintf("grp=%p gid=%d\n", g, g->index); + Dprintf("%s: grp=%p gid=%d\n", __func__, g, g->index); + LIST_REMOVE(Group, _list, g); if (g == Mode_groups.current) Mode_groups.current = NULL; - Efree(g->members); + Efree(g->members); Efree(g); } @@ -254,6 +256,8 @@ _GroupAddEwin(Group * g, EWin * ewin) if (_EwinGroupIndex(ewin, g) >= 0) return; /* Already there */ + Dprintf("%s: gid=%8d: %s\n", __func__, g->index, EoGetName(ewin)); + ewin->num_groups++; ewin->groups = EREALLOC(Group *, ewin->groups, ewin->num_groups); ewin->groups[ewin->num_groups - 1] = g; @@ -280,6 +284,8 @@ _GroupEwinRemove(Group * g, EWin * ewin) if (!ewin || !g) return; + Dprintf("%s: gid=%8d: %s\n", __func__, g->index, EoGetName(ewin)); + ie = _EwinGroupIndex(ewin, g); if (ie < 0) { @@ -334,7 +340,7 @@ _GroupDelete(Group * g) if (!g) return; - Dprintf("group=%p gid=%d\n", g, g->index); + Dprintf("%s: gid=%d\n", __func__, g->index); g->save = 1; while (g->num_members > 0) @@ -564,6 +570,8 @@ GroupsSave(void) if (LIST_IS_EMPTY(_list)) return; + Dprintf("%s\n", __func__); + Esnprintf(s, sizeof(s), "%s.groups", EGetSavePrefix()); f = fopen(s, "w"); if (!f) @@ -649,6 +657,8 @@ GroupsLoad(void) { chars[4096]; + Dprintf("%s\n", __func__); + Esnprintf(s, sizeof(s), "%s.groups", EGetSavePrefix()); ConfigFileLoad(s, NULL, _GroupsLoad, 0); --
[EGIT] [e16/e16] master 08/22: groups.c: Enable popping up ewin group configuration dialogs from ipc
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=d80bf8305c52a1bb9dde01d161003a2fb89ed013 commit d80bf8305c52a1bb9dde01d161003a2fb89ed013 Author: Kim Woelders Date: Sun May 3 09:58:10 2020 +0200 groups.c: Enable popping up ewin group configuration dialogs from ipc --- src/groups.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/groups.c b/src/groups.c index 791994a1..9a21dc6b 100644 --- a/src/groups.c +++ b/src/groups.c @@ -776,14 +776,14 @@ static const DialogDef DlgGroupChoose = { }; static void -_EwinGroupChooseDialog(int action) +_EwinGroupChooseDialog(EWin * ewin, int action) { int group_sel; GroupSelDlgData gsdd, *dd = - dd->ewin = GetContextEwin(); - if (!dd->ewin) + if (!ewin) return; + dd->ewin = ewin; dd->action = action; dd->cur_grp = dd->prv_grp = 0; @@ -1000,11 +1000,8 @@ static const DialogDef DlgGroups = { }; static void -_EwinGroupsConfig(void) +_EwinGroupsConfig(EWin * ewin) { - EWin *ewin; - - ewin = GetContextEwin(); if (!ewin) return; @@ -1119,27 +1116,40 @@ _GroupsConfigure(const char *params) chars[128]; const char *p; int l; + EWin *ewin; p = params; l = 0; s[0] = '\0'; sscanf(p, "%100s %n", s, ); + p += l; + + ewin = GetContextEwin(); + if (*p) + { + ewin = EwinFindByExpr(p); + if (!ewin) + { +IpcPrintf("Error: no such window: %s\n", p); +return; + } + } if (!strcmp(s, "group")) { - _EwinGroupsConfig(); + _EwinGroupsConfig(ewin); } else if (!strcmp(s, "add")) { - _EwinGroupChooseDialog(GROUP_OP_ADD); + _EwinGroupChooseDialog(ewin, GROUP_OP_ADD); } else if (!strcmp(s, "del")) { - _EwinGroupChooseDialog(GROUP_OP_DEL); + _EwinGroupChooseDialog(ewin, GROUP_OP_DEL); } else if (!strcmp(s, "break")) { - _EwinGroupChooseDialog(GROUP_OP_BREAK); + _EwinGroupChooseDialog(ewin, GROUP_OP_BREAK); } } #endif /* ENABLE_DIALOGS */ @@ -1393,7 +1403,10 @@ static const IpcItem GroupsIpcArray[] = { IPC_GroupsConfig, "groups", "grp", "Configure window groups", -" groups cfg Configure groups\n"} +" groups cfg group Configure windows groups\n" +" groups cfg add Add window to group\n" +" groups cfg del Remove window from group\n" +" groups cfg break Destroy one of the windows groups\n"} , { IPC_GroupOps, --
[EGIT] [e16/e16] master 03/22: groups.c: Mostly cosmetic changes around group configuration
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=02001e632d148984f929ea8ba0a7b5aab282ba94 commit 02001e632d148984f929ea8ba0a7b5aab282ba94 Author: Kim Woelders Date: Sun May 3 04:28:19 2020 +0200 groups.c: Mostly cosmetic changes around group configuration --- src/groups.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/groups.c b/src/groups.c index 58aebc20..488c145e 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1354,20 +1354,19 @@ IPC_Group(const char *params) IpcPrintf("%s: off\n", operation); } -#if ENABLE_DIALOGS static void -GroupsIpc(const char *params) +IPC_GroupsConfig(const char *params) { const char *p; - charcmd[128], prm[128]; + charcmd[128]; int len; - cmd[0] = prm[0] = '\0'; + cmd[0] = '\0'; p = params; if (p) { len = 0; - sscanf(p, "%100s %100s %n", cmd, prm, ); + sscanf(p, "%100s %n", cmd, ); p += len; } @@ -1375,22 +1374,21 @@ GroupsIpc(const char *params) { /* Show groups */ } - else if (!strncmp(cmd, "cfg", 2)) +#if ENABLE_DIALOGS + else if (!strcmp(cmd, "cfg")) { - GroupsConfigure(prm); + GroupsConfigure(p); } +#endif } -#endif /* ENABLE_DIALOGS */ static const IpcItem GroupsIpcArray[] = { -#if ENABLE_DIALOGS { -GroupsIpc, +IPC_GroupsConfig, "groups", "grp", "Configure window groups", " groups cfg Configure groups\n"} , -#endif /* ENABLE_DIALOGS */ { IPC_GroupInfo, "group_info", "gl", --
[EGIT] [e16/e16] master 20/22: groups.c: Eliminate _EwinInGroup()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=f58ca9c26a4c372ad8d979448609a5cd5eb50df9 commit f58ca9c26a4c372ad8d979448609a5cd5eb50df9 Author: Kim Woelders Date: Tue May 5 12:32:26 2020 +0200 groups.c: Eliminate _EwinInGroup() --- src/groups.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/groups.c b/src/groups.c index 0e009b24..a0080327 100644 --- a/src/groups.c +++ b/src/groups.c @@ -447,22 +447,6 @@ GroupsEwinRemove(EWin * ewin) _GroupEwinRemove(ewin->groups[0], ewin, 0); } -static int -_EwinInGroup(const EWin * ewin, const Group * g) -{ - int i; - - if (ewin && g) - { - for (i = 0; i < g->num_members; i++) - { -if (g->members[i] == ewin) - return 1; - } - } - return 0; -} - Group * EwinsInGroup(const EWin * ewin1, const EWin * ewin2) { @@ -472,7 +456,7 @@ EwinsInGroup(const EWin * ewin1, const EWin * ewin2) { for (i = 0; i < ewin1->num_groups; i++) { -if (_EwinInGroup(ewin2, ewin1->groups[i])) +if (_GroupEwinIndex(ewin1->groups[i], ewin2) >= 0) return ewin1->groups[i]; } } --
[EGIT] [e16/e16] master 12/22: groups.c: Fix showing empty group
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=1399c7bf7d07dd77c16355049c00b7e0a5d26a60 commit 1399c7bf7d07dd77c16355049c00b7e0a5d26a60 Author: Kim Woelders Date: Mon May 4 15:34:28 2020 +0200 groups.c: Fix showing empty group --- src/groups.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/groups.c b/src/groups.c index 19d04bb9..1e878dad 100644 --- a/src/groups.c +++ b/src/groups.c @@ -503,6 +503,8 @@ _GrouplistMemberNames(Group ** groups, int num) if (len >= 1024) break; } + if (len == 0) + snprintf(group_member_strings[i], 1024, "(empty)"); } return group_member_strings; --
[EGIT] [e16/e16] master 01/22: groups: Eliminate EwinGetGroups()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=864009da546ca5132920b0d830af3c7a44dcd139 commit 864009da546ca5132920b0d830af3c7a44dcd139 Author: Kim Woelders Date: Sun May 3 00:02:07 2020 +0200 groups: Eliminate EwinGetGroups() Not particularly useful. --- src/groups.c | 7 --- src/groups.h | 1 - src/snaps.c | 24 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/groups.c b/src/groups.c index dd8478da..d8355e49 100644 --- a/src/groups.c +++ b/src/groups.c @@ -271,13 +271,6 @@ GroupsGetList(int *pnum) return LIST_GET_ITEMS(Group, _list, pnum); } -Group *const * -EwinGetGroups(const EWin * ewin, int *num) -{ - *num = ewin->num_groups; - return ewin->groups; -} - #if ENABLE_DIALOGS static Group ** ListWinGroups(const EWin * ewin, char group_select, int *num) diff --git a/src/groups.h b/src/groups.h index 6a3653b7..6d7c35b0 100644 --- a/src/groups.h +++ b/src/groups.h @@ -45,7 +45,6 @@ int GroupMatchAction(const Group * g, int action); int GroupRemember(Group * g); voidGroupRememberByGid(int gid); EWin *const *GroupGetMembers(const Group * g, int *num); -Group *const *EwinGetGroups(const EWin * ewin, int *num); Group *EwinsInGroup(const EWin * ewin1, const EWin * ewin2); voidGroupsEwinAdd(EWin * ewin, const int *pgid, int ngid); voidGroupsEwinRemove(EWin * ewin); diff --git a/src/snaps.c b/src/snaps.c index 9c801bfe..b0fdf4d1 100644 --- a/src/snaps.c +++ b/src/snaps.c @@ -384,9 +384,8 @@ _SnapUpdateEwinCmd(Snapshot * sn, const EWin * ewin) static void _SnapUpdateEwinGroups(Snapshot * sn, const EWin * ewin, char onoff) { - EWin **gwins; - Group *const *groups; - int i, j, num, num_groups; + EWin **gwins, *ewin2; + int i, j, num; if (!ewin) return; @@ -402,29 +401,30 @@ _SnapUpdateEwinGroups(Snapshot * sn, const EWin * ewin, char onoff) ListWinGroupMembersForEwin(ewin, GROUP_ACTION_ANY, Mode.nogroup, ); for (i = 0; i < num; i++) { + ewin2 = gwins[i]; + if (onoff) { -groups = EwinGetGroups(gwins[i], _groups); -if (!groups) +if (!ewin2->groups) continue; -sn = gwins[i]->snap; +sn = ewin2->snap; if (!sn) - sn = _SnapEwinGet(gwins[i], SNAP_MATCH_DEFAULT); + sn = _SnapEwinGet(ewin2, SNAP_MATCH_DEFAULT); if (!sn) continue; -sn->num_groups = num_groups; -EFREE_SET(sn->groups, EMALLOC(int, num_groups)); +sn->num_groups = ewin2->num_groups; +EFREE_SET(sn->groups, EMALLOC(int, ewin2->num_groups)); -for (j = 0; j < num_groups; j++) - sn->groups[j] = GroupRemember(groups[j]); +for (j = 0; j < ewin2->num_groups; j++) + sn->groups[j] = GroupRemember(ewin2->groups[j]); } else { if (ewin->snap) { - sn = gwins[i]->snap; + sn = ewin2->snap; if (sn) { EFREE_NULL(sn->groups); --
[EGIT] [e16/e16] master 14/22: groups.c: Fix group deletion
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=0df0320da641cda984e60874a755a2b037e3ca1c commit 0df0320da641cda984e60874a755a2b037e3ca1c Author: Kim Woelders Date: Mon May 4 08:14:02 2020 +0200 groups.c: Fix group deletion The loop construct did not delete all groups. Do group destruction after loop to avoid accessing deleted group->num_members. --- src/groups.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/groups.c b/src/groups.c index bc4884ad..8feba8ba 100644 --- a/src/groups.c +++ b/src/groups.c @@ -329,7 +329,6 @@ _GroupEwinRemove(Group * g, EWin * ewin) static void _GroupDelete(Group * g) { - int i; EWin *ewin; if (!g) @@ -337,12 +336,14 @@ _GroupDelete(Group * g) Dprintf("group=%p gid=%d\n", g, g->index); - for (i = 0; i < g->num_members; i++) + g->save = 1; + while (g->num_members > 0) { ewin = g->members[0]; _GroupEwinRemove(g, ewin); SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } + _GroupDestroy(g); } Group ** --
[EGIT] [e16/e16] master 13/22: groups.c: Add group del command
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=924518956c1a28eb78e5c597dbe1234ee07aa83d commit 924518956c1a28eb78e5c597dbe1234ee07aa83d Author: Kim Woelders Date: Mon May 4 08:13:22 2020 +0200 groups.c: Add group del command --- src/groups.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/groups.c b/src/groups.c index 1e878dad..bc4884ad 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1284,6 +1284,11 @@ IPC_Group(const char *params) _GroupShow(group); return; } + else if (!strcmp(operation, "del")) + { + _GroupDelete(group); + return; + } if (!param1[0]) { @@ -1420,6 +1425,7 @@ static const IpcItem GroupsIpcArray[] = { "Available group commands are:\n" " group info\n" " group info\n" +" group del\n" " group iconify \n" " group kill \n" " group move \n" --
[EGIT] [e16/e16] master 17/22: snaps: Fix snapshot group remembering when all groups are deleted
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=b65a31e3d43ddeec8e5c4d656b53a51f56394e19 commit b65a31e3d43ddeec8e5c4d656b53a51f56394e19 Author: Kim Woelders Date: Mon May 4 18:50:35 2020 +0200 snaps: Fix snapshot group remembering when all groups are deleted When all groups were deleted from a window it would stop remembering group membership. Unfortunately this fix is not backwards compatible. If downgrading setups where some windows have multiple groups some group memberships will be lost. --- src/snaps.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/snaps.c b/src/snaps.c index b0fdf4d1..2b434775 100644 --- a/src/snaps.c +++ b/src/snaps.c @@ -1135,10 +1135,12 @@ SnapshotsSaveReal(void) if (sn->use_flags & SNAP_USE_SHADOW) fprintf(f, "SHADOW: %i\n", sn->shadow); #endif - if (sn->groups) + if (sn->use_flags & SNAP_USE_GROUPS) { + fprintf(f, "GROUP:"); for (j = 0; j < sn->num_groups; j++) - fprintf(f, "GROUP: %i\n", sn->groups[j]); + fprintf(f, " %i", sn->groups[j]); + fprintf(f, "\n"); } fprintf(f, "\n"); } @@ -1192,7 +1194,7 @@ _SnapshotsLoad(FILE * fs) continue; *s++ = '\0'; s = Estrtrim(s); - if (!buf[0] || !s[0]) + if (!buf[0]) continue; if (!strcmp(buf, "NEW")) { @@ -1348,11 +1350,17 @@ _SnapshotsLoad(FILE * fs) else if (!strcmp(buf, "GROUP")) { sn->use_flags |= SNAP_USE_GROUPS; - sn->num_groups++; - sn->groups = EREALLOC(int, sn->groups, sn->num_groups); - - sn->groups[sn->num_groups - 1] = atoi(s); - GroupRememberByGid(sn->groups[sn->num_groups - 1]); + for (;; s += b) + { + b = 0; + sscanf(s, "%d %n", , ); + if (b <= 0) + break; + sn->num_groups++; + sn->groups = EREALLOC(int, sn->groups, sn->num_groups); + sn->groups[sn->num_groups - 1] = a; + GroupRememberByGid(a); + } } #if USE_COMPOSITE else if (!strcmp(buf, "OPACITY")) --
[EGIT] [e16/e16] master 02/22: groups.c: Eliminate BuildWindowGroup()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=5a131b00b1d13b75ffa4ca65be0cb0809eb11f28 commit 5a131b00b1d13b75ffa4ca65be0cb0809eb11f28 Author: Kim Woelders Date: Sun May 3 09:02:06 2020 +0200 groups.c: Eliminate BuildWindowGroup() --- src/groups.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/groups.c b/src/groups.c index d8355e49..58aebc20 100644 --- a/src/groups.c +++ b/src/groups.c @@ -253,18 +253,6 @@ BreakWindowGroup(EWin * ewin, Group * g) } } -static void -BuildWindowGroup(EWin ** ewins, int num, int gid) -{ - int i; - Group *group; - - Mode_groups.current = group = GroupCreate(gid); - - for (i = 0; i < num; i++) - AddEwinToGroup(ewins[i], group); -} - Group ** GroupsGetList(int *pnum) { @@ -373,12 +361,9 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) if (!g) { /* This should not happen, but may if group/snap configs are corrupted */ -BuildWindowGroup(, 1, gid); - } - else - { -_GroupAddEwin(g, ewin); +g = GroupCreate(gid); } + _GroupAddEwin(g, ewin); } SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } @@ -1220,7 +1205,9 @@ IPC_GroupOps(const char *params) if (!strcmp(operation, "start")) { - BuildWindowGroup(, 1, -1); + group = GroupCreate(-1); + Mode_groups.current = group; + AddEwinToGroup(ewin, group); IpcPrintf("start %8x\n", win); } else if (!strcmp(operation, "add")) --
[EGIT] [e16/e16] master 07/22: groups.c: Fold "group_info" into "group" IPC command
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=3c5f33648e742ed0b5aefed4289223504450ec1a commit 3c5f33648e742ed0b5aefed4289223504450ec1a Author: Kim Woelders Date: Sun May 3 17:34:21 2020 +0200 groups.c: Fold "group_info" into "group" IPC command --- src/groups.c | 52 ++-- 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/src/groups.c b/src/groups.c index 5c66cc22..791994a1 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1167,26 +1167,6 @@ _GroupShow(Group * g) g->cfg.set_border, g->cfg.stick, g->cfg.shade); } -static void -IPC_GroupInfo(const char *params) -{ - Group *group; - - if (params) - { - group = _GroupFind2(params); - if (group) - _GroupShow(group); - else - IpcPrintf("Error: no such group: %s\n", params); - } - else - { - IpcPrintf("Number of groups: %d\n", LIST_GET_COUNT(_list)); - LIST_FOR_EACH(Group, _list, group) _GroupShow(group); - } -} - static void IPC_GroupOps(const char *params) { @@ -1270,13 +1250,20 @@ IPC_Group(const char *params) if (!params) { - IpcPrintf("Error: no group specified\n"); + IpcPrintf("Error: no operation specified\n"); return; } groupid[0] = operation[0] = param1[0] = '\0'; sscanf(params, "%100s %100s %100s", groupid, operation, param1); + if (!strcmp(groupid, "info")) + { + IpcPrintf("Number of groups: %d\n", LIST_GET_COUNT(_list)); + LIST_FOR_EACH(Group, _list, group) _GroupShow(group); + return; + } + if (!operation[0]) { IpcPrintf("Error: no operation specified\n"); @@ -1290,6 +1277,12 @@ IPC_Group(const char *params) return; } + if (!strcmp(operation, "info")) + { + _GroupShow(group); + return; + } + if (!param1[0]) { IpcPrintf("Error: no mode specified\n"); @@ -1306,11 +1299,6 @@ IPC_Group(const char *params) { IpcPrintf("Error: unknown mode specified\n"); } - else if (!strcmp(operation, "num_members")) - { - IpcPrintf("num_members: %d\n", group->num_members); - onoff = -1; - } else if (!strcmp(operation, "iconify")) { if (onoff >= 0) @@ -1407,12 +1395,6 @@ static const IpcItem GroupsIpcArray[] = { "Configure window groups", " groups cfg Configure groups\n"} , - { -IPC_GroupInfo, -"group_info", "gl", -"Retrieve some info on groups", -"use \"group_info [group_index]\"\n"} - , { IPC_GroupOps, "group_op", "gop", @@ -1431,9 +1413,11 @@ static const IpcItem GroupsIpcArray[] = { "Group commands", "use \"group \" to set group properties.\n" "Available group commands are:\n" -" group num_members \n" +" group info\n" +" group info\n" " group iconify \n" -" group kill \n" " group move \n" +" group kill \n" +" group move \n" " group raise \n" " group set_border \n" " group stick \n" --
[EGIT] [e16/e16] master 01/02: Fix technical/shapewin move mode through edge flip
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=b27ff7ee74c0390c927fa5afa49ac4ccf2b257e0 commit b27ff7ee74c0390c927fa5afa49ac4ccf2b257e0 Author: Kim Woelders Date: Wed May 6 07:51:23 2020 +0200 Fix technical/shapewin move mode through edge flip The technical etc. move modes using a shaped window ("avoid server grab" mode) would create a new shape window on every edge flip, which could only be removed by restarting e16. Broken since 0c16916258bde5de8874b96f6539be6e6b2ab2cf - v1.0.12. --- src/draw.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/draw.c b/src/draw.c index 511200e7..5b1cff73 100644 --- a/src/draw.c +++ b/src/draw.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007-2018 Kim Woelders + * Copyright (C) 2007-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -226,12 +226,16 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, { EwinShapeSet(ewin); - psd = ECALLOC(ShapeData, 1); - ewin->shape_data = psd; + psd = (ShapeData *) ewin->shape_data; if (!psd) - goto done; - psd->root = WinGetXwin(VROOT); - EwinBorderGetSize(ewin, >bl, >br, >bt, >bb); + { +psd = ECALLOC(ShapeData, 1); +if (!psd) + goto done; +ewin->shape_data = psd; +psd->root = WinGetXwin(VROOT); +EwinBorderGetSize(ewin, >bl, >br, >bt, >bb); + } } psd = (ShapeData *) ewin->shape_data; if (!psd) --
[EGIT] [e16/e16] master 02/02: Fix technical/shapewin move mode with window groups
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=aae5938e97496793c6ba950454eae7705fa75c0f commit aae5938e97496793c6ba950454eae7705fa75c0f Author: Kim Woelders Date: Wed May 6 08:32:26 2020 +0200 Fix technical/shapewin move mode with window groups The technical etc. move modes using a shaped window ("avoid server grab" mode) only properly shaped the shape window of the first group member. Broken since 0c16916258bde5de8874b96f6539be6e6b2ab2cf - v1.0.12. This commit changed the mode of operation from one shape window in total to one per group member, i.e. shapes should no longer be combined. ..and drop useless fl variable in _MoveResizeMoveResume(). --- src/draw.c | 11 +-- src/ewins.h | 4 ++-- src/moveresize.c | 26 +++--- src/shapewin.c | 15 +-- src/shapewin.h | 5 ++--- src/slide.c | 6 +++--- src/warp.c | 4 ++-- 7 files changed, 30 insertions(+), 41 deletions(-) diff --git a/src/draw.c b/src/draw.c index 5b1cff73..56ddf920 100644 --- a/src/draw.c +++ b/src/draw.c @@ -129,7 +129,7 @@ typedef struct { static void _ShapeDrawNograb_tech_box(EWin * ewin, int md, int firstlast, - int xn, int yn, int wn, int hn, int seqno) + int xn, int yn, int wn, int hn) { ShapeData *psd = (ShapeData *) ewin->shape_data; @@ -138,8 +138,8 @@ _ShapeDrawNograb_tech_box(EWin * ewin, int md, int firstlast, if (!psd->shwin) return; - ShapewinShapeSet(psd->shwin, md, xn, yn, wn, hn, psd->bl, psd->br, psd->bt, - psd->bb, seqno); + ShapewinShapeSet(psd->shwin, md, xn, yn, wn, hn, + psd->bl, psd->br, psd->bt, psd->bb); EoMap(psd->shwin, 0); CoordsShow(ewin); @@ -201,8 +201,7 @@ _ShapeDrawNontranslucent(EWin * ewin, int md, int firstlast, } void -DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, - int firstlast, int seqno) +DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, int firstlast) { ShapeData *psd; int dx, dy; @@ -262,7 +261,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, if (((md <= MR_BOX) || (md == MR_TECH_OPAQUE)) && Conf.movres.avoid_server_grab) { - _ShapeDrawNograb_tech_box(ewin, md, firstlast, x, y, w, h, seqno); + _ShapeDrawNograb_tech_box(ewin, md, firstlast, x, y, w, h); goto done; } diff --git a/src/ewins.h b/src/ewins.h index 897256ac..3bc8f0f8 100644 --- a/src/ewins.h +++ b/src/ewins.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -343,7 +343,7 @@ voidDockIt(EWin * ewin); /* draw.c */ voidDrawEwinShape(EWin * ewin, int md, int x, int y, int w, - int h, int firstlast, int seqno); + int h, int firstlast); voidDrawEwinShapeEnd(EWin * ewin); int DrawEwinShapeNeedsGrab(int mode); diff --git a/src/moveresize.c b/src/moveresize.c index 0d74d0d0..1aa0659c 100644 --- a/src/moveresize.c +++ b/src/moveresize.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -163,7 +163,7 @@ _MoveResizeMoveEnd(EWin * ewin) for (i = 0; i < num; i++) DrawEwinShape(gwins[i], Mode_mr.mode, gwins[i]->shape_x, gwins[i]->shape_y, -gwins[i]->client.w, gwins[i]->client.h, 2, i); +gwins[i]->client.w, gwins[i]->client.h, 2); } Mode.mode = MODE_NONE; @@ -226,7 +226,7 @@ _MoveResizeMoveSuspend(void) { ewin = lst[i]; DrawEwinShape(ewin, Mode_mr.mode, ewin->shape_x, - ewin->shape_y, ewin->client.w, ewin->client.h, 3, i); + ewin->shape_y, ewin->client.w, ewin->client.h, 3); } Efree(lst); @@ -239,7 +239,7 @@ _MoveResizeMoveResume(void) { EWin *ewin, **lst; int i, num; - int x, y, fl, dx, dy; + int x, y, dx, dy; ewin = Mode_mr.ewin; if (!ewin) @@ -247,12 +247,8 @@ _MoveResizeMov
[EGIT] [legacy/imlib2_loaders] master 03/04: Use SWAP.. macros from common.h
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=d5eaf5fb76b5855dd40194ee60e3abfa81a342c4 commit d5eaf5fb76b5855dd40194ee60e3abfa81a342c4 Author: Kim Woelders Date: Thu May 21 04:51:46 2020 +0200 Use SWAP.. macros from common.h --- src/modules/loaders/loader_ani.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/modules/loaders/loader_ani.c b/src/modules/loaders/loader_ani.c index bc73a46..20412e9 100644 --- a/src/modules/loaders/loader_ani.c +++ b/src/modules/loaders/loader_ani.c @@ -39,18 +39,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define D(fmt...) #endif -#define SWAP32(x) \ -x) & 0x00ff ) << 24) |\ - (((x) & 0xff00 ) << 8) |\ - (((x) & 0x00ff ) >> 8) |\ - (((x) & 0xff00 ) >> 24)) - -#ifdef WORDS_BIGENDIAN -#define ENDIAN_SWAP(x) (SWAP32(x)) -#else -#define ENDIAN_SWAP(x) (x) -#endif - typedef struct _MsChunk { struct _MsChunk*next; DATA32 chunk_id; @@ -101,7 +89,7 @@ ani_read_int32(FILE * fp, DATA32 * data, int count) { ani_read_int8(fp, (DATA8 *) data, count * 4); for (i = 0; i < count; i++) - data[i] = ENDIAN_SWAP(data[i]); + data[i] = SWAP_LE_32(data[i]); } return total * 4; @@ -192,7 +180,7 @@ ani_load_chunk(MsAni * ani) chunk->chunk_id = chunk_id; chunk->chunk_size = chunk_size; - chunk_id = ENDIAN_SWAP(chunk_id); + chunk_id = SWAP_LE_32(chunk_id); D("Loaded chunk with ID '%c%c%c%c' and length %i\n", ((char *)_id)[0], ((char *)_id)[1], --
[EGIT] [legacy/imlib2_loaders] master 01/04: configure.ac: Drop initial config.cache removal
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=f14573a63f0a24152b6d3ace8eb66e185be4a2f2 commit f14573a63f0a24152b6d3ace8eb66e185be4a2f2 Author: Kim Woelders Date: Sat Mar 7 16:41:10 2020 +0100 configure.ac: Drop initial config.cache removal Not removing config.cache does not seem to cause trouble elsewhere. --- configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index e77eb96..a8bdea0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,3 @@ -# get rid of that stupid cache mechanism -rm -f config.cache - AC_INIT([imlib2_loaders],[1.6.1],[enlightenment-de...@lists.sourceforge.net]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_MACRO_DIR([m4]) --
[EGIT] [legacy/imlib2_loaders] master 04/04: Move loaders to load2()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=c74c3c72349da284470d5f148528d6e3f676a85d commit c74c3c72349da284470d5f148528d6e3f676a85d Author: Kim Woelders Date: Thu May 21 05:06:07 2020 +0200 Move loaders to load2() --- src/modules/loaders/loader_ani.c | 18 ++ src/modules/loaders/loader_xcf.c | 19 +-- 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/modules/loaders/loader_ani.c b/src/modules/loaders/loader_ani.c index 20412e9..3113145 100644 --- a/src/modules/loaders/loader_ani.c +++ b/src/modules/loaders/loader_ani.c @@ -47,7 +47,6 @@ typedef struct _MsChunk { } MsChunk; typedef struct _MsAni { - char *filename; FILE *fp; DATA32 cp; @@ -96,17 +95,15 @@ ani_read_int32(FILE * fp, DATA32 * data, int count) } static MsAni * -ani_init(char *filename) +ani_init(FILE * fp) { MsAni *ani; if (!(ani = calloc(1, sizeof(MsAni return NULL; - if (!(ani->fp = fopen(filename, "r"))) - goto bail; + ani->fp = fp; - ani->filename = filename; ani->cp += ani_read_int32(ani->fp, >riff_id, 1); ani->cp += ani_read_int32(ani->fp, >data_size, 1); ani->cp += ani_read_int32(ani->fp, >chunk_id, 1); @@ -131,9 +128,6 @@ ani_cleanup(MsAni * ani) if (!ani) return; - if (ani->fp) - fclose(ani->fp); - for (c = ani->chunks; c;) { c_next = c->next; @@ -228,9 +222,8 @@ ani_save_ico(MsChunk * chunk) return strdup(tmp); } -char -load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, - char load_data) +int +load2(ImlibImage * im, int load_data) { int rc; ImlibLoader*loader; @@ -241,7 +234,8 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, if (!loader) return LOAD_FAIL; - if (!(ani = ani_init((im->real_file + ani = ani_init(im->fp); + if (!ani) return LOAD_FAIL; ani_load(ani); diff --git a/src/modules/loaders/loader_xcf.c b/src/modules/loaders/loader_xcf.c index d426fa6..fbd1648 100644 --- a/src/modules/loaders/loader_xcf.c +++ b/src/modules/loaders/loader_xcf.c @@ -220,7 +220,6 @@ struct _Tile { */ struct _GimpImage { FILE *fp; - char *filename; int cp; /* file stream pointer */ int compression; /* file compression mode*/ int file_version; @@ -1507,7 +1506,7 @@ xcf_load_image(void) } static int -xcf_file_init(char *filename) +xcf_file_init(FILE * fp) { charsuccess = 1; charid[14]; @@ -1521,11 +1520,8 @@ xcf_file_init(char *filename) D("Loading only XCF layer %i.\n", image->single_layer_index); } #endif - image->fp = fopen(filename, "r"); - if (!image->fp) - return 0; + image->fp = fp; - image->filename = filename; image->layers = NULL; image->last_layer = NULL; image->cmap = NULL; @@ -1539,7 +1535,6 @@ xcf_file_init(char *filename) if (strncmp(id, "gimp xcf ", 9) != 0) { success = 0; -fclose(image->fp); } else if (strcmp(id + 9, "file") == 0) { @@ -1552,7 +1547,6 @@ xcf_file_init(char *filename) else { success = 0; -fclose(image->fp); } return success; @@ -1564,8 +1558,6 @@ xcf_cleanup(void) Layer *l; Layer *lp; - fclose(image->fp); - l = image->last_layer; while (l) { @@ -1591,14 +1583,13 @@ xcf_to_imlib(ImlibImage * im) im->data = image->data; } -char -load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, - char load_data) +int +load2(ImlibImage * im, int load_data) { int rc = LOAD_FAIL; /* initialize */ - if (!xcf_file_init(im->real_file)) + if (!xcf_file_init(im->fp)) return LOAD_FAIL; /* do it! */ --
[EGIT] [legacy/imlib2_loaders] master 02/04: Update headers
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=27ae9ae8255d6b4720ba6fe19b99bb9d968541ec commit 27ae9ae8255d6b4720ba6fe19b99bb9d968541ec Author: Kim Woelders Date: Thu May 21 04:44:39 2020 +0200 Update headers --- src/modules/loaders/image.h | 9 + src/modules/loaders/loader_common.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/loaders/image.h b/src/modules/loaders/image.h index 70ca4b9..bea4f41 100644 --- a/src/modules/loaders/image.h +++ b/src/modules/loaders/image.h @@ -70,6 +70,7 @@ struct _imlibimage { char *key; ImlibImageDataMemoryFunction data_memory_func; ImlibLdCtx *lc; + FILE *fp; }; #ifdef BUILD_X11 @@ -92,7 +93,7 @@ struct _imlibimagepixmap { }; #endif -void__imlib_RescanLoaders(void); +void__imlib_LoadAllLoaders(void); void__imlib_RemoveAllLoaders(void); ImlibLoader **__imlib_GetLoaderList(void); ImlibLoader*__imlib_FindBestLoaderForFile(const char *file, @@ -100,14 +101,14 @@ ImlibLoader*__imlib_FindBestLoaderForFile(const char *file, ImlibLoader*__imlib_FindBestLoaderForFormat(const char *format, int for_save); ImlibLoader*__imlib_FindBestLoaderForFileFormat(const char *file, -char *format, +const char *format, int for_save); void__imlib_LoaderSetFormats(ImlibLoader * l, const char *const *fmt, unsigned int num); ImlibImage *__imlib_CreateImage(int w, int h, DATA32 * data); -ImlibImage *__imlib_LoadImage(const char *file, +ImlibImage *__imlib_LoadImage(const char *file, FILE * fp, ImlibProgressFunction progress, char progress_granularity, char immediate_load, char dont_cache, @@ -155,7 +156,7 @@ void__imlib_DirtyPixmapsForImage(ImlibImage * im); void__imlib_AttachTag(ImlibImage * im, const char *key, int val, void *data, ImlibDataDestructorFunction destructor); -ImlibImageTag *__imlib_GetTag(ImlibImage * im, const char *key); +ImlibImageTag *__imlib_GetTag(const ImlibImage * im, const char *key); ImlibImageTag *__imlib_RemoveTag(ImlibImage * im, const char *key); void__imlib_FreeTag(ImlibImage * im, ImlibImageTag * t); void__imlib_FreeAllTags(ImlibImage * im); diff --git a/src/modules/loaders/loader_common.h b/src/modules/loaders/loader_common.h index ccbacef..d1716c9 100644 --- a/src/modules/loaders/loader_common.h +++ b/src/modules/loaders/loader_common.h @@ -6,7 +6,8 @@ #include "image.h" __EXPORT__ char load(ImlibImage * im, ImlibProgressFunction progress, - char progress_granularity, char immediate_load); + char progress_granularity, char load_data); +__EXPORT__ int load2(ImlibImage * im, int load_data); __EXPORT__ char save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity); __EXPORT__ void formats(ImlibLoader * l); --
[EGIT] [e16/e16] master 01/03: hiwin: Tweak debug
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=84372a11656e3bf4451dac050aa7ae7239c9cbde commit 84372a11656e3bf4451dac050aa7ae7239c9cbde Author: Kim Woelders Date: Sat Sep 5 18:10:16 2020 +0200 hiwin: Tweak debug --- src/hiwin.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/hiwin.c b/src/hiwin.c index 5d96a74f..ca45294e 100644 --- a/src/hiwin.c +++ b/src/hiwin.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -36,6 +36,11 @@ #include "xwin.h" #define DEBUG_HIWIN 0 +#if DEBUG_HIWIN +#define Dprintf(fmt, ...) Eprintf("%s: " fmt, __func__, __VA_ARGS__) +#else +#define Dprintf(fmt...) +#endif struct _hiwin { EObjo; @@ -220,9 +225,7 @@ HiwinEwinEvent(Win win __UNUSED__, XEvent * ev, void *prm) { Hiwin *phi = (Hiwin *) prm; -#if DEBUG_HIWIN - Eprintf("%s: type=%d %s\n", __func__, ev->type, EwinGetTitle(phi->ewin)); -#endif + Dprintf("type=%d %s\n", ev->type, EwinGetTitle(phi->ewin)); switch (ev->type) { @@ -272,9 +275,7 @@ HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent) #if USE_COMPOSITE if (phi->ewin) { -#if DEBUG_HIWIN - Eprintf("%s: Unregister %s\n", __func__, EwinGetTitle(phi->ewin)); -#endif + Dprintf("Unregister %s\n", EwinGetTitle(phi->ewin)); EventCallbackUnregister(EoGetWin(phi->ewin), HiwinEwinEvent, phi); } #endif @@ -286,9 +287,7 @@ HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent) #if USE_COMPOSITE if (phi->ewin) { -#if DEBUG_HIWIN - Eprintf("%s: Register %s\n", __func__, EwinGetTitle(phi->ewin)); -#endif + Dprintf("Register %s\n", EwinGetTitle(phi->ewin)); EventCallbackRegister(EoGetWin(phi->ewin), HiwinEwinEvent, phi); } #endif --
[EGIT] [e16/e16] master 02/03: CM: Fix switching fadeout to fadein
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=7199436ec550729327f3ecf369f4b2b8fc714469 commit 7199436ec550729327f3ecf369f4b2b8fc714469 Author: Kim Woelders Date: Sat Sep 5 18:09:19 2020 +0200 CM: Fix switching fadeout to fadein Happens when mousing over pager with zoom enabled. --- src/ecompmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ecompmgr.c b/src/ecompmgr.c index 3bc4171e..135f53bc 100644 --- a/src/ecompmgr.c +++ b/src/ecompmgr.c @@ -1034,12 +1034,14 @@ ECompMgrWinFade(EObj * eo, unsigned int op_from, unsigned int op_to) static void ECompMgrWinFadeIn(EObj * eo) { -#if DEBUG_OPACITY ECmWinInfo *cw = eo->cmhook; +#if DEBUG_OPACITY Eprintf("%s %#x: %u/%u, %#x %#x->%#x\n", __func__, EobjGetXwin(eo), eo->fading, cw->fadeout, eo->opacity, 0x1000, cw->opacity); #endif + if (eo->fading && cw->fadeout) + ECompMgrWinFadeEnd(eo, 0); ECompMgrWinFade(eo, 0x1000, eo->opacity); } --
[EGIT] [e16/e16] master 03/03: CM: Fix damage corner case (reparenting fading-out window)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=d46d0aec05494046ef5b054d857eaa982919f4ae commit d46d0aec05494046ef5b054d857eaa982919f4ae Author: Kim Woelders Date: Tue Sep 8 20:44:58 2020 +0200 CM: Fix damage corner case (reparenting fading-out window) --- src/ecompmgr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ecompmgr.c b/src/ecompmgr.c index 135f53bc..1be7b56f 100644 --- a/src/ecompmgr.c +++ b/src/ecompmgr.c @@ -1383,7 +1383,10 @@ ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy) if (!eo->shown) { if (change_xy) - ECompMgrWinInvalidate(eo, INV_POS); + { +ECompMgrDamageMergeObject(eo, cw->extents); +ECompMgrWinInvalidate(eo, INV_POS); + } return; } --
[EGIT] [e16/e16] master 01/03: Fix memory leak after failed execvp()
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=79879a81196aebb6556776ba6df63246bb2a6909 commit 79879a81196aebb6556776ba6df63246bb2a6909 Author: Kim Woelders Date: Sun Oct 11 07:44:06 2020 +0200 Fix memory leak after failed execvp() --- src/actions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions.c b/src/actions.c index 1252f1d4..2ebd3d65 100644 --- a/src/actions.c +++ b/src/actions.c @@ -39,6 +39,8 @@ Eexec(const char *cmd) lst = StrlistFromString(cmd, ' ', ); execvp(lst[0], lst); + + StrlistFree(lst, num); } static void --
[EGIT] [e16/e16] master 02/03: Remove unused SM_CLIENT_ID stuff
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=171b282f9fc3197ba4022b1b06f8dac0464f6d8e commit 171b282f9fc3197ba4022b1b06f8dac0464f6d8e Author: Kim Woelders Date: Sun Oct 11 08:07:20 2020 +0200 Remove unused SM_CLIENT_ID stuff --- src/ewins.c | 1 - src/hints.h | 5 + src/session.c | 26 -- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/ewins.c b/src/ewins.c index c40c1cb4..da46849d 100644 --- a/src/ewins.c +++ b/src/ewins.c @@ -164,7 +164,6 @@ EwinGetHints(EWin * ewin) MWM_GetHints(ewin, 0); ICCCM_GetInfo(ewin);/* NB! Need group info first */ HintsGetWindowHints(ewin); - SessionGetInfo(ewin); } static void diff --git a/src/hints.h b/src/hints.h index a9bde876..79e6f8c4 100644 --- a/src/hints.h +++ b/src/hints.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2014 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -175,7 +175,4 @@ int ICCCM_ProcessPropertyChange(EWin * ewin, voidMWM_GetHints(EWin * ewin, EX_Atom atom_change); voidMWM_SetInfo(void); -/* session.c */ -voidSessionGetInfo(EWin * ewin); - #endif /* _HINTS_H_ */ diff --git a/src/session.c b/src/session.c index 83d5dd36..fcf94402 100644 --- a/src/session.c +++ b/src/session.c @@ -293,10 +293,6 @@ callback_shutdown_cancelled(SmcConn smc_conn, SmPointer client_data __UNUSED__) SmcSaveYourselfDone(smc_conn, False); } -#if 0 /* Unused */ -static EX_Atom atom_sm_client_id; -#endif - static IceConn ice_conn; static void @@ -411,10 +407,6 @@ SessionInit(void) if (Mode.wm.window) return; -#if 0 /* Unused */ - atom_sm_client_id = ex_atom_get("SM_CLIENT_ID"); -#endif - #if USE_SM ice_init(); #endif @@ -427,24 +419,6 @@ SessionInit(void) Conf.session.cmd_halt = Estrdup("poweroff"); } -void -SessionGetInfo(EWin * ewin __UNUSED__) -{ -#if 0 /* Unused */ -#if USE_SM - if (atom_sm_client_id == NoXID) - return; - EFREE_NULL(ewin->session_id); - if (ewin->icccm.client_leader != NoXID) - ewin->session_id = -ex_window_prop_string_get(ewin->icccm.client_leader, - atom_sm_client_id); -#else - ewin = NULL; -#endif /* USE_SM */ -#endif -} - #if USE_SM void SetSMID(const char *smid) --
[EGIT] [e16/e16] master 03/03: Ensure a couple of initialisations are never skipped
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=b0a4eaa65a0ddbe989ab095afd7e83862a0d9c23 commit b0a4eaa65a0ddbe989ab095afd7e83862a0d9c23 Author: Kim Woelders Date: Sun Oct 11 07:46:50 2020 +0200 Ensure a couple of initialisations are never skipped Otherwise we may get segv in window mode. --- src/session.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/session.c b/src/session.c index fcf94402..6f1a2ec5 100644 --- a/src/session.c +++ b/src/session.c @@ -404,19 +404,19 @@ ice_init(void) void SessionInit(void) { - if (Mode.wm.window) - return; - -#if USE_SM - ice_init(); -#endif - if (!Conf.session.script) Conf.session.script = Estrdup("$EROOT/scripts/session.sh"); if (!Conf.session.cmd_reboot) Conf.session.cmd_reboot = Estrdup("reboot"); if (!Conf.session.cmd_halt) Conf.session.cmd_halt = Estrdup("poweroff"); + + if (Mode.wm.window) + return; + +#if USE_SM + ice_init(); +#endif } #if USE_SM --
[EGIT] [e16/e16] master 01/02: French translation update (Philippe J. Guillaumie)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=1abd68328655b5cb52205d413cfc1c629c170db5 commit 1abd68328655b5cb52205d413cfc1c629c170db5 Author: Kim Woelders Date: Wed Oct 14 17:31:29 2020 +0200 French translation update (Philippe J. Guillaumie) --- po/fr.po | 115 +++ 1 file changed, 56 insertions(+), 59 deletions(-) diff --git a/po/fr.po b/po/fr.po index 3ed5e139..58acc0d1 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: e16\n" "Report-Msgid-Bugs-To: enlightenment-i...@lists.sourceforge.net\n" -"POT-Creation-Date: 2020-09-09 16:41+0200\n" -"PO-Revision-Date: 2020-05-23 15:00+0200\n" +"POT-Creation-Date: 2020-05-27 21:32+0200\n" +"PO-Revision-Date: 2020-10-13 14:42+0200\n" "Last-Translator: Philippe Jean Guillaumie \n" "Language-Team: French\n" "Language: fr\n" @@ -18,8 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Launchpad-Export-Date: 2014-05-25 05:43+\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 2.4.1\n" #: src/about.c:35 #, c-format @@ -303,7 +302,7 @@ msgstr "Arrière-plan" #: src/backgrounds.c:2227 msgid "Desktop Background Settings" -msgstr "Paramètres d'arrière-plan du bureau" +msgstr "Paramètres de l'Arrière-plan du bureau" #: src/backgrounds.c:2231 msgid "" @@ -502,7 +501,7 @@ msgstr "Aux deux extrémités" msgid "End" msgstr "Fin" -#: src/container.c:1646 src/focus.c:1024 +#: src/container.c:1646 src/focus.c:998 msgid "None" msgstr "Aucune" @@ -707,7 +706,7 @@ msgstr "" msgid "Apply" msgstr "Appliquer" -#: src/ecompmgr.c:2327 +#: src/ecompmgr.c:2322 msgid "" "Cannot enable Composite Manager.\n" "Use xdpyinfo to check that\n" @@ -743,128 +742,118 @@ msgstr "" "\n" "Sortie.\n" -#: src/focus.c:851 +#: src/focus.c:839 msgid "Focus follows pointer" msgstr "Le focus suit le pointeur de la souris" -#: src/focus.c:857 +#: src/focus.c:845 msgid "Focus follows pointer sloppily" msgstr "Le focus suit le pointeur de la souris de façon fluide" -#: src/focus.c:863 +#: src/focus.c:851 msgid "Focus follows mouse clicks" msgstr "Le focus suit les clics de la souris" -#: src/focus.c:873 -#, fuzzy -msgid "Clicking in a window does not raise it" -msgstr "Toujours élever une fenêtre qui reçoit un clic" - -#: src/focus.c:879 +#: src/focus.c:861 msgid "Clicking in a window always raises it" msgstr "Toujours élever une fenêtre qui reçoit un clic" -#: src/focus.c:885 -#, fuzzy -msgid "Only primary mouse button can raise window" -msgstr "Bouton de la souris pour sélectionner et déplacer les fenêtres :" - -#: src/focus.c:895 +#: src/focus.c:869 msgid "All new windows first get the focus" msgstr "Toutes les nouvelles fenêtres obtiennent le focus" -#: src/focus.c:902 +#: src/focus.c:876 msgid "New windows get the focus if their window group is focused" msgstr "Les nouvelles fenêtres obtiennent le focus si leur groupe a le focus" -#: src/focus.c:907 +#: src/focus.c:881 msgid "Only new dialog windows get the focus" msgstr "Seules les nouvelles fenêtres de dialogue obtiennent le focus" -#: src/focus.c:914 +#: src/focus.c:888 msgid "Only new dialogs whose owner is focused get the focus" msgstr "" "Seules les nouvelles fenêtres de dialogue dont le parent a le\n" "focus obtiennent le focus." -#: src/focus.c:919 +#: src/focus.c:893 msgid "Raise windows while switching focus" msgstr "Élever les fenêtres pendant le changement de focus" -#: src/focus.c:925 +#: src/focus.c:899 msgid "Send mouse pointer to window while switching focus" msgstr "Envoyer le pointeur sur la fenêtre pendant le changement de focus" -#: src/focus.c:931 +#: src/focus.c:905 msgid "Always send mouse pointer to window on focus switch" msgstr "Toujours placer le pointeur sur la fenêtre qui obtient le focus" -#: src/focus.c:939 +#: src/focus.c:913 msgid "Raise windows automatically" msgstr "Élever les fenêtres automatiquement" -#: src/focus.c:945 +#: src/focus.c:919 msgid "Autoraise delay:" msgstr "Délai d'Auto-élévation :" -#: src/focus.c:958 +#: src/focus.c:932 msgid "Display and use focus list" msgstr "Aff
[EGIT] [e16/e16] master 01/01: French translation update (Philippe J. Guillaumie)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9f75236c080d67a6f1b499f8c9004c5625cd19c6 commit 9f75236c080d67a6f1b499f8c9004c5625cd19c6 Author: Kim Woelders Date: Wed Oct 14 20:46:01 2020 +0200 French translation update (Philippe J. Guillaumie) --- po/fr.po | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/po/fr.po b/po/fr.po index c966bdb2..b7d7c139 100644 --- a/po/fr.po +++ b/po/fr.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: e16\n" "Report-Msgid-Bugs-To: enlightenment-i...@lists.sourceforge.net\n" "POT-Creation-Date: 2020-10-14 17:32+0200\n" -"PO-Revision-Date: 2020-10-13 14:42+0200\n" +"PO-Revision-Date: 2020-10-14 19:48+0200\n" "Last-Translator: Philippe Jean Guillaumie \n" "Language-Team: French\n" "Language: fr\n" @@ -755,18 +755,16 @@ msgid "Focus follows mouse clicks" msgstr "Le focus suit les clics de la souris" #: src/focus.c:873 -#, fuzzy msgid "Clicking in a window does not raise it" -msgstr "Toujours élever une fenêtre qui reçoit un clic" +msgstr "Ne jamais élever une fenêtre qui reçoit un clic" #: src/focus.c:879 msgid "Clicking in a window always raises it" msgstr "Toujours élever une fenêtre qui reçoit un clic" #: src/focus.c:885 -#, fuzzy msgid "Only primary mouse button can raise window" -msgstr "Bouton de la souris pour sélectionner et déplacer les fenêtres :" +msgstr "Seul le bouton principal de la souris peut élever la fenêtre" #: src/focus.c:895 msgid "All new windows first get the focus" --
[EGIT] [e16/e16] master 05/05: Hide Border struct internals
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=bf1095d107583d6adc2cbda73487b8c8325e1ad9 commit bf1095d107583d6adc2cbda73487b8c8325e1ad9 Author: Kim Woelders Date: Thu Jun 6 22:26:28 2013 +0200 Hide Border struct internals --- src/borders.c | 79 ++ src/borders.h | 64 + src/ewin-ops.c | 91 ++ src/ewins.c| 48 +-- src/groups.c | 2 +- src/menus.c| 19 ++-- 6 files changed, 171 insertions(+), 132 deletions(-) diff --git a/src/borders.c b/src/borders.c index c69ff181..f33f0a9c 100644 --- a/src/borders.c +++ b/src/borders.c @@ -49,6 +49,61 @@ #define EWIN_BORDER_TITLE_EVENT_MASK \ (EWIN_BORDER_PART_EVENT_MASK) +typedef struct { + int min, max; +} WinLimit; + +typedef struct { + int originbox; + struct { + int percent; + int absolute; + } x, y; +} WinPoint; + +typedef struct { + WinLimitwidth, height; + WinPointtopleft, bottomright; +} Geometry; + +typedef struct { + Geometrygeom; + ImageClass *iclass; + ActionClass*aclass; + TextClass *tclass; + ECursor*ec; + signed char ontop; + int flags; + charkeep_for_shade; +} WinPart; + +struct _border { + dlist_t list; + char *name; + char *group_border_name; + EImageBorderborder; + int num_winparts; + WinPart*part; + charno_extent; + charchanges_shape; + charshadedir; + charthrowaway; + unsigned intref_count; + ActionClass*aclass; +}; + +struct _ewinbit { + EWin *ewin; /* Belongs to */ + Win win; + int x, y, w, h; + int cx, cy, cw, ch; + charstate; + charexpose; + charleft; + ImageState *is; + TextState *ts; +}; + static LIST_HEAD(border_list); static void _BorderDestroy(Border * b); @@ -485,6 +540,24 @@ BorderCanShade(const Border * b) return !b->no_extent; } +const EImageBorder * +BorderGetSize(const Border * b) +{ + return >border; +} + +int +BorderGetShadedir(const Border * b) +{ + return b->shadedir; +} + +ActionClass* +BorderGetAclass(const Border * b) +{ + return b->aclass; +} + void EwinBorderSelect(EWin * ewin) { @@ -670,6 +743,12 @@ EwinBorderSetInitially(EWin * ewin, const char *name) _EwinBorderAssign(ewin, BorderFind(name)); } +const Border * +EwinBorderGetGroupBorder(const EWin * ewin) +{ + return BorderFind(ewin->border->group_border_name); +} + static Border * _BorderCreate(const char *name) { diff --git a/src/borders.h b/src/borders.h index f7a9eeab..27f86795 100644 --- a/src/borders.h +++ b/src/borders.h @@ -26,69 +26,17 @@ #include "eimage.h" #include "etypes.h" -#include "list.h" #include "xtypes.h" -typedef struct { - int min, max; -} WinLimit; - -typedef struct { - int originbox; - struct { - int percent; - int absolute; - } x, y; -} WinPoint; - -typedef struct { - WinLimitwidth, height; - WinPointtopleft, bottomright; -} Geometry; - -typedef struct { - Geometrygeom; - ImageClass *iclass; - ActionClass*aclass; - TextClass *tclass; - ECursor*ec; - signed char ontop; - int flags; - charkeep_for_shade; -} WinPart; - -struct _border { - dlist_t list; - char *name; - char *group_border_name; - EImageBorderborder; - int num_winparts; - WinPart*part; - charno_extent; - charchanges_shape; - charshadedir; - charthrowaway; - unsigned intref_count; - ActionClass*aclass; -}; - -struct _ewinbit { - EWin *ewin; /* Belongs to */ - Win win; - int x, y, w, h; - int cx, cy, cw, ch; - charstate; - charexpose; - charleft; - ImageState *is; - TextState *ts; -}; - -/* borders.c */ Border *BorderFind(const char *name); const char *BorderGetName(const Border * b); int BorderCanShade(const Border * b); +const EImageBorder *BorderGetSize(const Border * b
[EGIT] [e16/e16] master 02/05: borders.c: Prefix static functions with _
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=00f4a27d930e01036f3dc1991e67ee95ec30a2ee commit 00f4a27d930e01036f3dc1991e67ee95ec30a2ee Author: Kim Woelders Date: Fri Sep 25 11:53:11 2020 +0200 borders.c: Prefix static functions with _ --- src/borders.c | 200 +- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/src/borders.c b/src/borders.c index 2afb533f..e6b34dfa 100644 --- a/src/borders.c +++ b/src/borders.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -51,13 +51,13 @@ static LIST_HEAD(border_list); -static void BorderDestroy(Border * b); -static void BorderWinpartHandleEvents(Win win, XEvent * ev, void *prm); -static void BorderFrameHandleEvents(Win win, XEvent * ev, void *prm); -static Border *BorderGetFallback(void); +static void _BorderDestroy(Border * b); +static void _BorderWinpartHandleEvents(Win win, XEvent * ev, void *prm); +static void _BorderFrameHandleEvents(Win win, XEvent * ev, void *prm); +static Border *_BorderGetFallback(void); static void -BorderWinpartRealise(EWin * ewin, int i) +_BorderWinpartRealise(EWin * ewin, int i) { EWinBit*ewb = >bits[i]; @@ -77,7 +77,7 @@ BorderWinpartRealise(EWin * ewin, int i) } static void -BorderWinpartITclassApply(EWin * ewin, int i, int force) +_BorderWinpartITclassApply(EWin * ewin, int i, int force) { EWinBit*ewb = >bits[i]; WinPart*ebp = >border->part[i]; @@ -179,7 +179,7 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force) } static int -BorderWinpartDraw(EWin * ewin, int i) +_BorderWinpartDraw(EWin * ewin, int i) { EWinBit*ewb = >bits[i]; int resize = 0, ret = 0; @@ -200,7 +200,7 @@ BorderWinpartDraw(EWin * ewin, int i) if ((resize) || (ewb->expose)) { - BorderWinpartITclassApply(ewin, i, 1); + _BorderWinpartITclassApply(ewin, i, 1); ewb->expose = 0; ret = 1; } @@ -209,9 +209,9 @@ BorderWinpartDraw(EWin * ewin, int i) } static void -BorderWinpartChange(EWin * ewin, int i, int force) +_BorderWinpartChange(EWin * ewin, int i, int force) { - BorderWinpartITclassApply(ewin, i, force); + _BorderWinpartITclassApply(ewin, i, force); if (ewin->update.shape || ewin->border->changes_shape) EwinPropagateShapes(ewin); @@ -228,7 +228,7 @@ EwinBorderDraw(EWin * ewin, int do_shape, int do_paint) #endif for (i = 0; i < ewin->border->num_winparts; i++) - BorderWinpartITclassApply(ewin, i, do_shape || do_paint); + _BorderWinpartITclassApply(ewin, i, do_shape || do_paint); if (do_shape || ewin->update.shape || ewin->border->changes_shape) EwinPropagateShapes(ewin); @@ -242,12 +242,12 @@ EwinBorderUpdateInfo(EWin * ewin) for (i = 0; i < ewin->border->num_winparts; i++) { if (ewin->border->part[i].flags & FLAG_TITLE) - BorderWinpartITclassApply(ewin, i, 1); + _BorderWinpartITclassApply(ewin, i, 1); } } static void -BorderWinpartCalc(const EWin * ewin, int i, int ww, int hh) +_BorderWinpartCalc(const EWin * ewin, int i, int ww, int hh) { int x, y, w, h, ox, oy, max, min; int topleft, bottomright; @@ -255,9 +255,9 @@ BorderWinpartCalc(const EWin * ewin, int i, int ww, int hh) topleft = ewin->border->part[i].geom.topleft.originbox; bottomright = ewin->border->part[i].geom.bottomright.originbox; if (topleft >= 0) - BorderWinpartCalc(ewin, topleft, ww, hh); + _BorderWinpartCalc(ewin, topleft, ww, hh); if (bottomright >= 0) - BorderWinpartCalc(ewin, bottomright, ww, hh); + _BorderWinpartCalc(ewin, bottomright, ww, hh); x = y = 0; if (topleft == -1) @@ -442,14 +442,14 @@ EwinBorderCalcSizes(EWin * ewin, int propagate) ewin->bits[i].w = -2; for (i = 0; i < ewin->border->num_winparts; i++) if (ewin->bits[i].w == -2) -BorderWinpartCalc(ewin, i, ww, hh); +_BorderWinpartCalc(ewin, i, ww, hh); for (i = 0; i < ewin->border->num_winparts; i++) - BorderWinpartRealise(ewin, i); + _BorderWinpartRealise(ewin, i); reshape = 0; for (i = 0; i < ewin->border->num_winparts; i++) { - reshape |= BorderWinpartDraw(ewin, i); + reshape |= _BorderWinpartDraw(ewin, i); } #if 0 /* Debug */ @@ -462,13 +462,13 @@ EwinBorderC
[EGIT] [e16/e16] master 03/05: Use border name wrapper function some more
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=2dad8c5f29ba7e445032730c397c175327cc775a commit 2dad8c5f29ba7e445032730c397c175327cc775a Author: Kim Woelders Date: Thu Jun 6 22:26:28 2013 +0200 Use border name wrapper function some more --- src/hints.c | 4 ++-- src/menus-misc.c | 13 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/hints.c b/src/hints.c index 2370c070..406f3403 100644 --- a/src/hints.c +++ b/src/hints.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2015 Kim Woelders + * Copyright (C) 2003-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -385,7 +385,7 @@ EHintsSetInfo(const EWin * ewin) (unsigned int *)c, ENL_DATA_ITEMS); ex_window_prop_string_set(EwinGetClientXwin(ewin), E16_ATOM_WIN_BORDER, -ewin->normal_border->name); +BorderGetName(ewin->normal_border)); if (EDebug(EDBUG_TYPE_SNAPS)) Eprintf("Snap set einf %#x: %4d+%4d %4dx%4d: %s\n", diff --git a/src/menus-misc.c b/src/menus-misc.c index e6c93c2a..2546aefc 100644 --- a/src/menus-misc.c +++ b/src/menus-misc.c @@ -458,6 +458,7 @@ MenuCreateFromBorders(const char *name, MenuStyle * ms) Border**lst; int i, num; MenuItem *mi; + const char *bname; m = MenuCreate(name, _("Border"), NULL, ms); @@ -467,13 +468,13 @@ MenuCreateFromBorders(const char *name, MenuStyle * ms) for (i = 0; i < num; i++) { + bname = BorderGetName(lst[i]); + if (*bname == '_') + continue; /* if its not internal (ie doesnt start with _ ) */ - if (lst[i]->name[0] != '_') - { -Esnprintf(s, sizeof(s), "wop * bo %s", lst[i]->name); -mi = MenuItemCreate(lst[i]->name, NULL, s, NULL); -MenuAddItem(m, mi); - } + Esnprintf(s, sizeof(s), "wop * bo %s", bname); + mi = MenuItemCreate(bname, NULL, s, NULL); + MenuAddItem(m, mi); } Efree(lst); --
[EGIT] [e16/e16] master 01/05: ipc.c: Trivial cleanups
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=1dc44176d4eda842d55466a3ce251c6976b6910e commit 1dc44176d4eda842d55466a3ce251c6976b6910e Author: Kim Woelders Date: Thu Jun 6 22:26:28 2013 +0200 ipc.c: Trivial cleanups --- src/ipc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ipc.c b/src/ipc.c index 18020382..6f7bedca 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -27,7 +27,7 @@ #include "E.h" #include "aclass.h" -#include "borders.h" /* FIXME - Should not be here */ +#include "borders.h" #include "desktops.h" #include "emodule.h" #include "eobj.h" @@ -35,7 +35,7 @@ #include "ewin-ops.h" #include "focus.h" #include "grabs.h" -#include "hints.h" /* FIXME - Should not be here */ +#include "hints.h" #include "screen.h" #include "session.h" #include "settings.h" @@ -579,8 +579,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm) else if (!strcmp(param1, "??")) { IpcPrintf("client location: %d %d\n", - EoGetX(ewin) + ewin->border->border.left, - EoGetY(ewin) + ewin->border->border.top); + ewin->client.x, ewin->client.y); } else { --
[EGIT] [e16/e16] master 04/05: Simplify checks for borderless
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=5132afd31397c1d4b971668c6f25a73a94b3ebb9 commit 5132afd31397c1d4b971668c6f25a73a94b3ebb9 Author: Kim Woelders Date: Fri Sep 25 06:55:51 2020 +0200 Simplify checks for borderless --- src/borders.c | 19 ++- src/borders.h | 4 +++- src/ewin-ops.c | 24 ++-- src/ewins.c| 7 --- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/borders.c b/src/borders.c index e6b34dfa..c69ff181 100644 --- a/src/borders.c +++ b/src/borders.c @@ -479,6 +479,12 @@ BorderGetName(const Border * b) return (b) ? b->name : NULL; } +int +BorderCanShade(const Border * b) +{ + return !b->no_extent; +} + void EwinBorderSelect(EWin * ewin) { @@ -562,7 +568,7 @@ EwinBorderSetTo(EWin * ewin, const Border * b) _BorderIncRefcount(b); HintsSetWindowBorder(ewin); - ewin->state.no_border = b->num_winparts <= 0; + ewin->state.no_border = b->no_extent; EventCallbackRegister(EoGetWin(ewin), _BorderFrameHandleEvents, ewin); @@ -682,6 +688,16 @@ _BorderCreate(const char *name) return b; } +static int +_BorderCheck(Border * b) +{ + b->no_extent = b->num_winparts <= 0 || + (b->border.left == 0 && b->border.right == 0 && + b->border.top == 0 && b->border.bottom == 0); + + return 0; +} + static void _BorderDestroy(Border * b) { @@ -1233,6 +1249,7 @@ BorderConfigLoad(FILE * fs) switch (i1) { case CONFIG_CLOSE: +_BorderCheck(b); goto done; case CONFIG_CLASSNAME: case BORDER_NAME: diff --git a/src/borders.h b/src/borders.h index 22f0aec5..f7a9eeab 100644 --- a/src/borders.h +++ b/src/borders.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2013 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -64,6 +64,7 @@ struct _border { EImageBorderborder; int num_winparts; WinPart*part; + charno_extent; charchanges_shape; charshadedir; charthrowaway; @@ -86,6 +87,7 @@ struct _ewinbit { /* borders.c */ Border *BorderFind(const char *name); const char *BorderGetName(const Border * b); +int BorderCanShade(const Border * b); int BorderConfigLoad(FILE * fs); voidEwinBorderSelect(EWin * ewin); voidEwinBorderDetach(EWin * ewin); diff --git a/src/ewin-ops.c b/src/ewin-ops.c index 45c57bc3..689d9e7d 100644 --- a/src/ewin-ops.c +++ b/src/ewin-ops.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2019 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -752,10 +752,7 @@ EwinInstantShade(EWin * ewin, int force) int x, y, w, h; int minw, minh; - if ((ewin->border->border.left == 0) && (ewin->border->border.right == 0) - && (ewin->border->border.top == 0) && (ewin->border->border.bottom == 0)) - return; - if (ewin->state.zoomed) + if (ewin->state.inhibit_shade) return; if (ewin->state.shaded && !force) return; @@ -958,14 +955,9 @@ EwinShade(EWin * ewin) _ewin_shade_dataesd; int duration; - if ((ewin->border->border.left == 0) && (ewin->border->border.right == 0) && - (ewin->border->border.top == 0) && (ewin->border->border.bottom == 0)) - return; - if (ewin->state.zoomed) + if (ewin->state.inhibit_shade) return; - if (ewin->state.shaded || ewin->state.shading || ewin->state.iconified) - return; - if ((ewin->border) && (!strcmp(ewin->border->name, "BORDERLESS"))) + if (ewin->state.shaded || ewin->state.shading) return; esd.ewin = ewin; @@ -1592,12 +1584,8 @@ EwinOpSetBorder(EWin * ewin, int source __UNUSED__, const char *name) break; } } - if (has_shaded) - { - if ((b->border.left == 0) && (b->border.right == 0) - && (b->border.top == 0) && (b->border.bottom == 0)) - return; - } + if (has_shaded && !BorderCanShade(b)) + return; for (i = 0; i < num; i++) { d
[EGIT] [e16/e16] master 03/03: Remove some (duplicated?) configuration identifiers that are not in definitions
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9d235a1ecdf36774a81be6f7986bac2a10fb15c0 commit 9d235a1ecdf36774a81be6f7986bac2a10fb15c0 Author: Kim Woelders Date: Fri Sep 25 10:14:28 2020 +0200 Remove some (duplicated?) configuration identifiers that are not in definitions --- src/aclass.c | 7 --- src/backgrounds.c | 1 - src/borders.c | 4 src/conf.h| 15 --- src/iclass.c | 3 +-- src/tooltips.c| 3 +-- 6 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/aclass.c b/src/aclass.c index 4b025dc1..02cf307f 100644 --- a/src/aclass.c +++ b/src/aclass.c @@ -321,7 +321,6 @@ AclassConfigLoad(FILE * fs) goto done; case CONFIG_CLASSNAME: - case ACLASS_NAME: ac = ActionclassFindAny(s2); if (ac) { @@ -335,7 +334,6 @@ AclassConfigLoad(FILE * fs) } break; case CONFIG_TYPE: - case ACLASS_TYPE: if (!ac || i2 == ACLASS_TYPE_ACLASS) break; LIST_REMOVE(ActionClass, _list, ActionclassFind(ac->name)); @@ -344,7 +342,6 @@ AclassConfigLoad(FILE * fs) break; case CONFIG_MODIFIER: - case ACLASS_MODIFIER: /* These are the defines that I have listed... * These, therefore, are the ones that I am * going to accept by default. @@ -431,19 +428,15 @@ AclassConfigLoad(FILE * fs) } break; case CONFIG_ANYMOD: - case ACLASS_ANYMOD: anymod = i2; break; case CONFIG_ANYBUT: - case ACLASS_ANYBUT: anybut = i2; break; case CONFIG_BUTTON: - case ACLASS_BUT: but = i2; break; case CONFIG_ANYKEY: - case ACLASS_ANYKEY: anykey = i2; break; case ACLASS_KEY: diff --git a/src/backgrounds.c b/src/backgrounds.c index f2406a19..61a24a82 100644 --- a/src/backgrounds.c +++ b/src/backgrounds.c @@ -1095,7 +1095,6 @@ BackgroundsConfigLoad(FILE * fs) break; case CONFIG_CLASSNAME: - case BG_NAME: bg = BackgroundFind(s2); if (!bg) { diff --git a/src/borders.c b/src/borders.c index f33f0a9c..886d733b 100644 --- a/src/borders.c +++ b/src/borders.c @@ -1226,17 +1226,14 @@ _BorderPartLoad(FILE * fs, char type __UNUSED__, Border * b) borigin, bxp, bxa, byp, bya, keepshade); goto done; case CONFIG_IMAGECLASS: - case BORDERPART_ICLASS: STRCPY(iclass, s2); piclass = iclass; break; case CONFIG_ACTIONCLASS: - case BORDERPART_ACLASS: STRCPY(aclass, s2); paclass = aclass; break; case CONFIG_TEXT: - case BORDERPART_TEXTCLASS: STRCPY(tclass, s2); ptclass = tclass; break; @@ -1331,7 +1328,6 @@ BorderConfigLoad(FILE * fs) _BorderCheck(b); goto done; case CONFIG_CLASSNAME: - case BORDER_NAME: if (BorderFind(s2)) { SkipTillEnd(fs); diff --git a/src/conf.h b/src/conf.h index 98495297..282fa546 100644 --- a/src/conf.h +++ b/src/conf.h @@ -52,7 +52,6 @@ #define TEXT_FG_COL 205 #define TEXT_BG_COL 206 -#define ICLASS_NAME 350 #define ICLASS_NORMAL 351 #define ICLASS_CLICKED 352 #define ICLASS_HILITED 353 @@ -77,22 +76,11 @@ #define ICLASS_ROTATE 373 #define ICLASS_BEVEL 374 -#define ACLASS_NAME 420 -#define ACLASS_TYPE 421 -#define ACLASS_MODIFIER 422 -#define ACLASS_ANYMOD 423 -#define ACLASS_ANYBUT 424 -#define ACLASS_BUT 425 -#define ACLASS_ANYKEY 426 #define ACLASS_KEY 427 #define ACLASS_EVENT_TRIGGER 428 -#define ACLASS_ACTION 429 #define ACLASS_TYPE_ACLASS 5 -#define BORDERPART_ICLASS 450 -#define BORDERPART_ACLASS 451 -#define BORDERPART_TEXTCLASS 452 #define BORDERPART_ONTOP 453 #define BORDERPART_FLAGS 454 #define BORDERPART_ISREGION 455 @@ -126,7 +114,6 @@ #define WINDOWMATCH_DESKTOP 491 #define WINDOWMATCH_MAKESTICKY 492 -#define BORDER_NAME 500 #define BORDER_LEFT 501 #define BORDER_RIGHT 502 #define BORDER_TOP 503 @@ -156,7 +143,6 @@ #define BG_RGB 560 #define BG_BG1 561 #define BG_BG2 562 -#define BG_NAME 563 #define BG_DESKNUM 564 #define BG_BG_FILE 565 #define BG_BG_PARAM 566 @@ -169,7 +155,6 @@ #define SLIDEOUT_DIRECTION 620 -#define TOOLTIP_DRAWICLASS 640 #define TOOLTIP_BUBBLE1 641 #define TOOLTIP_BUBBLE2 642 #define TOOLTIP_BUBBLE3 643 diff --git a/src/iclass.c b/src/iclass.c index 5f42649a..822c7c89 100644 --- a/src/iclass.c +++ b/src/iclass.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woeld
[EGIT] [e16/e16] master 01/03: conf.h: Remove some long obsolete configuration item defines
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=e04dc8ff91149c9b101cb90eb4fed7cb812e3652 commit e04dc8ff91149c9b101cb90eb4fed7cb812e3652 Author: Kim Woelders Date: Sat Sep 26 16:57:35 2020 +0200 conf.h: Remove some long obsolete configuration item defines --- src/conf.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/conf.h b/src/conf.h index 13f7fc98..98495297 100644 --- a/src/conf.h +++ b/src/conf.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2011 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -77,15 +77,6 @@ #define ICLASS_ROTATE 373 #define ICLASS_BEVEL 374 -#define DESKTOP_DRAGDIR 400 -#define DESKTOP_DRAGBAR_WIDTH 401 -#define DESKTOP_DRAGBAR_ORDERING 402 -#define DESKTOP_DRAGBAR_LENGTH 403 -#define DESKTOP_SLIDEIN 404 -#define DESKTOP_SLIDESPEED 405 -#define DESKTOP_HIQUALITYBG 406 -#define DESKTOP_AREA_SIZE 407 - #define ACLASS_NAME 420 #define ACLASS_TYPE 421 #define ACLASS_MODIFIER 422 --
[EGIT] [e16/e16] master 02/03: definitions: Remove long obsolete configuration item definitions
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=ee0910ad3878667e3ffee02b0c3ded7e205763b3 commit ee0910ad3878667e3ffee02b0c3ded7e205763b3 Author: Kim Woelders Date: Sat Sep 26 16:58:54 2020 +0200 definitions: Remove long obsolete configuration item definitions --- config/definitions | 66 -- 1 file changed, 66 deletions(-) diff --git a/config/definitions b/config/definitions index 19feedc9..f403449c 100644 --- a/config/definitions +++ b/config/definitions @@ -101,72 +101,6 @@ #define __EFFECT_SHADOW 1 #define __EFFECT_OUTLINE 2 -#define __FOCUS_MODE 307 -#define __MOVE_MODE 311 -#define __RESIZE_MODE 312 -#define __GEOMINFO_MODE 1371 -#define __SLIDE_MODE 313 -#define __SLIDE_ON_CLEANUP 314 -#define __SLIDE_ON_MAP 315 -#define __SPEED_OF_MAPPING_SLIDING 316 -#define __SPEED_OF_CLEANUP_SLIDING 317 -#define __TIMEOUT_FOR_DESKTOP_BACKGROUNDS 320 -#define __RESISTANCE_TO_MOVE_A_BUTTON 321 -#define __AUTOMATICALLY_SAVE_CONFIG 324 -#define __DOCK_DIRECTION 325 -#define __SHADING_SPEED 326 -#define __TOOLTIPS 327 -#define __TOOLTIP_TIMEOUT 328 -#define __START_POSITION_OF_DOCK 330 -#define __USE_SAVEUNDERS 331 -#define __MENUS_SLIDE_OUT 332 -#define __NUMBER_OF_DESKTOPS 333 -#define __BE_PARANOID_ABOUT_SAVING_MEMORY 334 -#define __TRANSIENTS_FOLLOW_GROUP_LEADER 335 -#define __SWITCH_TO_DESKTOP_WHERE_TRANSIENT_MAPS 336 -#define __SHOW_ICONIFIED_ICONS 337 -#define __AUTORAISE 338 -#define __AUTORAISE_TIMEOUT 339 -#define __ALL_NEW_WINDOWS_GET_FOCUS 340 -#define __NEW_TRANSIENTS_GET_FOCUS 341 -#define __NEW_TRANSIENTS_GET_FOCUS_IF_GROUP_IS_FOCUSED 342 -#define __MANUAL_WINDOW_PLACEMENT 343 -#define __WARP_POINTER_ON_NEXT_FOCUS 345 -#define __EDGE_FLIP_RESISTANCE 346 -#define __SHOW_PAGERS 347 -#define __PAGER_DISPLAY_HIQ 348 -#define __PAGER_DISPLAY_SNAPSHOTS 349 -#define __ANIMATE_WINDOW_SHADING 350 -#define __MENUS_ONSCREEN 351 -#define __PREFER_USER_BACKGROUNDS 1350 -#define __ZOOM_PAGER_WINDOWS 1351 -#define __SHOW_PAGER_WINDOW_TITLE 1352 -#define __RAISE_WINDOW_ON_NEXT_FOCUS 1353 -#define __DISPLAY_WARP 1354 -#define __WARP_POINTER_AFTER_FOCUS 1355 -#define __PAGER_SCANSPEED 1356 -#define __GROUP_BORDER 1358 -#define __GROUP_KILL 1359 -#define __GROUP_MOVE 1360 -#define __GROUP_RAISE 1361 -#define __GROUP_ICONIFY 1362 -#define __GROUP_STICK 1363 -#define __GROUP_SHADE 1364 -#define __GROUP_MIRROR 1365 -#define __KDE_SUPPORT 1366 -#define __CLICKS_ALWAYS_RAISE_WINDOWS 1367 -#define __ROOT_WINDOW_TOOLTIP 1368 -#define __PAGER_BUTTONS 1369 - -#define __DIRECTION_OF_DESKTOP_DRAG 400 -#define __WIDTH_OF_DRAGBAR 401 -#define __ORDER_OF_BUTTONS_ON_DRAGBAR 402 -#define __LENGTH_OF_DRAGBAR 403 -#define __DESKTOPS_SLIDE_IN 404 -#define __SPEED_OF_DESKTOP_SLIDE 405 -#define __HIGH_QUALITY_BACKGROUNDS 406 -#define __DESKTOP_AREA_SIZE 407 - #define __NORMAL 5 #define __CLICKED 352 #define __HILITED 353 --
[EGIT] [e16/e16] master 01/02: French translation update (Philippe J. Guillaumie)
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=26f4132c191e669af033b07efed2d759c2a33661 commit 26f4132c191e669af033b07efed2d759c2a33661 Author: Kim Woelders Date: Wed May 27 16:38:44 2020 +0200 French translation update (Philippe J. Guillaumie) --- po/fr.po | 678 --- 1 file changed, 345 insertions(+), 333 deletions(-) diff --git a/po/fr.po b/po/fr.po index aaeeda2c..25378d84 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,22 +1,25 @@ -# This is the French locale definition for e16. +# French translation for e16. # Copyright (C) 1999-2000, 2004, 2005 Free Software Foundation, Inc. # Sylvain GIL , 1999-2000. # Ludwig Noujarret , 2004, 2005. -# Tristan D. , 2007-2012 +# Tristan D. , 2007-2012. +# similar , 2020. +# msgid "" msgstr "" -"Project-Id-Version: e16 svn-rev69488\n" +"Project-Id-Version: e16\n" "Report-Msgid-Bugs-To: enlightenment-i...@lists.sourceforge.net\n" -"POT-Creation-Date: 2019-10-23 19:06+0200\n" -"PO-Revision-Date: 2013-04-25 05:08+\n" -"Last-Translator: Eliovir \n" +"POT-Creation-Date: 2020-05-22 14:39+0200\n" +"PO-Revision-Date: 2020-05-23 15:00+0200\n" +"Last-Translator: Philippe Jean Guillaumie \n" "Language-Team: French\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Launchpad-Export-Date: 2014-05-25 05:43+\n" -"X-Generator: Launchpad (build 17017)\n" +"X-Generator: Poedit 2.3\n" #: src/about.c:35 #, c-format @@ -60,7 +63,7 @@ msgid "" "This program could not be executed.\n" "This is because the file does not exist.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" "Le fichier n'existe pas.\n" @@ -76,7 +79,7 @@ msgid "" "page for that shell and read up how to change or add to your\n" "execution path.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" "Le programme n'est probablement pas dans le chemin d'exécution\n" @@ -94,11 +97,11 @@ msgid "" "is a file, and you are allowed to execute it. I suggest you look\n" "into this.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" "Je ne suis pas sûr de la raison. Le fichier existe, est bien de type\n" -"\"fichier\", et vous en avez les droits d'exécution. Je vous suggère\n" +"fichier, et vous en avez les droits d'exécution. Je vous suggère\n" "d'examiner ce problème.\n" #: src/actions.c:164 @@ -110,10 +113,10 @@ msgid "" "This is because the file exists, is a file, but you are unable\n" "to execute it because you do not have execute access to this file.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" -"Le fichier existe, est bien de type \"fichier\", mais vous ne pouvez pas\n" +"Le fichier existe, est bien de type fichier, mais vous ne pouvez pas\n" "l'exécuter car vous n'avez pas les droits suffisants.\n" #: src/actions.c:177 @@ -124,7 +127,7 @@ msgid "" "This program could not be executed.\n" "This is because the file is in fact a directory.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" "Le fichier est en fait un répertoire.\n" @@ -137,10 +140,10 @@ msgid "" "This program could not be executed.\n" "This is because the file is not a regular file.\n" msgstr "" -"Il y a eu une erreur durant l'exécution du programme:\n" +"Il y a eu une erreur durant l'exécution du programme :\n" "%s\n" "Ce programme ne peut être exécuté.\n" -"Le fichier n'est pas un fichier correct.\n" +"Le fichier n'est pas un fichier régulier.\n&
[EGIT] [legacy/imlib2_loaders] master 01/01: 1.7.0
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=d41e3f79a02d452ea200840db6b6b8b53bd67e60 commit d41e3f79a02d452ea200840db6b6b8b53bd67e60 Author: Kim Woelders Date: Sat Aug 1 06:46:36 2020 +0200 1.7.0 --- ChangeLog| 16 configure.ac | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 47281c7..6cbf376 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,20 @@ +*** +*** Version 1.7.0 *** +*** + +Kim Woelders (9): + Update headers + Update loaders (follow changes in imlib2) + autogen.sh: Add -n as alternative to NOCONFIGURE + XCF loader: Use correct enum (gcc10) + configure.ac: Drop initial config.cache removal + Update headers + Use SWAP.. macros from common.h + Move loaders to load2() + 1.7.0 + + *** *** Version 1.6.1 *** *** diff --git a/configure.ac b/configure.ac index a8bdea0..ac2daca 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([imlib2_loaders],[1.6.1],[enlightenment-de...@lists.sourceforge.net]) +AC_INIT([imlib2_loaders],[1.7.0],[enlightenment-de...@lists.sourceforge.net]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_BUILD --
[EGIT] [legacy/imlib2] master 01/01: 1.7.0
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=7066b54364c77ec83fbecc2b5f42018771ed5ea1 commit 7066b54364c77ec83fbecc2b5f42018771ed5ea1 Author: Kim Woelders Date: Sat Aug 1 06:43:31 2020 +0200 1.7.0 --- ChangeLog| 65 configure.ac | 8 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1048e1c..aee26f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,69 @@ +*** +*** Version 1.7.0 *** +*** + +Alexander Volkov (3): + GIF loader: Don't close file descriptor twice + Introduce imlib_load_image_from_fd() + Don't rescan loaders + +Kim Woelders (49): + XPM loader: Major speedup for cpp > 2 + imlib2_load: Properly check non-full loads (load data too) + imlib2_load: Use getopt() + imlib2_load: Add repeated load option + Simplify __imlib_FileExtension() + Refactor many __imlib_File...() functions to use common __imlib_FileStat() + Drop the __imlib_IsRealFile() file check in __imlib_File...() functions + image.c: Add some space for readability + image.c: Remove some unnecessary clearing of calloc'ed structs + image.c: Rework some obscure file name stuff in __imlib_SaveImage() + image.c: Don't strdup() real_name when not necessary in __imlib_LoadImage() + image.c: Use real_file to get file time + image.c: Introduce __imlib_ErrorFromErrno() + image.c: Use loader return value, not im->w to determine load success + Loader cleanups + Saver cleanups + image.c/h: Cleanups + image.c: Move image tag functions to separate file + image.c: Move loader functions to separate file + image.c: Enable non-dirty pixmap cache cleaning + image.c: Minor refactoring of pixmap cache cleaners + image.c: Move data_memory_func assignment to better place + imlib2_view: Various tweaks + Fix loader cleanup breakage (gif) + image.c: Remove redundant pixmap unref + image.c: Add infrastructure to simplify progress handling + Loaders: Simplify/fix progress handling + Savers: Simplify progress handling + Introduce __imlib_LoadEmbedded() + Introduce __imlib_LoaderSetFormats() + Make ImlibLoader struct opaque + autogen.sh: Add -n as alternative to NOCONFIGURE + Fix enum conversion warnings (gcc10) + JPG, PNG loaders: Avoid clobber warnings + Add a couple of consts + TIFF loader: Minor speedup + ID3 loader: Some mostly cosmetic rearrangements + GZ, BZ2 loaders: Accept more file names + __imlib_FileExtension: Use basename if there are no dots + Revert "JPG, PNG loaders: Avoid clobber warnings" + JPG, PNG loaders: Avoid clobber warnings - Take N+1 + Add infrastructure for new loader entry - load2() + Move loaders to load2() + Reduce number of stat() calls during load + configure.ac: Drop initial config.cache removal + imlib2_load: Optionally use imlib_load_image_fd() + Fix build without X11 + Remove a couple of unused includes + 1.7.0 + +Tobias Stoeckmann (2): + ICO loader: Do not crash on invalid files + ICO loader: Handle malloc failures + + *** *** Version 1.6.1 *** *** diff --git a/configure.ac b/configure.ac index 89a0898..12a5321 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([imlib2], [1.6.1], [enlightenment-de...@lists.sourceforge.net]) +AC_INIT([imlib2], [1.7.0], [enlightenment-de...@lists.sourceforge.net]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_BUILD @@ -19,9 +19,9 @@ define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl LT_INIT -VERSION_CUR=7 -VERSION_REV=1 -VERSION_AGE=6 +VERSION_CUR=8 +VERSION_REV=0 +VERSION_AGE=7 lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE} AC_SUBST(lt_version) --
[EGIT] [e16/e16] master 02/02: Merge variables controlling click-to-raise configuration
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=02f0afd97b0111f4bf605df88cd5cee77061b3a3 commit 02f0afd97b0111f4bf605df88cd5cee77061b3a3 Author: Kim Woelders Date: Sat Jun 27 19:35:23 2020 +0200 Merge variables controlling click-to-raise configuration --- docs/e16.xml | 4 +--- src/E.h | 3 +-- src/focus.c | 27 --- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/e16.xml b/docs/e16.xml index 442bc91e..dc90a411 100644 --- a/docs/e16.xml +++ b/docs/e16.xml @@ -1067,10 +1067,8 @@ effects.waves.enabled = 0 # [int] Focus mode (0: pointer, 1: sloppy, 2: click) focus.mode = 1 -# [bool] Raise window when clicked +# [int] Click-to-raise mode (0: Off, 1: Any button, 2: Only button 1) focus.clickraises = 1 -# [bool] Only primary mouse button can raise window -focus.only_button1_can_raise = 0 # [bool] Transients are placed where leader is focus.transientsfollowleader = 1 # [bool] When a transient is mapped the desk/area is switched to where the transient appears diff --git a/src/E.h b/src/E.h index bb3c9650..032f5df9 100644 --- a/src/E.h +++ b/src/E.h @@ -185,8 +185,7 @@ typedef struct { } dock; struct { int mode; - charclickraises; - charonly_button1_can_raise; + int clickraises; chartransientsfollowleader; charswitchfortransientmap; charall_new_windows_get_focus; diff --git a/src/focus.c b/src/focus.c index 03e36d25..658dc63f 100644 --- a/src/focus.c +++ b/src/focus.c @@ -227,7 +227,7 @@ ClickGrabsSet(EWin * ewin) int set = 0; unsigned intraise_button = AnyButton; - if (Conf.focus.only_button1_can_raise) + if (Conf.focus.clickraises == 2) raise_button = Button1; if ((Conf.focus.clickraises && !EwinListStackIsRaised(ewin)) || @@ -747,8 +747,7 @@ FocusHandleClick(EWin * ewin, Win win) typedef struct { struct { int mode; - charclickalways; - charbutton1_raises; + int clickalways; charnew_focus; charnew_focus_if_group; charpopup_focus; @@ -784,7 +783,6 @@ _DlgApplyFocus(Dialog * d, int val __UNUSED__, void *data __UNUSED__) Conf.focus.mode = dd->focus.mode; Conf.focus.clickraises = dd->focus.clickalways; - Conf.focus.only_button1_can_raise = dd->focus.button1_raises; Conf.focus.all_new_windows_get_focus = dd->focus.new_focus; Conf.focus.new_windows_get_focus_if_group_focused = dd->focus.new_focus_if_group; @@ -822,7 +820,6 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) dd->focus.mode = Conf.focus.mode; dd->focus.clickalways = Conf.focus.clickraises; - dd->focus.button1_raises = Conf.focus.only_button1_can_raise; dd->focus.new_focus = Conf.focus.all_new_windows_get_focus; dd->focus.new_focus_if_group = Conf.focus.new_windows_get_focus_if_group_focused; @@ -871,15 +868,24 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) di = DialogAddItem(table, DITEM_SEPARATOR); DialogItemSetColSpan(di, 2); - di = DialogAddItem(table, DITEM_CHECKBUTTON); + radio = di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetColSpan(di, 2); + DialogItemSetText(di, _("Clicking in a window does not raise it")); + DialogItemRadioButtonSetFirst(di, radio); + DialogItemRadioButtonGroupSetVal(di, 0); + + di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Clicking in a window always raises it")); - DialogItemCheckButtonSetPtr(di, >focus.clickalways); + DialogItemRadioButtonSetFirst(di, radio); + DialogItemRadioButtonGroupSetVal(di, 1); - di = DialogAddItem(table, DITEM_CHECKBUTTON); + di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Only primary mouse button can raise window")); - DialogItemCheckButtonSetPtr(di, >focus.button1_raises); + DialogItemRadioButtonSetFirst(di, radio); + DialogItemRadioButtonGroupSetVal(di, 2); + DialogItemRadioButtonGroupSetValPtr(radio, >focus.clickalways); di = DialogAddItem(table, DITEM_SEPARATOR); DialogItemSetColSpan(di, 2); @@ -1187,8 +1193,7 @@ static const IpcItem FocusIpcArray[] = { static const CfgItem FocusCfgItems[] = { CFG_ITEM_INT(Conf.focus, mode, MODE_FOCUS_SLOPPY), - CFG_ITEM_BOOL(Conf.focus, clickraises, 1), - CFG_ITEM_BOOL(Conf.focus, only_button1_can_raise, 0), + CFG_ITEM_INT(Conf.focus, clickraises, 1), CFG_ITEM_BOOL(Conf.focus, transientsfollowleader, 1), CFG_ITEM_BOOL(Conf.focus, switchfortransientmap, 1), CFG_ITEM_BOOL(Conf.focus, all_new_windows_get_focus, 0), --
[EGIT] [e16/e16] master 01/02: focus.c: Eliminate unnecessary variable
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=79711672abe91df1fd16f8ad01571a9f5f845be0 commit 79711672abe91df1fd16f8ad01571a9f5f845be0 Author: Kim Woelders Date: Sat Jun 27 19:47:25 2020 +0200 focus.c: Eliminate unnecessary variable --- src/focus.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/focus.c b/src/focus.c index 79c9c38a..03e36d25 100644 --- a/src/focus.c +++ b/src/focus.c @@ -818,7 +818,7 @@ static void _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) { FocusDlgData *dd = DLG_DATA_GET(d, FocusDlgData); - DItem *di, *radio, *radio2; + DItem *di, *radio; dd->focus.mode = Conf.focus.mode; dd->focus.clickalways = Conf.focus.clickraises; @@ -1001,24 +1001,24 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) _ ("Focuslist image display policy (if one operation fails, try the next):")); - radio2 = di = DialogAddItem(table, DITEM_RADIOBUTTON); + radio = di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("First E Icon, then App Icon")); - DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonSetFirst(di, radio); DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_IMG_APP); di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("First App Icon, then E Icon")); - DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonSetFirst(di, radio); DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_APP_IMG); di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("None")); - DialogItemRadioButtonSetFirst(di, radio2); + DialogItemRadioButtonSetFirst(di, radio); DialogItemRadioButtonGroupSetVal(di, EWIN_ICON_MODE_NONE); - DialogItemRadioButtonGroupSetValPtr(radio2, >focuslist.icon_mode); + DialogItemRadioButtonGroupSetValPtr(radio, >focuslist.icon_mode); } const DialogDef DlgFocus = { --
[EGIT] [e16/e16] master 01/01: configure.ac: Avoid trouble with missing AM_LANGINFO_CODESET
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=60a3937341fb8661e4dcbd8a2420254f7d5c7562 commit 60a3937341fb8661e4dcbd8a2420254f7d5c7562 Author: Kim Woelders Date: Fri Jun 19 19:41:00 2020 +0200 configure.ac: Avoid trouble with missing AM_LANGINFO_CODESET Use gettext 0.19. gettext 0.20 apparently doesn't have AM_LANGINFO_CODESET - sort that out some other day. --- configure.ac | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 1da8a26c..5942e6a8 100644 --- a/configure.ac +++ b/configure.ac @@ -58,10 +58,10 @@ AM_ICONV AM_LANGINFO_CODESET AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18]) -m4_ifdef([AM_GNU_GETTEXT_REQUIRE_VERSION], [ -AM_GNU_GETTEXT_REQUIRE_VERSION([0.18]) -]) +AM_GNU_GETTEXT_VERSION([0.19]) +#m4_ifdef([AM_GNU_GETTEXT_REQUIRE_VERSION], [ +#AM_GNU_GETTEXT_REQUIRE_VERSION([0.19]) +#]) AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], --
[EGIT] [e16/e16] master 01/01: 1.0.22.
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=9b108a59ad14ceb383f94698e8d6808d0249 commit 9b108a59ad14ceb383f94698e8d6808d0249 Author: Kim Woelders Date: Fri Jun 19 19:02:35 2020 +0200 1.0.22. --- ChangeLog| 78 configure.ac | 4 ++-- 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f114c8ac..7def30d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6049,3 +6049,81 @@ Explicitly include sys/select.h where needed Fix using sound in modular build Add sndio sound back end (Ingo Feinerer/Jonathan Armani) e_gen_menu: menu generation speedups (Thanatermesis) + +--- + +Sat 20 Jun 2020 06:21:54 AM CEST + +--- 1.0.22 --- +Use installed gettext version, if possible +e_gen_menu: Drop ConsoleOnly apps +windowmatches: Fix use of MAKE_WINDOW_STICKY_...() macros +windowmatches: Remove ancient incorrect case values +definitions: Empty obsolete windowmatch macros +windowmatches: Resurrect USE_ICON_IMAGE_FOR_CLIENT_() macros +windowmatches: Issue notice when discarding invalid one +windowmatches: Remove some cruft +windowmatches: Enable having spaces in name matches +Consistently use @ as token delimiter in .in files +Fix warnings occurring in various situations +windowmatches: Add some consts +bindings: Add 'W' as alias for modifier 4 +libhack: Intercept XSendEvent too +Fix unmaximizing by _NET_WM_STATE[_MAXIMIZED_...] +Indent profile - Drop -bad for now as it does silly things +Re-indent with indent-2.2.12 +slideouts: Use defines for directions +slideouts: Refactoring +slideouts: Fix potential crash +aclass.c: Fix valgrind complaint +eesh: Fix clang-analyzer complaints +edox: Fix clang-analyzer complaints +src: Fix clang-analyzer complaints +autogen.sh: Add -n as alternative to NOCONFIGURE +Fix incorrect check for __attribute__ ((unused))) +Hide Group struct internals +groups.c: Correct debug stuff +configure.ac: Drop unnecessary prefix stuff +Spec file: Add git tag to rpm file name (if built from git checkout) +edox: Add a couple of forgotten casts +edox: Fix missing return value (at previously unreachable function exit) +Espawn(): Use variable argument list +Enable sounds in combined configuration dialog +Autofoo sound configuration cosmetics +Optionally play sounds using audio player +Introduce path_canexec0() for convenience +Minor cleanups after sound by audio player feature +GSOD: Avoid rendering artifacts when unmapped +Avoid potential crash when attempting to enable sound, cosmetics +Minor cleanups in sound players +Add alsa-lib sound backend +Autofoo cosmetics (AC_HELP_STRING -> AS_HELP_STRING). +Fix obscure m4 problem +Add feature to build with ASAN (--enable-gcc-asan) +groups: Eliminate EwinGetGroups() +groups.c: Eliminate BuildWindowGroup() +groups.c: Mostly cosmetic changes around group configuration +groups.c: Reshuffle code to avoid forward declarations +groups.c: Rename functions for more consistency +groups.c: Refactor _GroupEwinRemove() +groups.c: Fold "group_info" into "group" IPC command +groups.c: Enable popping up ewin group configuration dialogs from ipc +groups.c: _GroupEwinDestroy() -> _GroupDelete() +groups.c: Mostly cosmetic tweaks +groups.c: Fix handling groups with negative id +groups.c: Fix showing empty group +groups.c: Add group del command +groups.c: Fix group deletion +groups.c: Add some debug +groups.c: Fix snapshot updating +snaps: Fix snapshot group remembering when all groups are deleted +groups: Rework group configuration saving +groups.c: Simplify _GroupDelete() some more +groups.c: Eliminate _EwinInGroup() +groups.c: Add group list ipc comand +groups.c: Fold "groups" into "group_op" IPC command +Fix technical/shapewin move mode through edge flip +Fix technical/shapewin move mode with window groups +French translation update (Philippe J. Guillaumie) +Document the "absolute" parameter for the toggle_* window operations (Pierre Neyron) +configure.ac: Avoid trouble with missing AM_LANGINFO_CODESET diff --git a/configure.ac b/configure.ac index 5942e6a8..a47264a3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -m4_define([pkg_version], [1.0.21]) -m4_define([pkg_revision], [000]) +m4_define([pkg_version], [1.0.22]) +#m4_define([pkg_revision], [000]) m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version])) AC_INIT([e16],[pkg_version],[enlightenment-de...@lists.sourceforge.net]) --
[EGIT] [website/www-content] master 01/01: e16 1.0.22
kwo pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=02132aa23375953ad503a145201f517bbd67ed7d commit 02132aa23375953ad503a145201f517bbd67ed7d Author: Kim Woelders Date: Sat Jun 20 08:57:49 2020 +0200 e16 1.0.22 --- pages/download-e16.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/download-e16.txt b/pages/download-e16.txt index 39f7e18ff..2631957aa 100644 --- a/pages/download-e16.txt +++ b/pages/download-e16.txt @@ -1,13 +1,13 @@ === Download Enlightenment E16 === -The latest version of DR16 is 1.0.21, released on October 24th, 2019. +The latest version of DR16 is 1.0.22, released on June 20th, 2020. Packages for the current, and previous, releases of DR16, core themes, epplets, e16menuedit, e16keyedit, and imlib2 can be found on the [[https://sourceforge.net/project/showfiles.php?group_id=2|SourceForge download page]]. ^Package^Link^ -|Source Code TAR.GZ|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.21.tar.gz|e16-1.0.21.tar.gz]]| -|Source Package RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.21-1.fc30.src.rpm|e16-1.0.21-1.fc30.src.rpm]]| -|Linux ix86 Binary RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.21-1.fc30.i686.rpm|e16-1.0.21-1.fc30.i686.rpm]]| -|Linux x86_64 Binary RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.21-1.fc30.x86_64.rpm|e16-1.0.21-1.fc30.x86_64.rpm]]| +|Source Code TAR.GZ|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.22.tar.gz|e16-1.0.22.tar.gz]]| +|Source Package RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.22-1.fc32.src.rpm|e16-1.0.22-1.fc32.src.rpm]]| +|Linux ix86 Binary RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.22-1.fc32.i686.rpm|e16-1.0.22-1.fc32.i686.rpm]]| +|Linux x86_64 Binary RPM|[[https://prdownloads.sourceforge.net/enlightenment/e16-1.0.22-1.fc32.x86_64.rpm|e16-1.0.22-1.fc32.x86_64.rpm]]| --
[EGIT] [e16/e16] master 02/03: Add option to allow only the primary mouse button to raise windows
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=0a6b8e177c140dd9c7413e78c4936ce28e1b051c commit 0a6b8e177c140dd9c7413e78c4936ce28e1b051c Author: Kim Woelders Date: Tue Jun 23 20:01:41 2020 +0200 Add option to allow only the primary mouse button to raise windows Patch by Simon Kesenci --- docs/e16.xml | 2 ++ src/E.h | 1 + src/focus.c | 17 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/e16.xml b/docs/e16.xml index 01647de2..442bc91e 100644 --- a/docs/e16.xml +++ b/docs/e16.xml @@ -1069,6 +1069,8 @@ effects.waves.enabled = 0 focus.mode = 1 # [bool] Raise window when clicked focus.clickraises = 1 +# [bool] Only primary mouse button can raise window +focus.only_button1_can_raise = 0 # [bool] Transients are placed where leader is focus.transientsfollowleader = 1 # [bool] When a transient is mapped the desk/area is switched to where the transient appears diff --git a/src/E.h b/src/E.h index 99bedd65..bb3c9650 100644 --- a/src/E.h +++ b/src/E.h @@ -186,6 +186,7 @@ typedef struct { struct { int mode; charclickraises; + charonly_button1_can_raise; chartransientsfollowleader; charswitchfortransientmap; charall_new_windows_get_focus; diff --git a/src/focus.c b/src/focus.c index 81116056..d974d125 100644 --- a/src/focus.c +++ b/src/focus.c @@ -225,6 +225,10 @@ static void ClickGrabsSet(EWin * ewin) { int set = 0; + unsigned intraise_button = AnyButton; + + if (Conf.focus.only_button1_can_raise) + raise_button = Button1; if ((Conf.focus.clickraises && !EwinListStackIsRaised(ewin)) || (!ewin->state.active && !ewin->state.inhibit_focus)) @@ -234,7 +238,7 @@ ClickGrabsSet(EWin * ewin) { if (!ewin->state.click_grab_isset) { -GrabButtonSet(AnyButton, AnyModifier, EwinGetClientConWin(ewin), +GrabButtonSet(raise_button, AnyModifier, EwinGetClientConWin(ewin), ButtonPressMask, ECSR_PGRAB, 1); if (EDebug(EDBUG_TYPE_GRABS)) Eprintf("%s: %#x set %s\n", __func__, @@ -246,7 +250,7 @@ ClickGrabsSet(EWin * ewin) { if (ewin->state.click_grab_isset) { -GrabButtonRelease(AnyButton, AnyModifier, +GrabButtonRelease(raise_button, AnyModifier, EwinGetClientConWin(ewin)); if (EDebug(EDBUG_TYPE_GRABS)) Eprintf("%s: %#x unset %s\n", __func__, @@ -736,6 +740,7 @@ typedef struct { struct { int mode; charclickalways; + charbutton1_raises; charnew_focus; charnew_focus_if_group; charpopup_focus; @@ -771,6 +776,7 @@ _DlgApplyFocus(Dialog * d, int val __UNUSED__, void *data __UNUSED__) Conf.focus.mode = dd->focus.mode; Conf.focus.clickraises = dd->focus.clickalways; + Conf.focus.only_button1_can_raise = dd->focus.button1_raises; Conf.focus.all_new_windows_get_focus = dd->focus.new_focus; Conf.focus.new_windows_get_focus_if_group_focused = dd->focus.new_focus_if_group; @@ -808,6 +814,7 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) dd->focus.mode = Conf.focus.mode; dd->focus.clickalways = Conf.focus.clickraises; + dd->focus.button1_raises = Conf.focus.only_button1_can_raise; dd->focus.new_focus = Conf.focus.all_new_windows_get_focus; dd->focus.new_focus_if_group = Conf.focus.new_windows_get_focus_if_group_focused; @@ -861,6 +868,11 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) DialogItemSetText(di, _("Clicking in a window always raises it")); DialogItemCheckButtonSetPtr(di, >focus.clickalways); + di = DialogAddItem(table, DITEM_CHECKBUTTON); + DialogItemSetColSpan(di, 2); + DialogItemSetText(di, _("Only primary mouse button can raise window")); + DialogItemCheckButtonSetPtr(di, >focus.button1_raises); + di = DialogAddItem(table, DITEM_SEPARATOR); DialogItemSetColSpan(di, 2); @@ -1168,6 +1180,7 @@ static const IpcItem FocusIpcArray[] = { static const CfgItem FocusCfgItems[] = { CFG_ITEM_INT(Conf.focus, mode, MODE_FOCUS_SLOPPY), CFG_ITEM_BOOL(Conf.focus, clickraises, 1), + CFG_ITEM_BOOL(Conf.focus, only_button1_can_raise, 0), CFG_ITEM_BOOL(Conf.focus, transientsfollowleader, 1), CFG_ITEM_BOOL(Conf.focus, switchfortransientmap, 1), CFG_ITEM_BOOL(Conf.focus, all_new_windows_get_focus, 0), --
[EGIT] [e16/e16] master 01/03: 1.0.22.000
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=a0d789566804128b155f2d32a3acd0712efca10a commit a0d789566804128b155f2d32a3acd0712efca10a Author: Kim Woelders Date: Sun Jun 21 08:39:13 2020 +0200 1.0.22.000 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a47264a3..fbdda296 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ m4_define([pkg_version], [1.0.22]) -#m4_define([pkg_revision], [000]) +m4_define([pkg_revision], [000]) m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version])) AC_INIT([e16],[pkg_version],[enlightenment-de...@lists.sourceforge.net]) --
[EGIT] [e16/e16] master 03/03: Make "only primary mouse button raises" option take effect immediately
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=e6b62914b43373ec58c70837cfd68c8af1bd62cc commit e6b62914b43373ec58c70837cfd68c8af1bd62cc Author: Kim Woelders Date: Tue Jun 23 20:54:12 2020 +0200 Make "only primary mouse button raises" option take effect immediately --- src/ewins.h | 1 + src/focus.c | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ewins.h b/src/ewins.h index 3bc8f0f8..628da6f5 100644 --- a/src/ewins.h +++ b/src/ewins.h @@ -87,6 +87,7 @@ struct _ewin { charvisibility; charshaped; charshaded; + unsigned char click_grab_button; unsignedsnapstarted:1; /* Started from snap cmd */ unsignedidentified:1; diff --git a/src/focus.c b/src/focus.c index d974d125..79c9c38a 100644 --- a/src/focus.c +++ b/src/focus.c @@ -236,6 +236,13 @@ ClickGrabsSet(EWin * ewin) if (set) { + if (ewin->state.click_grab_isset && + ewin->state.click_grab_button != raise_button) + { +GrabButtonRelease(ewin->state.click_grab_button, AnyModifier, + EwinGetClientConWin(ewin)); +ewin->state.click_grab_isset = 0; + } if (!ewin->state.click_grab_isset) { GrabButtonSet(raise_button, AnyModifier, EwinGetClientConWin(ewin), @@ -244,13 +251,14 @@ ClickGrabsSet(EWin * ewin) Eprintf("%s: %#x set %s\n", __func__, EwinGetClientXwin(ewin), EwinGetTitle(ewin)); ewin->state.click_grab_isset = 1; +ewin->state.click_grab_button = raise_button; } } else { if (ewin->state.click_grab_isset) { -GrabButtonRelease(raise_button, AnyModifier, +GrabButtonRelease(ewin->state.click_grab_button, AnyModifier, EwinGetClientConWin(ewin)); if (EDebug(EDBUG_TYPE_GRABS)) Eprintf("%s: %#x unset %s\n", __func__, --
[EGIT] [legacy/imlib2] master 01/02: Fix build without X11
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=ea5da196cb5dc582ed02ba4c508ab55d8b259e82 commit ea5da196cb5dc582ed02ba4c508ab55d8b259e82 Author: Kim Woelders Date: Tue Jul 28 19:57:11 2020 +0200 Fix build without X11 --- src/lib/image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/image.c b/src/lib/image.c index a2425ad..ad25d51 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -1004,8 +1004,10 @@ void __imlib_DirtyImage(ImlibImage * im) { SET_FLAG(im->flags, F_INVALID); +#ifdef BUILD_X11 /* and dirty all pixmaps generated from it */ __imlib_DirtyPixmapsForImage(im); +#endif } void --
[EGIT] [legacy/imlib2] master 02/02: Remove a couple of unused includes
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=9e8978c6be151303b3e28fa7dc5f5963ca42fc70 commit 9e8978c6be151303b3e28fa7dc5f5963ca42fc70 Author: Kim Woelders Date: Tue Jul 28 21:33:46 2020 +0200 Remove a couple of unused includes --- src/lib/api.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/api.c b/src/lib/api.c index 2d6a829..df40bfe 100644 --- a/src/lib/api.c +++ b/src/lib/api.c @@ -34,11 +34,9 @@ #include "updates.h" #ifdef BUILD_X11 #include "color.h" -#include "context.h" #include "draw.h" #include "grab.h" #include "rend.h" -#include "rgba.h" #include "ximage.h" #endif --
[EGIT] [e16/e16] master 01/05: Consistently put __EXPORT__ in .c files
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=f3de71d05f2d34053924be0c08fa3e3538d6bdc0 commit f3de71d05f2d34053924be0c08fa3e3538d6bdc0 Author: Kim Woelders Date: Sat Jan 9 09:45:09 2021 +0100 Consistently put __EXPORT__ in .c files --- src/E.h| 6 +++--- src/edebug.h | 4 ++-- src/main.c | 6 +++--- src/memory.c | 4 ++-- src/misc.c | 6 +++--- src/tclass.h | 12 ++-- src/text.c | 4 ++-- src/text_xft.c | 10 +- src/util.h | 6 +++--- src/x.c| 6 +++--- src/xwin.h | 6 +++--- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/E.h b/src/E.h index 032f5df9..fa5b581d 100644 --- a/src/E.h +++ b/src/E.h @@ -3,7 +3,7 @@ /*/ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2020 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -560,5 +560,5 @@ char **ThemesList(int *num); */ extern const char e_wm_name[]; extern const char e_wm_version[]; -__EXPORT__ extern EConf Conf; -__EXPORT__ extern EMode Mode; +extern EConfConf; +extern EModeMode; diff --git a/src/edebug.h b/src/edebug.h index 3d1d820b..7d6c083b 100644 --- a/src/edebug.h +++ b/src/edebug.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2014 Kim Woelders + * Copyright (C) 2006-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -67,7 +67,7 @@ voidEDebugInit(const char *s); voidEDebugSet(unsigned int type, int value); -__EXPORT__ int EDebug(unsigned int type); +int EDebug(unsigned int type); #else diff --git a/src/main.c b/src/main.c index cd27508c..03d5a66f 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2020 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -50,8 +50,8 @@ const char e_wm_name[] = "e16"; const char e_wm_version[] = E16_VERSION; -EConf Conf; -EMode Mode; +__EXPORT__ EConfConf; +__EXPORT__ EModeMode; static int EoptGet(int argc, char **argv); static void EoptHelp(void); diff --git a/src/memory.c b/src/memory.c index 1477a3fe..16979ed6 100644 --- a/src/memory.c +++ b/src/memory.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2005-2020 Kim Woelders + * Copyright (C) 2005-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -29,7 +29,7 @@ #include "util.h" -void +__EXPORT__ void EfreeNull(void **p) { Efree(*p); diff --git a/src/misc.c b/src/misc.c index d84caf20..a36f058f 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -52,7 +52,7 @@ _tvdiff(struct timeval *tvd, const struct timeval *tv1, tvd->tv_usec = tus; } -void +__EXPORT__ void Eprintf(const char *fmt, ...) { FILE *fprt; @@ -141,7 +141,7 @@ EDebugInit(const char *param) } } -int +__EXPORT__ int EDebug(unsigned int type) { return (ev_debug && diff --git a/src/tclass.h b/src/tclass.h index b70c2456..5d46b1b9 100644 --- a/src/tclass.h +++ b/src/tclass.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2014 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -98,7 +98,7 @@ voidTextclassSetJustification(TextClass * tc, int just); /* text.c */ TextState *TextclassGetTextState(TextClass * tclass, int state, int active, int sticky); -__EXPORT__ void TextstateTextFit(
[EGIT] [e16/e16] master 04/05: Sound: sound_pa -> sound_pulse
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=ec03e3cdb5f3c5fcd636bc2be901dba8d1776487 commit ec03e3cdb5f3c5fcd636bc2be901dba8d1776487 Author: Kim Woelders Date: Sat Jan 9 09:30:57 2021 +0100 Sound: sound_pa -> sound_pulse --- src/Makefile.am | 4 ++-- src/sound.c | 4 ++-- src/{sound_pa.c => sound_pulse.c} | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index fdfe437b..991da605 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -188,7 +188,7 @@ endif if USE_SOUND_PULSE LIBSND_PULSE = libsound_pulse.la -libsound_pulse_la_SOURCES = sound_pa.c sound_load.c +libsound_pulse_la_SOURCES = sound_pulse.c sound_load.c libsound_pulse_la_CFLAGS = $(PA_CFLAGS) $(SNDLDR_CFLAGS) libsound_pulse_la_LIBADD = $(PA_LIBS) $(SNDLDR_LIBS) libsound_pulse_la_LDFLAGS = -module -avoid-version @@ -234,7 +234,7 @@ endif else -MODULE_SRCS = sound_esd.c sound_pa.c sound_sndio.c sound_alsa.c sound_load.c \ +MODULE_SRCS = sound_esd.c sound_pulse.c sound_sndio.c sound_alsa.c sound_load.c \ ttfont.c text_xft.c text_pango.c MODULE_LIBS = $(ESD_LIBS) $(PA_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) $(PANGO_LIBS) $(XFT_LIBS) MODULE_CFLAGS = $(ESD_CFLAGS) $(PA_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) $(PANGO_CFLAGS) $(XFT_CFLAGS) diff --git a/src/sound.c b/src/sound.c index b7149ea6..2dd5053c 100644 --- a/src/sound.c +++ b/src/sound.c @@ -84,8 +84,8 @@ static const SoundOps *ops = NULL; extern const SoundOps SoundOps_esd; static const SoundOps *ops = _esd; #elif USE_SOUND_PULSE -extern const SoundOps SoundOps_pa; -static const SoundOps *ops = _pa; +extern const SoundOps SoundOps_pulse; +static const SoundOps *ops = _pulse; #elif USE_SOUND_SNDIO extern const SoundOps SoundOps_sndio; static const SoundOps *ops = _sndio; diff --git a/src/sound_pa.c b/src/sound_pulse.c similarity index 98% rename from src/sound_pa.c rename to src/sound_pulse.c index 0944425e..da6f5ac4 100644 --- a/src/sound_pa.c +++ b/src/sound_pulse.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020 Kim Woelders + * Copyright (C) 2008-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -345,9 +345,9 @@ _sound_pa_Init(void) goto done; } -__EXPORT__ extern const SoundOps SoundOps_pa; +__EXPORT__ extern const SoundOps SoundOps_pulse; -const SoundOps SoundOps_pa = { +const SoundOps SoundOps_pulse = { _sound_pa_Init, _sound_pa_Exit, _sound_pa_Load, _sound_pa_Destroy, _sound_pa_Play, }; --
[EGIT] [e16/e16] master 05/05: Sound: Treat player engine like others
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=eb4ea872e95fb11b9eb60d07aeaa85d42069f345 commit eb4ea872e95fb11b9eb60d07aeaa85d42069f345 Author: Kim Woelders Date: Wed Dec 30 20:20:23 2020 +0100 Sound: Treat player engine like others --- configure.ac | 1 + src/Makefile.am| 10 ++-- src/actions.c | 4 +-- src/file.c | 4 +-- src/sound.c| 47 +--- src/sound_player.c | 71 ++ 6 files changed, 90 insertions(+), 47 deletions(-) diff --git a/configure.ac b/configure.ac index 28e8ad16..e33e98f0 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,7 @@ if test "x$enable_sound" = "xplayer"; then with_sndplayer="/usr/bin/aplay -q %s") AC_DEFINE_UNQUOTED(SOUND_PLAYER_FMT, "$with_sndplayer", [Audio player]), fi +AM_CONDITIONAL(USE_SOUND_PLAYER, test "x$enable_sound" = "xplayer") case x$enable_sound in xpulseaudio|xesound|xsndio|xalsa) diff --git a/src/Makefile.am b/src/Makefile.am index 991da605..a94ce330 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,7 +176,7 @@ MODULE_LIBS = $(DLOPEN_LIBS) libe16dir = $(pkglibdir) -libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PULSE) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) +libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PULSE) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBSND_PLAYER) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) if USE_SOUND_ESD LIBSND_ESD = libsound_esd.la @@ -210,6 +210,12 @@ libsound_alsa_la_LIBADD = $(ALSA_LIBS) $(SNDLDR_LIBS) libsound_alsa_la_LDFLAGS = -module -avoid-version endif +if USE_SOUND_PLAYER +LIBSND_PLAYER = libsound_player.la +libsound_player_la_SOURCES = sound_player.c +libsound_player_la_LDFLAGS = -module -avoid-version +endif + LIBFNT_IFT = libfont_ift.la libfont_ift_la_SOURCES= ttfont.c libfont_ift_la_CFLAGS = $(IMLIB2_CFLAGS) @@ -234,7 +240,7 @@ endif else -MODULE_SRCS = sound_esd.c sound_pulse.c sound_sndio.c sound_alsa.c sound_load.c \ +MODULE_SRCS = sound_esd.c sound_pulse.c sound_sndio.c sound_alsa.c sound_player.c sound_load.c \ ttfont.c text_xft.c text_pango.c MODULE_LIBS = $(ESD_LIBS) $(PA_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) $(PANGO_LIBS) $(XFT_LIBS) MODULE_CFLAGS = $(ESD_CFLAGS) $(PA_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) $(PANGO_CFLAGS) $(XFT_CFLAGS) diff --git a/src/actions.c b/src/actions.c index 2ebd3d65..d18b044a 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2020 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -212,7 +212,7 @@ _Espawn(int argc __UNUSED__, char **argv) exit(100); } -void +__EXPORT__ void Espawn(const char *fmt, ...) { va_list args; diff --git a/src/file.c b/src/file.c index c1153732..0f1fad2f 100644 --- a/src/file.c +++ b/src/file.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2007-2020 Kim Woelders + * Copyright (C) 2007-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -322,7 +322,7 @@ path_canexec(const char *file) return 1; } -int +__EXPORT__ int path_canexec0(const char *cmd) { charexe[4096]; diff --git a/src/sound.c b/src/sound.c index 2dd5053c..49c30f02 100644 --- a/src/sound.c +++ b/src/sound.c @@ -31,8 +31,6 @@ #include "sound.h" #include "sounds.h" -#define HAVE_SOUND_OPS 1 - #if USE_SOUND_ESD #define SOUND_SERVER_NAME "esd" #define SOUND_MODULE_NAME "esd" @@ -46,7 +44,8 @@ #define SOUND_SERVER_NAME "ALSA" #define SOUND_MODULE_NAME "alsa" #elif USE_SOUND_PLAYER -#undef HAVE_SOUND_OPS +#define SOUND_SERVER_NAME SOUND_PLAYER_FMT +#define SOUND_MODULE_NAME "player" #else #error Invalid sound configuration #endif @@ -92,6 +91,9 @@ static const SoundOps *ops = _sndio; #elif USE_SOUND_ALSA extern const SoundOps SoundOps_alsa; static const SoundOps *ops = _alsa; +#elif USE_SOUND_PLAYER +extern const SoundOps SoundOps_player; +static const SoundOps *ops = _player; #endif #endif @@ -167,10 +169,9 @@ _SclassSampleDestroy(void *data, void *user_data __UNUSED__) if (!sclass || !sclass->sample) return; -#if HAVE_SOUND_OPS if (ops) ops->SampleDestroy(sclass->sample); -#endif + sclass->sample = NULL; } @@ -206,29 +207,12 @@ _SclassDestroy(SoundClass * sclass)
[EGIT] [e16/e16] master 03/05: Sound: Mostly cosmetic changes
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=b69ced9eba3f29ab2a06fd42a7ce3d8582051789 commit b69ced9eba3f29ab2a06fd42a7ce3d8582051789 Author: Kim Woelders Date: Wed Dec 30 20:34:11 2020 +0100 Sound: Mostly cosmetic changes --- src/sound.c | 56 ++-- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/sound.c b/src/sound.c index f8d35a6b..b7149ea6 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2020 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -175,7 +175,7 @@ _SclassSampleDestroy(void *data, void *user_data __UNUSED__) } static SoundClass * -SclassCreate(const char *name, const char *file) +_SclassCreate(const char *name, const char *file) { SoundClass *sclass; @@ -193,7 +193,7 @@ SclassCreate(const char *name, const char *file) } static void -SclassDestroy(SoundClass * sclass) +_SclassDestroy(SoundClass * sclass) { if (!sclass) return; @@ -206,12 +206,6 @@ SclassDestroy(SoundClass * sclass) Efree(sclass); } -static void -_SclassDestroy(void *data, void *user_data __UNUSED__) -{ - SclassDestroy((SoundClass *) data); -} - #if USE_SOUND_PLAYER static void _SclassPlayAplay(SoundClass * sclass) @@ -227,7 +221,7 @@ _SclassPlayAplay(SoundClass * sclass) #endif static void -SclassApply(SoundClass * sclass) +_SclassApply(SoundClass * sclass) { if (!sclass || !Conf_sound.enable) return; @@ -253,7 +247,7 @@ SclassApply(SoundClass * sclass) "Enlightenment will continue to operate, but you\n" "may wish to check your configuration settings.\n"), sclass->file); -SclassDestroy(sclass); +_SclassDestroy(sclass); return; } } @@ -269,7 +263,7 @@ _SclassMatchName(const void *data, const void *match) } static SoundClass * -SclassFind(const char *name) +_SclassFind(const char *name) { return LIST_FIND(SoundClass, _list, _SclassMatchName, name); } @@ -285,12 +279,12 @@ _SoundPlayByName(const char *name) if (!name || !*name) return; - sclass = SclassFind(name); + sclass = _SclassFind(name); if (EDebug(EDBUG_TYPE_SOUND)) Eprintf("%s: %s file=%s\n", "SclassApply", name, SC_NAME(sclass)); - SclassApply(sclass); + _SclassApply(sclass); } #define _SoundMasked(i) \ @@ -312,18 +306,18 @@ SoundPlay(int sound) } static int -SoundFree(const char *name) +_SoundFree(const char *name) { SoundClass *sclass; - sclass = SclassFind(name); - SclassDestroy(sclass); + sclass = _SclassFind(name); + _SclassDestroy(sclass); return !!sclass; } static void -SoundInit(void) +_SoundInit(void) { if (!Conf_sound.enable) return; @@ -364,7 +358,7 @@ SoundInit(void) } static void -SoundExit(void) +_SoundExit(void) { SoundClass *sc; @@ -386,9 +380,9 @@ _SoundConfigure(int enable) Conf_sound.enable = enable; if (Conf_sound.enable) - SoundInit(); + _SoundInit(); else - SoundExit(); + _SoundExit(); } /* @@ -418,7 +412,7 @@ _SoundConfigParse(FILE * fs) Eprintf("*** Ignoring line: %s\n", s); continue; } - SclassCreate(s1, s2); + _SclassCreate(s1, s2); } #if 0 /* Errors here are just ignored */ if (err) @@ -450,7 +444,9 @@ _SoundConfigUnload(void) SoundClass *sc, *tmp; LIST_FOR_EACH_SAFE(SoundClass, _list, sc, tmp) - _SclassDestroy(sc, NULL); + { + _SclassDestroy(sc); + } Mode_sound.cfg_loaded = 0; } @@ -476,7 +472,7 @@ _SoundThemeChange(void *item __UNUSED__, const char *theme) */ static void -SoundSighan(int sig, void *prm __UNUSED__) +_SoundSighan(int sig, void *prm __UNUSED__) { switch (sig) { @@ -484,17 +480,17 @@ SoundSighan(int sig, void *prm __UNUSED__) memset(_sound, 0, sizeof(Mode_sound)); break; case ESIGNAL_CONFIGURE: - SoundInit(); + _SoundInit(); break; case ESIGNAL_START: if (!Conf_sound.enable) break; SoundPlay(SOUND_STARTUP); - SoundFree("SOUND_STARTUP"); + _SoundFree("SOUND_STARTUP"); break; case ESIGNAL_EXIT: /* if (Mode.wm.master) */ - SoundExit(); + _SoundExit(); break; } } @@ -563,7 +559,7 @@ SoundIpc(const char *params) if (!strncmp(cmd, "del", 3)) { - SoundFree(prm); + _SoundFree(prm); }
[EGIT] [e16/e16] master 02/05: Sound: autofoo cosmetics
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=3c7517357347d0aa74e2dd79a3b730433069a4ce commit 3c7517357347d0aa74e2dd79a3b730433069a4ce Author: Kim Woelders Date: Wed Dec 30 20:31:05 2020 +0100 Sound: autofoo cosmetics --- configure.ac| 20 ++-- src/Makefile.am | 20 ++-- src/sound.c | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 7f6480c3..28e8ad16 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,7 @@ if test "x$enable_sound" = "xpulseaudio"; then AC_DEFINE(USE_SOUND_PULSE, 1, [PulseAudio sound support]), enable_sound=no) fi -AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound" = "xpulseaudio") +AM_CONDITIONAL(USE_SOUND_PULSE, test "x$enable_sound" = "xpulseaudio") if test "x$enable_sound" = "xesound"; then AM_PATH_ESD(0.2.17,,[ @@ -148,7 +148,7 @@ if test "x$enable_sound" = "xesound"; then AC_DEFINE(USE_SOUND_ESD, 1, [EsounD sound support]) fi fi -AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound" = "xesound") +AM_CONDITIONAL(USE_SOUND_ESD, test "x$enable_sound" = "xesound") if test "x$enable_sound" = "xsndio"; then AC_CHECK_HEADERS(sndio.h,, enable_sound=no @@ -159,7 +159,14 @@ if test "x$enable_sound" = "xsndio"; then AC_DEFINE(USE_SOUND_SNDIO, 1, [Sndio sound support]) fi fi -AM_CONDITIONAL(USE_LIBSNDIO, test "x$enable_sound" = "xsndio") +AM_CONDITIONAL(USE_SOUND_SNDIO, test "x$enable_sound" = "xsndio") + +if test "x$enable_sound" = "xalsa"; then + PKG_CHECK_MODULES(ALSA, alsa, +AC_DEFINE(USE_SOUND_ALSA, 1, [ALSA sound support]), +enable_sound=no) +fi +AM_CONDITIONAL(USE_SOUND_ALSA, test "x$enable_sound" = "xalsa") if test "x$enable_sound" = "xplayer"; then AC_DEFINE(USE_SOUND_PLAYER, 1, [Play sounds using audio player]) @@ -170,13 +177,6 @@ if test "x$enable_sound" = "xplayer"; then AC_DEFINE_UNQUOTED(SOUND_PLAYER_FMT, "$with_sndplayer", [Audio player]), fi -if test "x$enable_sound" = "xalsa"; then - PKG_CHECK_MODULES(ALSA, alsa, -AC_DEFINE(USE_SOUND_ALSA, 1, [ALSA sound support]), -enable_sound=no) -fi -AM_CONDITIONAL(USE_LIBALSA, test "x$enable_sound" = "xalsa") - case x$enable_sound in xpulseaudio|xesound|xsndio|xalsa) if test "x$with_sndldr" = "xnone"; then diff --git a/src/Makefile.am b/src/Makefile.am index a4145e66..fdfe437b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,9 +176,9 @@ MODULE_LIBS = $(DLOPEN_LIBS) libe16dir = $(pkglibdir) -libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PA) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) +libe16_LTLIBRARIES = $(LIBSND_ESD) $(LIBSND_PULSE) $(LIBSND_SNDIO) $(LIBSND_ALSA) $(LIBFNT_IFT) $(LIBFNT_XFT) $(LIBFNT_PANGO) -if USE_LIBESD +if USE_SOUND_ESD LIBSND_ESD = libsound_esd.la libsound_esd_la_SOURCES = sound_esd.c sound_load.c libsound_esd_la_CFLAGS= $(ESD_CFLAGS) $(SNDLDR_CFLAGS) @@ -186,15 +186,15 @@ libsound_esd_la_LIBADD= $(ESD_LIBS) $(SNDLDR_LIBS) libsound_esd_la_LDFLAGS = -module -avoid-version endif -if USE_LIBPA -LIBSND_PA = libsound_pa.la -libsound_pa_la_SOURCES = sound_pa.c sound_load.c -libsound_pa_la_CFLAGS= $(PA_CFLAGS) $(SNDLDR_CFLAGS) -libsound_pa_la_LIBADD= $(PA_LIBS) $(SNDLDR_LIBS) -libsound_pa_la_LDFLAGS = -module -avoid-version +if USE_SOUND_PULSE +LIBSND_PULSE = libsound_pulse.la +libsound_pulse_la_SOURCES = sound_pa.c sound_load.c +libsound_pulse_la_CFLAGS = $(PA_CFLAGS) $(SNDLDR_CFLAGS) +libsound_pulse_la_LIBADD = $(PA_LIBS) $(SNDLDR_LIBS) +libsound_pulse_la_LDFLAGS = -module -avoid-version endif -if USE_LIBSNDIO +if USE_SOUND_SNDIO LIBSND_SNDIO = libsound_sndio.la libsound_sndio_la_SOURCES = sound_sndio.c sound_load.c libsound_sndio_la_CFLAGS = $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) @@ -202,7 +202,7 @@ libsound_sndio_la_LIBADD = $(SNDIO_LIBS) $(SNDLDR_LIBS) libsound_sndio_la_LDFLAGS = -module -avoid-version endif -if USE_LIBALSA +if USE_SOUND_ALSA LIBSND_ALSA = libsound_alsa.la libsound_alsa_la_SOURCES = sound_alsa.c sound_load.c libsound_alsa_la_CFLAGS = $(ALSA_CFLAGS) $(SNDLDR_CFLAGS) diff --git a/src/sound.c b/src/sound.c index ace6db43..f8d35a6b 100644 --- a/src/sound.c +++ b/src/sound.c @@ -38,7 +38,7 @@ #define SOUND_MODULE_NAME "esd" #elif USE_SOUND_PULSE #define SOUND_SERVER_NAME "pulseaudio" -#define SOUND_MODULE_NAME "pa" +#define SOUND_MODULE_NAME "pulse" #elif USE_SOUND_SNDIO #define SOUND_SERVER_NAME "sndio" #define SOUND_MODULE_NAME "sndio" --
[EGIT] [e16/e16] master 01/01: Forgot some 2020
kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=99c7523b07a92da7c43df683ec0171dabf35ce9a commit 99c7523b07a92da7c43df683ec0171dabf35ce9a Author: Kim Woelders Date: Tue Dec 29 16:23:17 2020 +0100 Forgot some 2020 --- src/eimage.c | 2 +- src/eimage.h | 2 +- src/extinitwin.c | 2 +- src/x.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eimage.c b/src/eimage.c index 9487d6ac..e8300722 100644 --- a/src/eimage.c +++ b/src/eimage.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/src/eimage.h b/src/eimage.h index 899d937c..32e1381b 100644 --- a/src/eimage.h +++ b/src/eimage.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/src/extinitwin.c b/src/extinitwin.c index da1fc0bb..7f7b8826 100644 --- a/src/extinitwin.c +++ b/src/extinitwin.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to diff --git a/src/x.c b/src/x.c index f37aa9c7..1f90b5b8 100644 --- a/src/x.c +++ b/src/x.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2018 Kim Woelders + * Copyright (C) 2004-2020 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to --
[EGIT] [legacy/imlib2] master 02/02: grab.c: Support 30bpp display in __imlib_GrabXImageToRGBA()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=e3be3eb0fc11d7ddf6af2ab9aa8c457f6f1f4def commit e3be3eb0fc11d7ddf6af2ab9aa8c457f6f1f4def Author: Kim Woelders Date: Sun Dec 6 13:53:58 2020 +0100 grab.c: Support 30bpp display in __imlib_GrabXImageToRGBA() Patch by the_third. https://phab.enlightenment.org/T8808 --- src/lib/grab.c | 77 ++ 1 file changed, 77 insertions(+) diff --git a/src/lib/grab.c b/src/lib/grab.c index 6c935b8..3e41351 100644 --- a/src/lib/grab.c +++ b/src/lib/grab.c @@ -91,6 +91,7 @@ __imlib_GrabXImageToRGBA(DATA32 * data, int ox, int oy, int ow, int oh, break; case 24: case 25: + case 30: case 32: for (y = 0; y < h; y++) { @@ -439,6 +440,82 @@ __imlib_GrabXImageToRGBA(DATA32 * data, int ox, int oy, int ow, int oh, } } break; + case 30: +if (bgr) + { + if (mxim) + { + for (y = 0; y < h; y++) +{ + src = (DATA32 *) (xim->data + (xim->bytes_per_line * y)); + ptr = data + ((y + iny) * ow) + inx; + for (x = 0; x < w; x++) + { +pixel = (((*src) & 0x03ff) << 14 & 0x00ff) | + (((*src) & 0x000ffc00) >> 4 & 0xff00) | + (((*src) & 0x3ff0) >> 22 & 0x00ff); +if (XGetPixel(mxim, x, y)) + pixel |= 0xff00; +*ptr++ = pixel; +src++; + } +} + } + else + { + for (y = 0; y < h; y++) +{ + src = (DATA32 *) (xim->data + (xim->bytes_per_line * y)); + ptr = data + ((y + iny) * ow) + inx; + for (x = 0; x < w; x++) + { +*ptr++ = 0xff00 | + (((*src) & 0x03ff) << 14 & 0x00ff) | + (((*src) & 0x000ffc00) >> 4 & 0xff00) | + (((*src) & 0x3ff0) >> 22 & 0x00ff); +src++; + } +} + } + } +else + { + if (mxim) + { + for (y = 0; y < h; y++) +{ + src = (DATA32 *) (xim->data + (xim->bytes_per_line * y)); + ptr = data + ((y + iny) * ow) + inx; + for (x = 0; x < w; x++) + { +pixel = (((*src) & 0x3ff0) >> 6 & 0x00ff) | + (((*src) & 0x000ffc00) >> 4 & 0xff00) | + (((*src) & 0x03ff) >> 2 & 0x00ff); +if (XGetPixel(mxim, x, y)) + pixel |= 0xff00; +*ptr++ = pixel; +src++; + } +} + } + else + { + for (y = 0; y < h; y++) +{ + src = (DATA32 *) (xim->data + (xim->bytes_per_line * y)); + ptr = data + ((y + iny) * ow) + inx; + for (x = 0; x < w; x++) + { +*ptr++ = 0xff00 | + (((*src) & 0x3ff0) >> 6 & 0x00ff) | + (((*src) & 0x000ffc00) >> 4 & 0xff00) | + (((*src) & 0x03ff) >> 2 & 0x00ff); +src++; + } +} + } + } +break; case 32: if (bgr) { --
[EGIT] [legacy/imlib2] master 01/02: rend.c: Fix __imlib_generic_render() when jump != 0
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=9219b2c6a35931dec819610afe1b388153364141 commit 9219b2c6a35931dec819610afe1b388153364141 Author: Kim Woelders Date: Sun Dec 6 13:51:40 2020 +0100 rend.c: Fix __imlib_generic_render() when jump != 0 Patch by the_third. https://phab.enlightenment.org/T8799 --- src/lib/rend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/rend.c b/src/lib/rend.c index cfab830..d8fb725 100644 --- a/src/lib/rend.c +++ b/src/lib/rend.c @@ -227,6 +227,7 @@ __imlib_generic_render(DATA32 * src, int jump, int w, int h, int dx, int dy, XPutPixel(xim, x, y, val); src++; } +src += jump; } } --
[EGIT] [legacy/imlib2] master 01/01: WEBP loader: Add initial signature check
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=64df90de3d356bdc7026ea6b48f1f629d8d87a98 commit 64df90de3d356bdc7026ea6b48f1f629d8d87a98 Author: Kim Woelders Date: Sun Dec 6 15:29:30 2020 +0100 WEBP loader: Add initial signature check Avoid potentially wasting much time when loading/checking large non-webp files. --- src/modules/loaders/loader_webp.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/loaders/loader_webp.c b/src/modules/loaders/loader_webp.c index 9810540..a5a13c0 100644 --- a/src/modules/loaders/loader_webp.c +++ b/src/modules/loaders/loader_webp.c @@ -40,6 +40,7 @@ load2(ImlibImage * im, int load_data) int encoded_fd; WebPBitstreamFeatures features; VP8StatusCode vp8return; + unsigned intsize; encoded_fd = fileno(im->fp); if (encoded_fd < 0) @@ -54,7 +55,20 @@ load2(ImlibImage * im, int load_data) if (!encoded_data) goto quit; - if (read(encoded_fd, encoded_data, stats.st_size) < stats.st_size) + /* Check signature */ + size = 12; + if (read(encoded_fd, encoded_data, size) != size) + goto quit; + if (memcmp(encoded_data + 0, "RIFF", 4) != 0 || + memcmp(encoded_data + 8, "WEBP", 4) != 0) + goto quit; + + size = stats.st_size; + if (size != stats.st_size) + goto quit; + + size -= 12; + if (read(encoded_fd, encoded_data + 12, size) != size) goto quit; if (WebPGetInfo(encoded_data, stats.st_size, >w, >h) == 0) --
[EGIT] [legacy/imlib2] master 01/01: XPM loader: Get transparency right when doing header-only loading
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=ae3d501f93ef1e9fc71e5fd03bc299fcbdf7edff commit ae3d501f93ef1e9fc71e5fd03bc299fcbdf7edff Author: Kim Woelders Date: Tue Dec 8 16:52:44 2020 +0100 XPM loader: Get transparency right when doing header-only loading We have to parse the colormap too to figure that out. --- src/modules/loaders/loader_xpm.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/modules/loaders/loader_xpm.c b/src/modules/loaders/loader_xpm.c index 86ccad7..727addb 100644 --- a/src/modules/loaders/loader_xpm.c +++ b/src/modules/loaders/loader_xpm.c @@ -234,15 +234,6 @@ load2(ImlibImage * im, int load_data) if (!cmap) goto quit; - if (!load_data) -{ - rc = LOAD_SUCCESS; - goto quit; -} - - ptr = __imlib_AllocateData(im); - if (!ptr) - goto quit; pixels = w * h; j = 0; @@ -344,6 +335,21 @@ load2(ImlibImage * im, int load_data) else qsort(cmap, ncolors, sizeof(cmap_t), xpm_cmap_sort); context++; + + if (transp >= 0) + SET_FLAG(im->flags, F_HAS_ALPHA); + else + UNSET_FLAG(im->flags, F_HAS_ALPHA); + + if (!load_data) + { +rc = LOAD_SUCCESS; +goto quit; + } + + ptr = __imlib_AllocateData(im); + if (!ptr) + goto quit; } } else @@ -439,11 +445,6 @@ load2(ImlibImage * im, int load_data) im->data[count] = cmap[0].pixel; } - if (transp >= 0) - SET_FLAG(im->flags, F_HAS_ALPHA); - else - UNSET_FLAG(im->flags, F_HAS_ALPHA); - rc = LOAD_SUCCESS; quit: --