This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
  discards  5030a359b273b1aa88f7cb7d064cd546f86a5bb0 (commit)
  discards  ea618199a0ac17849736333e27bbeaa26e8f2617 (commit)
       via  774cfafedc660e7add21fe4ba28c6bf554824371 (commit)
       via  683e07ca8641f063579221b82ad3f92dbdb093c0 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (5030a359b273b1aa88f7cb7d064cd546f86a5bb0)
                         N -- N -- N (774cfafedc660e7add21fe4ba28c6bf554824371)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/774cfafedc660e7add21fe4ba28c6bf554824371

commit 774cfafedc660e7add21fe4ba28c6bf554824371
Author: Brad Jorsch <[email protected]>
Date:   Tue Feb 18 21:41:22 2014 -0500

    Set no_focusable for "notification" and "tooltip" windows
    
    Notification popups, and tooltips for that matter, shouldn't be taking
    focus away from apps the user is actually interacting with.

diff --git a/src/wmspec.c b/src/wmspec.c
index 779a9efc..46351f23 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -1204,6 +1204,7 @@ static Bool handleWindowType(WWindow *wwin, Atom type, 
int *layer)
                wwin->client_flags.skip_switchpanel = 1;
                wwin->client_flags.dont_move_off = 1;
                wwin->client_flags.no_appicon = 1;
+               wwin->client_flags.no_focusable = 1;
                wwin->flags.net_skip_pager = 1;
        } else if (wwin->type == net_wm_window_type_notification) {
                wwin->client_flags.no_titlebar = 1;
@@ -1219,6 +1220,7 @@ static Bool handleWindowType(WWindow *wwin, Atom type, 
int *layer)
                wwin->client_flags.dont_move_off = 1;
                wwin->client_flags.no_hide_others= 1;
                wwin->client_flags.no_appicon = 1;
+               wwin->client_flags.no_focusable = 1;
                wwin->flags.net_skip_pager = 1;
        } else if (wwin->type == net_wm_window_type_dnd) {
                wwin->client_flags.no_titlebar = 1;

http://repo.or.cz/w/wmaker-crm.git/commit/683e07ca8641f063579221b82ad3f92dbdb093c0

commit 683e07ca8641f063579221b82ad3f92dbdb093c0
Author: David Maciejak <[email protected]>
Date:   Tue Feb 18 13:19:12 2014 +0800

    wrlib: Added support for webp image
    
    This patch is adding support for google webp image format, if you
    don't know it a quick recap is to say that according to their tests
    it's better than png and jpeg.
    
    Follow the link below for some more details:
    https://developers.google.com/speed/webp/

diff --git a/configure.ac b/configure.ac
index 171172e9..b85b5294 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,6 +678,15 @@ AC_ARG_ENABLE([tiff],
     [enable_tiff=auto])
 WM_IMGFMT_CHECK_TIFF
 
+dnl WEBP Support
+dnl ===========
+AC_ARG_ENABLE([webp],
+    [AS_HELP_STRING([--disable-webp], [disable WEBP support through libwebp])],
+    [AS_CASE(["$enableval"],
+        [yes|no], [],
+        [AC_MSG_ERROR([bad value $enableval for --enable-webp])] )],
+    [enable_webp=auto])
+WM_IMGFMT_CHECK_WEBP
 
 dnl PPM Support
 dnl ===========
@@ -685,7 +694,6 @@ dnl ===========
 # We are not using any external library like libppm
 supported_gfx="$supported_gfx builtin-PPM"
 
-
 # Choice of the default format for icons
 AS_IF([test "x$enable_tiff" != "xno"],
     [ICONEXT="tiff"],
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 02245d28..0881cdde 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -221,3 +221,23 @@ AS_IF([test "x$enable_xpm" = "xno"],
     ])
 AM_CONDITIONAL([USE_XPM], [test "x$enable_xpm" != "xno"])dnl
 ]) dnl AC_DEFUN
+
+# WM_IMGFMT_CHECK_WEBP
+# -------------------
+#
+# Check for WEBP file support through 'libwebp'
+# The check depends on variable 'enable_webp' being either:
+#   yes  - detect, fail if not found
+#   no   - do not detect, disable support
+#   auto - detect, disable if not found
+#
+# When not found, append info to variable 'unsupported'
+AC_DEFUN_ONCE([WM_IMGFMT_CHECK_WEBP],
+[WM_LIB_CHECK([WEBP], ["-lwebp"], [VP8DecodeLayer], [$XLFLAGS $XLIBS], 
+    [wm_save_CFLAGS="$CFLAGS"
+     AS_IF([wm_fn_lib_try_compile "webp/decode.h" "" "return 0" ""],
+         [],
+         [AC_MSG_ERROR([found $CACHEVAR but could not find appropriate header 
- are you missing libwebp-dev package?])])
+     CFLAGS="$wm_save_CFLAGS"],
+    [supported_gfx], [GFXLIBS])dnl
+]) dnl AC_DEFUN
diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index db766ae2..48af352a 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -60,6 +60,10 @@ else
 libwraster_la_SOURCES += load_xpm_normalized.c
 endif
 
+if USE_WEBP
+libwraster_la_SOURCES += load_webp.c
+endif
+
 AM_CPPFLAGS = $(DFLAGS) @HEADER_SEARCH_PATH@
 
 libwraster_la_LIBADD = @LIBRARY_SEARCH_PATH@ @GFXLIBS@ @XLIBS@ @LIBXMU@ -lm
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
index 07b021a4..29ad413e 100644
--- a/wrlib/imgformat.h
+++ b/wrlib/imgformat.h
@@ -38,12 +38,13 @@ typedef enum {
        IM_PNG     =  3,
        IM_PPM     =  4,
        IM_JPEG    =  5,
-       IM_GIF     =  6
+       IM_GIF     =  6,
+       IM_WEBP    =  7
 } WRImgFormat;
 
 /* How many image types we have. */
 /* Increase this when adding new image types! */
-#define IM_TYPES    6
+#define IM_TYPES    7
 
 /*
  * Function for Loading in a specific format
diff --git a/wrlib/load.c b/wrlib/load.c
index 061a50de..e834c9e8 100644
--- a/wrlib/load.c
+++ b/wrlib/load.c
@@ -3,6 +3,7 @@
  * Raster graphics library
  *
  * Copyright (c) 1997-2003 Alfredo K. Kojima
+ * Copyright (c) 2014 Window Maker Team
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -37,6 +38,10 @@
 #include <png.h>
 #endif
 
+#ifdef USE_WEBP
+#include <webp/decode.h>
+#endif
+
 #include "wraster.h"
 #include "imgformat.h"
 
@@ -92,6 +97,9 @@ char **RSupportedFileFormats(void)
 #ifdef USE_GIF
        tmp[i++] = "GIF";
 #endif
+#ifdef USE_WEBP
+       tmp[i++] = "WEBP";
+#endif
        tmp[i] = NULL;
 
        return tmp;
@@ -190,6 +198,12 @@ RImage *RLoadImage(RContext * context, const char *file, 
int index)
                break;
 #endif                         /* USE_GIF */
 
+#ifdef USE_WEBP
+       case IM_WEBP:
+               image = RLoadWEBP(file, index);
+               break;
+#endif                         /* USE_WEBP */
+
        case IM_PPM:
                image = RLoadPPM(file);
                break;
@@ -264,6 +278,11 @@ char *RGetImageFileFormat(const char *file)
                return "GIF";
 #endif                         /* USE_GIF */
 
+#ifdef USE_WEBP
+       case IM_WEBP:
+               return "WEBP";
+#endif                         /* USE_WEBP */
+
        case IM_PPM:
                return "PPM";
 
@@ -275,7 +294,7 @@ char *RGetImageFileFormat(const char *file)
 static WRImgFormat identFile(const char *path)
 {
        FILE *file;
-       unsigned char buffer[7];
+       unsigned char buffer[17];
        size_t nread;
 
        assert(path != NULL);
@@ -319,5 +338,28 @@ static WRImgFormat identFile(const char *path)
        if (buffer[0] == 'G' && buffer[1] == 'I' && buffer[2] == 'F' && 
buffer[3] == '8')
                return IM_GIF;
 
+#ifdef USE_WEBP
+       /* check for WEBP */
+       if (buffer[ 0] == 'R' &&
+                     buffer[ 1] == 'I' &&
+                     buffer[ 2] == 'F' &&
+                     buffer[ 3] == 'F' &&
+                     buffer[ 8] == 'W' &&
+                    buffer[ 9] == 'E' &&
+                     buffer[10] == 'B' &&
+                     buffer[11] == 'P' &&
+                     buffer[12] == 'V' &&
+                     buffer[13] == 'P' &&
+                     buffer[14] == '8' &&
+#if WEBP_DECODER_ABI_VERSION < 0x0003 /* old versions don't support WEBPVP8X 
and WEBPVP8L */
+                       buffer[15] == ' ')
+#else
+                       (buffer[15] == ' ' || buffer[15] == 'X' || buffer[15] 
== 'L'))
+#endif
+#endif
+
+       return IM_WEBP;
+
+
        return IM_UNKNOWN;
 }
diff --git a/wrlib/load_webp.c b/wrlib/load_webp.c
new file mode 100644
index 00000000..d69a107f
--- /dev/null
+++ b/wrlib/load_webp.c
@@ -0,0 +1,137 @@
+/* load_webp.c - load WEBP image from file
+ *
+ * Raster graphics library
+ *
+ * Copyright (c) 2014 Window Maker Team
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *  MA 02110-1301, USA.
+ */
+
+#include <config.h>
+
+#include <X11/Xlib.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <webp/decode.h>
+
+#include "wraster.h"
+#include "imgformat.h"
+
+RImage *
+RLoadWEBP(const char *file_name)
+{
+       FILE *file;
+       RImage *image = NULL;
+       char buffer[20];
+       int raw_data_size;
+       int start;
+       int r;
+       uint8_t *raw_data;
+       WebPBitstreamFeatures features;
+       uint8_t *ret = NULL;
+
+       file = fopen(file_name, "rb");
+       if (!file) {
+               RErrorCode = RERR_OPEN;
+               return NULL;
+       }
+       start = ftell(file);
+
+       if (!fread(buffer, sizeof(buffer), 1, file)) {
+               RErrorCode = RERR_BADIMAGEFILE;
+               fclose(file);
+               return NULL;
+       }
+
+
+       if (!(buffer[0] == 'R' &&
+             buffer[1] == 'I' &&
+             buffer[2] == 'F' &&
+             buffer[3] == 'F' &&
+             buffer[8] == 'W' &&
+             buffer[9] == 'E' &&
+             buffer[10] == 'B' &&
+             buffer[11] == 'P' &&
+             buffer[12] == 'V' && buffer[13] == 'P' && buffer[14] == '8' &&
+#if WEBP_DECODER_ABI_VERSION < 0x0003  /* old versions don't support WEBPVP8X 
and WEBPVP8L */
+             buffer[15] == ' ')) {
+#else
+             (buffer[15] == ' ' || buffer[15] == 'X' || buffer[15] == 'L'))) {
+#endif
+               RErrorCode = RERR_BADFORMAT;
+               fclose(file);
+               return NULL;
+       }
+
+
+       fseek(file, 0, SEEK_END);
+       raw_data_size = ftell(file);
+
+       if (raw_data_size <= 0) {
+               fprintf(stderr, "Failed to find the WEBP image sizen");
+               return NULL;
+       }
+
+       fseek(file, start, SEEK_SET);
+
+       raw_data = (uint8_t *) malloc(raw_data_size);
+
+       if (!raw_data) {
+               fprintf(stderr, "Failed to allocate enought buffer for WEBPn");
+               return NULL;
+       }
+
+       r = fread(raw_data, 1, raw_data_size, file);
+
+       if (r != raw_data_size) {
+               fprintf(stderr, "Failed to read WEBPn");
+               return NULL;
+       }
+
+       if (WebPGetFeatures(raw_data, raw_data_size, &features) !=
+           VP8_STATUS_OK) {
+               fprintf(stderr, "WebPGetFeatures has failedn");
+               return NULL;
+       }
+
+       if (features.has_alpha) {
+               image = RCreateImage(features.width, features.height, True);
+               if (!image)
+                       return NULL;
+               ret =
+                   WebPDecodeRGBAInto(raw_data, raw_data_size, image->data,
+                                      features.width * features.height * 4,
+                                      features.width * 4);
+       } else {
+               image = RCreateImage(features.width, features.height, False);
+               if (!image)
+                       return NULL;
+               ret =
+                   WebPDecodeRGBInto(raw_data, raw_data_size, image->data,
+                                     features.width * features.height * 3,
+                                     features.width * 3);
+       }
+
+       if (!ret) {
+               fprintf(stderr, "Failed to decode WEBPn");
+               return NULL;
+       }
+
+       fclose(file);
+       return image;
+}

-----------------------------------------------------------------------

Summary of changes:
 wrlib/imgformat.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to