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  0d031dfa4e8df084dc17822508ee897df52f6d45 (commit)
  discards  ae407c81ae8d8e40b504041455cf4ada0a35e1a8 (commit)
  discards  836a5643d7e9f2cf387d9a2528979aa071fd4dd8 (commit)
  discards  b3a6cc8de7aca95a252f7c2e88cb3079b6b8bd9a (commit)
       via  cd1dd471a9dac8959e38ef0036636c471bf82e74 (commit)
       via  3c2b3792a6b6a7c970fd9d12ba7efbe0a00a87b5 (commit)
       via  215a57077c9989a47679e556ce33016ebab9de37 (commit)
       via  fd07e032df0a9b16f3c1cfbf5cc2a48ead22cd02 (commit)
       via  918d0b5af187ee76467e70226ce72d4507640083 (commit)
       via  3ed409cbd09193d4fa5609fccccfd5c7ddf5d534 (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 (0d031dfa4e8df084dc17822508ee897df52f6d45)
                         N -- N -- N (cd1dd471a9dac8959e38ef0036636c471bf82e74)

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/cd1dd471a9dac8959e38ef0036636c471bf82e74

commit cd1dd471a9dac8959e38ef0036636c471bf82e74
Author: Carlos R. Mafra <[email protected]>
Date:   Tue Jan 17 15:34:15 2012 +0000

    Get rid of buggy cropline(), use wtrimspace() instead
    
    In commit 9911ecd985 ("make wtrimspace() use internal api") Tamas TEVESZ
    pointed out that wtrimspace() used to segfault given null and fixed that.
    
    I didn't check, but if the string had trailing whitespace it would also
    segfault (and that was fixed in that commit too, although not explicitly
    pointed out).
    
    And currently there is a function cropline() -- duplicated in rootmenu.c
    and workspace.c -- which looks like wtrimspace() used to be before Tamas'
    fixes.
    
    It segfaults if the string has trailing whitespace, see test program below.
    
    So get rid of cropline() _twice_ and use WINGs wtrimspace() instead. The
    fact that it can segfault is an extra reason to eliminate it (the segfault
    is caused by the *end = 0; line). From a brief look at parseCascade() in
    rootmenu.c, it looks like a menufile with a line containing trailing
    whitespace could trigger a bug, but I haven't investigated it further.
    
    Test program:
    
     #include <stdint.h>
     #include <string.h>
     #include <stdlib.h>
     #include <stdio.h>
    
    static char *cropline(char *line)
    {
        char *end;
    
        if (strlen(line) == 0)
                return line;
    
        end = &(line[strlen(line)]) - 1;
        while (isspace(*line) && *line != 0)
                line++;
        while (end > line && isspace(*end)) {
                *end = 0;
                end--;
        }
        return line;
    }
    
    int main(void)
    {
        char *line = "  space before, space after  ";
        char *line_crop;
    
        printf("line_orig = %sn", line);
        line_crop = cropline(line);
        printf("line_crop = %sn", line_crop);
    
    }
    
    [mafra@Pilar:c]$ gcc -o cropline cropline.c
    [mafra@Pilar:c]$ ./cropline
    line_orig =   space before, space after
    Speicherzugriffsfehler
    [mafra@Pilar:c]$
    
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/src/rootmenu.c b/src/rootmenu.c
index 0ecd3b4..cccbab8 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -473,25 +473,6 @@ static Bool addShortcut(char *file, char 
*shortcutDefinition, WMenu * menu, WMen
        return True;
 }
 
-/*******************************/
-
-static char *cropline(char *line)
-{
-       char *end;
-
-       if (strlen(line) == 0)
-               return line;
-
-       end = &(line[strlen(line)]) - 1;
-       while (isspace(*line) && *line != 0)
-               line++;
-       while (end > line && isspace(*end)) {
-               *end = 0;
-               end--;
-       }
-       return line;
-}
-
 static char *next_token(char *line, char **next)
 {
        char *tmp, c;
@@ -1020,14 +1001,14 @@ static WMenu *parseCascade(WScreen * scr, WMenu * menu, 
FILE * file, char *file_
 
                ok = 0;
                fgets(linebuf, MAXLINE, file);
-               line = cropline(linebuf);
+               line = wtrimspace(linebuf);
                lsize = strlen(line);
                do {
                        if (line[lsize - 1] == '\') {
                                char *line2;
                                int lsize2;
                                fgets(elinebuf, MAXLINE, file);
-                               line2 = cropline(elinebuf);
+                               line2 = wtrimspace(elinebuf);
                                lsize2 = strlen(line2);
                                if (lsize2 + lsize > MAXLINE) {
                                        wwarning(_("%s:maximal line size 
exceeded in menu config: %s"),
@@ -1129,7 +1110,7 @@ static WMenu *readMenuFile(WScreen * scr, char *file_name)
        while (!feof(file)) {
                if (!fgets(linebuf, MAXLINE, file))
                        break;
-               line = cropline(linebuf);
+               line = wtrimspace(linebuf);
                if (line[0] == 0 || line[0] == '#' || (line[0] == '/' && 
line[1] == '/'))
                        continue;
 
@@ -1223,7 +1204,7 @@ static WMenu *readMenuPipe(WScreen * scr, char 
**file_name)
        while (!feof(file)) {
                if (!fgets(linebuf, MAXLINE, file))
                        break;
-               line = cropline(linebuf);
+               line = wtrimspace(linebuf);
                if (line[0] == 0 || line[0] == '#' || (line[0] == '/' && 
line[1] == '/'))
                        continue;
 
diff --git a/src/workspace.c b/src/workspace.c
index c0493f3..dc53d03 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -645,23 +645,6 @@ static void newWSCommand(WMenu * menu, WMenuEntry * foo)
           } */
 }
 
-static char *cropline(char *line)
-{
-       char *end;
-
-       if (strlen(line) == 0)
-               return line;
-
-       end = &(line[strlen(line)]) - 1;
-       while (isspace(*line) && *line != 0)
-               line++;
-       while (isspace(*end) && end != line) {
-               *end = 0;
-               end--;
-       }
-       return line;
-}
-
 void wWorkspaceRename(WScreen * scr, int workspace, char *name)
 {
        char buf[MAX_WORKSPACENAME_WIDTH + 1];
@@ -671,7 +654,7 @@ void wWorkspaceRename(WScreen * scr, int workspace, char 
*name)
                return;
 
        /* trim white spaces */
-       tmp = cropline(name);
+       tmp = wtrimspace(name);
 
        if (strlen(tmp) == 0) {
                snprintf(buf, sizeof(buf), _("Workspace %i"), workspace + 1);

http://repo.or.cz/w/wmaker-crm.git/commit/3c2b3792a6b6a7c970fd9d12ba7efbe0a00a87b5

commit 3c2b3792a6b6a7c970fd9d12ba7efbe0a00a87b5
Author: GhostlyDeath <[email protected]>
Date:   Mon Jan 16 19:00:16 2012 -0500

    Remove endian swap for icon image data.
    
    On my PowerPC Debian Squeeze System, the icons are colored
    incorrectly. This patch removes the swapping of the data on Big Endian
    systems, thus causing the icons to be colored correctly.
    
    The data appears to already be in the native endian format.

diff --git a/src/wmspec.c b/src/wmspec.c
index 95985db..1b4cf03 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -404,7 +404,7 @@ static RImage *makeRImageFromARGBData(unsigned long *data)
 
        for (imgdata = image->data, i = 2; i < size + 2; i++, imgdata += 4) {
                pixel = data[i];
-#if BYTE_ORDER == BIG_ENDIAN
+#if 0//BYTE_ORDER == BIG_ENDIAN
                imgdata[2] = (pixel >> 24) & 0xff;      /* A */
                imgdata[1] = (pixel >> 16) & 0xff;      /* R */
                imgdata[0] = (pixel >> 8) & 0xff;       /* G */

http://repo.or.cz/w/wmaker-crm.git/commit/215a57077c9989a47679e556ce33016ebab9de37

commit 215a57077c9989a47679e556ce33016ebab9de37
Author: Carlos R. Mafra <[email protected]>
Date:   Mon Jan 16 16:09:21 2012 +0000

    wtext killing spree
    
    After using WINGs wInputDialog() to handle renaming the workspace
    upon Ctrl+left click on the workspace menu, all functions in src/text.c
    become unused.

diff --git a/src/Makefile.am b/src/Makefile.am
index eb025e9..0521d11 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -97,9 +97,7 @@ wmaker_SOURCES =              wmspec.h        wmspec.c        
workspace.c -   workspace.h -   text.c -        text.h
+       workspace.h
 
 EXTRA_wmaker_SOURCES = osdep_bsd.c osdep_darwin.c osdep_linux.c osdep_stub.c
 
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ccb207b..9e2c5f4 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -79,11 +79,7 @@ typedef struct WObjDescriptor {
     void *self;                               /* the object that will be 
called */
     /* event handlers */
     void (*handle_expose)(struct WObjDescriptor *sender, XEvent *event);
-
     void (*handle_mousedown)(struct WObjDescriptor *sender, XEvent *event);
-
-    void (*handle_anything)(struct WObjDescriptor *sender, XEvent *event);
-
     void (*handle_enternotify)(struct WObjDescriptor *sender, XEvent *event);
     void (*handle_leavenotify)(struct WObjDescriptor *sender, XEvent *event);
 
diff --git a/src/text.c b/src/text.c
deleted file mode 100644
index 3fc10e9..0000000
--- a/src/text.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/********************************************************************
- * text.c -- a basic text field                                     *
- * Copyright (C) 1997 Robin D. Clark                                *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program 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 General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
- *                                                                  *
- *   Author: Rob Clark                                              *
- * Internet: [email protected]                                      *
- *  Address: 609 8th Street                                         *
- *           Huntington Beach, CA 92648-4632                        *
- ********************************************************************/
-
-#include "wconfig.h"
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "WindowMaker.h"
-#include "funcs.h"
-#include "text.h"
-#include "actions.h"
-
-/* X11R5 don't have this */
-#ifndef IsPrivateKeypadKey
-#define IsPrivateKeypadKey(keysym) -    (((KeySym)(keysym) >= 0x11000000) && 
((KeySym)(keysym) <= 0x1100FFFF))
-#endif
-
-extern Cursor wCursor[WCUR_LAST];
-
-/********************************************************************
- * The event handler for the text-field:                            *
- ********************************************************************/
-static void textEventHandler(WObjDescriptor * desc, XEvent * event);
-
-static void handleExpose(WObjDescriptor * desc, XEvent * event);
-
-static void textInsert(WTextInput * wtext, char *txt);
-
-/********************************************************************
- * handleKeyPress                                                   *
- *   handle cursor keys, regular keys, etc.  Inserts characters in  *
- *   text field, at cursor position, if it is a "Normal" key.  If   *
- *   ksym is the delete key, backspace key, etc., the appropriate   *
- *   action is performed on the text in the text field.  Does not   *
- *   refresh the text field                                         *
- *                                                                  *
- * Args:   wText - the text field                                   *
- *         ksym  - the key that was pressed                         *
- * Return: True, unless the ksym is ignored                         *
- * Global: modifier - the bitfield that keeps track of the modifier *
- *                    keys that are down                            *
- ********************************************************************/
-static int handleKeyPress(WTextInput * wtext, XKeyEvent * event)
-{
-       KeySym ksym;
-       char buffer[32];
-       int count;
-
-       count = XLookupString(event, buffer, 32, &ksym, NULL);
-
-       /* Ignore these keys: */
-       if (IsFunctionKey(ksym) || IsKeypadKey(ksym) ||
-           IsMiscFunctionKey(ksym) || IsPFKey(ksym) || 
IsPrivateKeypadKey(ksym))
-               /* If we don't handle it, make sure it isn't a key that
-                * the window manager needs to see */
-               return False;
-
-       /* Take care of the cursor keys.. ignore up and down
-        * cursor keys */
-       else if (IsCursorKey(ksym)) {
-               int length = wtext->text.length;
-               switch (ksym) {
-               case XK_Home:
-               case XK_Begin:
-                       wtext->text.endPos = 0;
-                       break;
-               case XK_Left:
-                       wtext->text.endPos--;
-                       break;
-               case XK_Right:
-                       wtext->text.endPos++;
-                       break;
-               case XK_End:
-                       wtext->text.endPos = length;
-                       break;
-               default:
-                       return False;
-               }
-               /* make sure that the startPos and endPos have values
-                * that make sense  (ie the are in [0..length] ) */
-               if (wtext->text.endPos < 0)
-                       wtext->text.endPos = 0;
-               if (wtext->text.endPos > length)
-                       wtext->text.endPos = length;
-               wtext->text.startPos = wtext->text.endPos;
-       } else {
-               switch (ksym) {
-                       /* Ignore these keys: */
-               case XK_Escape:
-                       wtext->canceled = True;
-               case XK_Return:
-                       wtext->done = True;
-                       break;
-               case XK_Tab:
-               case XK_Num_Lock:
-                       break;
-
-               case XK_Delete:
-                       /* delete after cursor */
-                       if ((wtext->text.endPos == wtext->text.startPos) &&
-                           (wtext->text.endPos < wtext->text.length))
-                               wtext->text.endPos++;
-                       textInsert(wtext, "");
-                       break;
-               case XK_BackSpace:
-                       /* delete before cursor */
-                       if ((wtext->text.endPos == wtext->text.startPos) && 
(wtext->text.startPos > 0))
-                               wtext->text.startPos--;
-                       textInsert(wtext, "");
-                       break;
-               default:
-                       if (count == 1 && !iscntrl(buffer[0])) {
-                               buffer[count] = 0;
-                               textInsert(wtext, buffer);
-                       }
-               }
-       }
-       return True;
-}
-
-/********************************************************************
- * textXYtoPos                                                      *
- *   given X coord, return position in array                        *
- ********************************************************************/
-static int textXtoPos(WTextInput * wtext, int x)
-{
-       int pos;
-       x -= wtext->xOffset;
-
-       for (pos = 0; wtext->text.txt[pos] != '0'; pos++) {
-               if (x < 0)
-                       break;
-               else
-                       x -= WMWidthOfString(wtext->font, 
&(wtext->text.txt[pos]), 1);
-       }
-
-       return pos;
-}
-
-/********************************************************************
- * wTextCreate                                                      *
- *   create an instance of a text class                             *
- *                                                                  *
- * Args:                                                            *
- * Return:                                                          *
- * Global: dpy - the display                                        *
- ********************************************************************/
-WTextInput *wTextCreate(WCoreWindow * core, int x, int y, int width, int 
height)
-{
-       WTextInput *wtext;
-
-       wtext = wmalloc(sizeof(WTextInput));
-       wtext->core = wCoreCreate(core, x, y, width, height);
-       wtext->core->descriptor.handle_anything = &textEventHandler;
-       wtext->core->descriptor.handle_expose = &handleExpose;
-       wtext->core->descriptor.parent_type = WCLASS_TEXT_INPUT;
-       wtext->core->descriptor.parent = wtext;
-
-       wtext->font = core->screen_ptr->menu_entry_font;
-
-       XDefineCursor(dpy, wtext->core->window, wCursor[WCUR_TEXT]);
-
-       /* setup the text: */
-       wtext->text.txt = (char *)wmalloc(sizeof(char));
-       wtext->text.txt[0] = '0';
-       wtext->text.length = 0;
-       wtext->text.startPos = 0;
-       wtext->text.endPos = 0;
-
-       {
-               XGCValues gcv;
-
-               gcv.foreground = core->screen_ptr->black_pixel;
-               gcv.background = core->screen_ptr->white_pixel;
-               gcv.line_width = 1;
-               gcv.function = GXcopy;
-
-               wtext->gc = XCreateGC(dpy, wtext->core->window,
-                                     (GCForeground | GCBackground | GCFunction 
| GCLineWidth), &gcv);
-
-               /* set up the regular context */
-               gcv.foreground = core->screen_ptr->black_pixel;
-               gcv.background = core->screen_ptr->white_pixel;
-               gcv.line_width = 1;
-               gcv.function = GXcopy;
-
-               wtext->regGC = XCreateGC(dpy, wtext->core->window,
-                                        (GCForeground | GCBackground | 
GCFunction | GCLineWidth), &gcv);
-
-               /* set up the inverted context */
-               gcv.function = GXcopyInverted;
-
-               wtext->invGC = XCreateGC(dpy, wtext->core->window,
-                                        (GCForeground | GCBackground | 
GCFunction | GCLineWidth), &gcv);
-
-               /* and set the background! */
-               XSetWindowBackground(dpy, wtext->core->window, gcv.background);
-       }
-
-       /* Figure out the y-offset... */
-       wtext->yOffset = (height - WMFontHeight(wtext->font)) / 2;
-       wtext->xOffset = wtext->yOffset;
-
-       wtext->canceled = False;
-       wtext->done = False;    /* becomes True when the user    *
-                                * hits "Return" key             */
-
-       XMapRaised(dpy, wtext->core->window);
-       return wtext;
-}
-
-/********************************************************************
- * wTextDestroy                                                     *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return:                                                          *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-void wTextDestroy(WTextInput * wtext)
-{
-       XFreeGC(dpy, wtext->gc);
-       XFreeGC(dpy, wtext->regGC);
-       XFreeGC(dpy, wtext->invGC);
-       wfree(wtext->text.txt);
-       wCoreDestroy(wtext->core);
-       wfree(wtext);
-}
-
-/* The text-field consists of a frame drawn around the outside,
- * and a textbox inside.  The space between the frame and the
- * text-box is the xOffset,yOffset.  When the text needs refreshing,
- * we only have to redraw the part inside the text-box, and we can
- * leave the frame.  If we get an expose event, or for some reason
- * need to redraw the frame, wTextPaint will redraw the frame, and
- * then call wTextRefresh to redraw the text-box */
-
-/********************************************************************
- * textRefresh                                                     *
- *   Redraw the text field.  Call this after messing with the text  *
- *   field.  wTextRefresh re-draws the inside of the text field. If *
- *   the frame-area of the text-field needs redrawing, call         *
- *   wTextPaint()                                                   *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return: none                                                     *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-static void textRefresh(WTextInput * wtext)
-{
-       WScreen *scr = wtext->core->screen_ptr;
-       char *ptr = wtext->text.txt;
-       int x1, x2, y1, y2;
-
-       /* x1,y1 is the upper left corner of the text box */
-       x1 = wtext->xOffset;
-       y1 = wtext->yOffset;
-       /* x2,y2 is the lower right corner of the text box */
-       x2 = wtext->core->width - wtext->xOffset;
-       y2 = wtext->core->height - wtext->yOffset;
-
-       /* Fill in the text field.  Use the invGC to draw the rectangle,
-        * becuase then it will be the background color */
-       XFillRectangle(dpy, wtext->core->window, wtext->invGC, x1, y1, x2 - x1, 
y2 - y1);
-
-       /* Draw the text normally */
-       WMDrawImageString(scr->wmscreen, wtext->core->window,
-                         scr->black, scr->white, wtext->font, x1, y1, ptr, 
wtext->text.length);
-
-       /* Draw the selected text */
-       if (wtext->text.startPos != wtext->text.endPos) {
-               int sp, ep;
-               /* we need sp < ep */
-               if (wtext->text.startPos > wtext->text.endPos) {
-                       sp = wtext->text.endPos;
-                       ep = wtext->text.startPos;
-               } else {
-                       sp = wtext->text.startPos;
-                       ep = wtext->text.endPos;
-               }
-
-               /* x1,y1 is now the upper-left of the selected area */
-               x1 += WMWidthOfString(wtext->font, ptr, sp);
-               /* and x2,y2 is the lower-right of the selected area */
-               ptr += sp * sizeof(char);
-               x2 = x1 + WMWidthOfString(wtext->font, ptr, (ep - sp));
-               /* Fill in the area  where the selected text will go:     *
-                * use the regGC to draw the rectangle, becuase then it   *
-                * will be the color of the non-selected text             */
-               XFillRectangle(dpy, wtext->core->window, wtext->regGC, x1, y1, 
x2 - x1, y2 - y1);
-
-               /* Draw the selected text. Inverse bg and fg colors for 
selection */
-               WMDrawImageString(scr->wmscreen, wtext->core->window,
-                                 scr->white, scr->black, wtext->font, x1, y1, 
ptr, (ep - sp));
-       }
-
-       /* And draw a quick little line for the cursor position */
-       x1 = WMWidthOfString(wtext->font, wtext->text.txt, wtext->text.endPos)
-           + wtext->xOffset;
-       XDrawLine(dpy, wtext->core->window, wtext->regGC, x1, 2, x1, 
wtext->core->height - 3);
-}
-
-/********************************************************************
- * wTextPaint                                                       *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return:                                                          *
- * Global: dpy    - the display                                     *
- ********************************************************************/
-void wTextPaint(WTextInput * wtext)
-{
-       /* refresh */
-       textRefresh(wtext);
-
-       /* Draw box */
-       XDrawRectangle(dpy, wtext->core->window, wtext->gc, 0, 0,
-                      wtext->core->width - 1, wtext->core->height - 1);
-}
-
-/********************************************************************
- * wTextGetText                                                     *
- *   return the string in the text field wText.  DO NOT FREE THE    *
- *   RETURNED STRING!                                               *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- * Return: the text in the text field (NULL terminated)             *
- * Global:                                                          *
- ********************************************************************/
-char *wTextGetText(WTextInput * wtext)
-{
-       if (!wtext->canceled)
-               return wtext->text.txt;
-       else
-               return NULL;
-}
-
-/********************************************************************
- * wTextPutText                                                     *
- *   Put the string txt in the text field wText.  The text field    *
- *   needs to be explicitly refreshed after wTextPutText by calling *
- *   wTextRefresh().                                                *
- *   The string txt is copied                                       *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- *         txt    - the new text string... freed by the text field! *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-void wTextPutText(WTextInput * wtext, char *txt)
-{
-       int length = strlen(txt);
-
-       /* no memory leaks!  free the old txt */
-       if (wtext->text.txt != NULL)
-               wfree(wtext->text.txt);
-
-       wtext->text.txt = (char *)wmalloc((length + 1) * sizeof(char));
-       strcpy(wtext->text.txt, txt);
-       wtext->text.length = length;
-       /* By default No text is selected, and the cursor is at the end */
-       wtext->text.startPos = length;
-       wtext->text.endPos = length;
-}
-
-/********************************************************************
- * textInsert                                                      *
- *   Insert some text at the cursor.  (if startPos != endPos,       *
- *   replace the selected text, otherwise insert)                   *
- *   The string txt is copied.                                      *
- *                                                                  *
- * Args:   wText  - the text field                                  *
- *         txt    - the new text string... freed by the text field! *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-static void textInsert(WTextInput * wtext, char *txt)
-{
-       char *newTxt;
-       int newLen, txtLen, i, j;
-       int sp, ep;
-
-       /* we need sp < ep */
-       if (wtext->text.startPos > wtext->text.endPos) {
-               sp = wtext->text.endPos;
-               ep = wtext->text.startPos;
-       } else {
-               sp = wtext->text.startPos;
-               ep = wtext->text.endPos;
-       }
-
-       txtLen = strlen(txt);
-       newLen = wtext->text.length + txtLen - (ep - sp) + 1;
-
-       newTxt = (char *)malloc(newLen * sizeof(char));
-
-       /* copy the old text up to sp */
-       for (i = 0; i < sp; i++)
-               newTxt[i] = wtext->text.txt[i];
-
-       /* insert new text */
-       for (j = 0; j < txtLen; j++, i++)
-               newTxt[i] = txt[j];
-
-       /* copy old text after ep */
-       for (j = ep; j < wtext->text.length; j++, i++)
-               newTxt[i] = wtext->text.txt[j];
-
-       newTxt[i] = '0';
-
-       /* By default No text is selected, and the cursor is at the end
-        * of inserted text */
-       wtext->text.startPos = sp + txtLen;
-       wtext->text.endPos = sp + txtLen;
-
-       wfree(wtext->text.txt);
-       wtext->text.txt = newTxt;
-       wtext->text.length = newLen - 1;
-}
-
-/********************************************************************
- * wTextSelect                                                      *
- *   Select some text.  If start == end, then the cursor is moved   *
- *   to that position.  If end == -1, then the text from start to   *
- *   the end of the text entered in the text field is selected.     *
- *   The text field is not automatically re-drawn!  You must call   *
- *   wTextRefresh to re-draw the text field.                        *
- *                                                                  *
- * Args:   wtext  - the text field                                  *
- *         start  - the beginning of the selected text              *
- *         end    - the end of the selected text                    *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-void wTextSelect(WTextInput * wtext, int start, int end)
-{
-       if (end == -1)
-               wtext->text.endPos = wtext->text.length;
-       else
-               wtext->text.endPos = end;
-       wtext->text.startPos = start;
-}
-
-/********************************************************************
- * textEventHandler -- handles and dispatches all the events that   *
- *   the text field class supports                                  *
- *                                                                  *
- * Args:   desc - all we need to know about this object             *
- * Return: none                                                     *
- * Global:                                                          *
- ********************************************************************/
-static void textEventHandler(WObjDescriptor * desc, XEvent * event)
-{
-       WTextInput *wtext = desc->parent;
-       int handled = False;    /* has the event been handled */
-
-       switch (event->type) {
-       case MotionNotify:
-               /* If the button isn't down, we don't care about the
-                * event, but otherwise we want to adjust the selected
-                * text so we can wTextRefresh() */
-               if (event->xmotion.state & (Button1Mask | Button3Mask | 
Button2Mask)) {
-                       handled = True;
-                       wtext->text.endPos = textXtoPos(wtext, 
event->xmotion.x);
-               }
-               break;
-
-       case ButtonPress:
-               handled = True;
-               wtext->text.startPos = textXtoPos(wtext, event->xbutton.x);
-               wtext->text.endPos = wtext->text.startPos;
-               break;
-
-       case ButtonRelease:
-               handled = True;
-               wtext->text.endPos = textXtoPos(wtext, event->xbutton.x);
-               break;
-
-       case KeyPress:
-               handled = handleKeyPress(wtext, &event->xkey);
-               break;
-
-       case EnterNotify:
-               handled = True;
-               break;
-
-       case LeaveNotify:
-               handled = True;
-               break;
-
-       default:
-               break;
-       }
-
-       if (handled)
-               textRefresh(wtext);
-       else
-               WMHandleEvent(event);
-
-       return;
-}
-
-static void handleExpose(WObjDescriptor * desc, XEvent * event)
-{
-       wTextPaint(desc->parent);
-}

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

commit fd07e032df0a9b16f3c1cfbf5cc2a48ead22cd02
Author: Carlos R. Mafra <[email protected]>
Date:   Mon Jan 16 05:31:06 2012 +0000

    Fix non-ascii workspace rename via menu
    
    As pointed out in the comments in
    
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=304480
    
    it's not possible to rename workspaces with non-ascii characters -- more
    precisely characters which require deadkeys with your particular keyboard.
    
    According to the investigation made by Rodolfo Peñas:
    
    http://lists.windowmaker.org/dev/msg02529.html
    
    the fundamental issue behind this bug is the fact that XLookupString can't
    handle deadkeys.
    
    So either we do something radical or live with the bug.
    
    However -- as Rodolfo also pointed out -- renaming the workspaces via the
    Clip works with non-ascii chars. The reason is that the Clip uses a input 
dialog
    function from WINGs to handle the renaming.
    
    So instead of doing the low-level handling of text inside the menu in order
    to rename workspaces, just fire up the same WINGs input dialog to handle it.
    It works and the old function editEntry() can be removed.
    
    Furthermore, it makes the whole set of functions in src/wtext.c useless, and
    they are removed in the next patch.
    
    Overall, 600 lines of code are gone now.
    
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/src/menu.c b/src/menu.c
index 11e6a7f..d9caa15 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -42,6 +42,7 @@
 #include "text.h"
 #include "xinerama.h"
 #include "workspace.h"
+#include "dialog.h"
 
 /****** Global Variables ******/
 
@@ -1146,86 +1147,6 @@ void wMenuSetEnabled(WMenu * menu, int index, int enable)
        paintEntry(menu->brother, index, index == menu->selected_entry);
 }
 
-/* ====================================================================== */
-
-static void editEntry(WMenu * menu, WMenuEntry * entry)
-{
-       WTextInput *text;
-       XEvent event;
-       WObjDescriptor *desc;
-       char *t;
-       int done = 0;
-       Window old_focus;
-       int old_revert;
-
-       menu->flags.editing = 1;
-
-       text = wTextCreate(menu->menu, 1, menu->entry_height * entry->order,
-                          menu->menu->width - 2, menu->entry_height - 1);
-
-       wTextPutText(text, entry->text);
-       XGetInputFocus(dpy, &old_focus, &old_revert);
-       XSetInputFocus(dpy, text->core->window, RevertToNone, CurrentTime);
-
-       if (XGrabKeyboard(dpy, text->core->window, True, GrabModeAsync, 
GrabModeAsync, CurrentTime) != GrabSuccess) {
-               wwarning(_("could not grab keyboard"));
-               wTextDestroy(text);
-
-               wSetFocusTo(menu->frame->screen_ptr, 
menu->frame->screen_ptr->focused_window);
-               return;
-       }
-
-       while (!done && !text->done) {
-               XSync(dpy, 0);
-               XAllowEvents(dpy, AsyncKeyboard | AsyncPointer, CurrentTime);
-               XSync(dpy, 0);
-               WMNextEvent(dpy, &event);
-
-               if (XFindContext(dpy, event.xany.window, wWinContext, (XPointer 
*) & desc) == XCNOENT)
-                       desc = NULL;
-
-               if ((desc != NULL) && (desc->handle_anything != NULL)) {
-
-                       (*desc->handle_anything) (desc, &event);
-
-               } else {
-                       switch (event.type) {
-                       case ButtonPress:
-                               XAllowEvents(dpy, ReplayPointer, CurrentTime);
-                               done = 1;
-
-                       default:
-                               WMHandleEvent(&event);
-                               break;
-                       }
-               }
-       }
-
-       XSetInputFocus(dpy, old_focus, old_revert, CurrentTime);
-
-       wSetFocusTo(menu->frame->screen_ptr, 
menu->frame->screen_ptr->focused_window);
-
-       t = wTextGetText(text);
-       /* if !t, the user has canceled editing */
-       if (t) {
-               if (entry->text)
-                       wfree(entry->text);
-               entry->text = wstrdup(t);
-
-               menu->flags.realized = 0;
-       }
-       wTextDestroy(text);
-
-       XUngrabKeyboard(dpy, CurrentTime);
-
-       if (t && menu->on_edit)
-               (*menu->on_edit) (menu, entry);
-
-       menu->flags.editing = 0;
-
-       if (!menu->flags.realized)
-               wMenuRealize(menu);
-}
 
 static void selectEntry(WMenu * menu, int entry_no)
 {
@@ -1832,7 +1753,21 @@ static void menuMouseDown(WObjDescriptor * desc, XEvent 
* event)
                entry = menu->entries[entry_no];
 
                if (!close_on_exit && (bev->state & ControlMask) && smenu && 
entry->flags.editable) {
-                       editEntry(smenu, entry);
+                       char buffer[128];
+                       char *name;
+                       int number = entry_no - 2; /* Entries "New" and 
"Destroy Last" appear before workspaces */
+
+                       name = wstrdup(scr->workspaces[number]->name);
+                       snprintf(buffer, sizeof(buffer), _("Type the name for 
workspace %i:"), number + 1);
+
+                       wMenuUnmap(scr->root_menu);
+
+                       if (wInputDialog(scr, _("Rename Workspace"), buffer, 
&name))
+                               wWorkspaceRename(scr, number, name);
+
+                       if (name)
+                               wfree(name);
+
                        goto byebye;
                } else if (bev->state & ControlMask) {
                        goto byebye;

http://repo.or.cz/w/wmaker-crm.git/commit/918d0b5af187ee76467e70226ce72d4507640083

commit 918d0b5af187ee76467e70226ce72d4507640083
Author: Carlos R. Mafra <[email protected]>
Date:   Sun Jan 15 23:27:15 2012 +0000

    configure: Also display the library dir in the summary
    
    The summary now looks like:
    
    Window Maker was configured as follows:
    
    Installation path prefix            : /usr/local
    Installation path for binaries      : /usr/local/bin
    Installation path for libraries     : /usr/lib64
    Installation path for WPrefs.app    : /usr/local
    Supported graphic format libraries  : XPM PNG JPEG TIFF builtin-PPM
    Antialiased text support in WINGs   : yes
    Xinerama extension support          : yes
    XRandR extension support            : yes
    Translated message files to install : None
    
    I want to see the library line in order to avoid forgetting that
    I should put them in /usr/lib64 (and not in the defaul /usr/local/lib)

diff --git a/configure.ac b/configure.ac
index e358d95..15e6043 100644
--- a/configure.ac
+++ b/configure.ac
@@ -914,6 +914,7 @@ echo "Window Maker was configured as follows:"
 echo
 echo "Installation path prefix            : $prefix"
 echo "Installation path for binaries      : $_bindir"
+echo "Installation path for libraries     : $libdir"
 echo "Installation path for WPrefs.app    : $wprefs_base_dir" | sed -e 
's|${prefix}|'"$prefix|"
 echo "Supported graphic format libraries  : $supported_gfx"
 echo "Antialiased text support in WINGs   : $xft"

http://repo.or.cz/w/wmaker-crm.git/commit/3ed409cbd09193d4fa5609fccccfd5c7ddf5d534

commit 3ed409cbd09193d4fa5609fccccfd5c7ddf5d534
Author: Christophe CURIS <[email protected]>
Date:   Sun Jan 15 20:45:54 2012 +0100

    wrlib: Improvement in the alpha channel support.
    
    There are some problems in the alpha channel support, as is
    reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=72917
    
    This patch add a new RCombineAlpha function, based on Gimp. This
    function is called when needed in the raster.c functions.
    
    This patch is based on the Brad Jorsch <[email protected]>
    patch for the 0.62.1-0.1 version.
    
    [crmafra: v1 was sent by Rodolfo kix Garcia <[email protected]>]

diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index 6c6de3d..8dec1f6 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -20,6 +20,7 @@ include_HEADERS = wraster.h
 
 libwraster_la_SOURCES =                raster.c        +       alpha_combine.c 
        draw.c                  color.c                 load.c          diff 
--git a/wrlib/alpha_combine.c b/wrlib/alpha_combine.c
new file mode 100644
index 0000000..e670d62
--- /dev/null
+++ b/wrlib/alpha_combine.c
@@ -0,0 +1,66 @@
+/* alpha_combine.c - Alpha channel combination, based on Gimp 1.1.24
+ * The GIMP -- an image manipulation program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "wraster.h"
+
+void RCombineAlpha(unsigned char *d, unsigned char *s, int s_has_alpha,
+                  int width, int height, int dwi, int swi, int opacity) {
+       int x, y;
+       int t, sa;
+       int alpha;
+       float ratio, cratio;
+
+       for (y=0; y<height; y++) {
+               for (x=0; x<width; x++) {
+                       sa=s_has_alpha?*(s+3):255;
+
+                       if (opacity!=255) {
+                               t = sa * opacity + 0x80;
+                               sa = ((t>>8)+t)>>8;
+                       }
+
+                       t = *(d+3) * (255-sa) + 0x80;
+                       alpha = sa + (((t>>8)+t)>>8);
+
+                       if (sa==0 || alpha==0) {
+                               ratio = 0;
+                               cratio = 1.0;
+                       } else if(sa == alpha) {
+                               ratio = 1.0;
+                               cratio = 0;
+                       } else {
+                               ratio = (float)sa / alpha;
+                               cratio = 1.0 - ratio;
+                       }
+
+                       *d = (int)*d * cratio + (int)*s * ratio;
+                       s++; d++;
+                       *d = (int)*d * cratio + (int)*s * ratio;
+                       s++; d++;
+                       *d = (int)*d * cratio + (int)*s * ratio;
+                       s++; d++;
+                       *d = alpha;
+                       d++;
+
+                       if (s_has_alpha) s++;
+               }
+               d+=dwi;
+               s+=swi;
+       }
+}
diff --git a/wrlib/draw.c b/wrlib/draw.c
index 87f2cad..071f016 100644
--- a/wrlib/draw.c
+++ b/wrlib/draw.c
@@ -143,6 +143,7 @@ static void operatePixel(RImage * image, int ofs, int 
operation, RColor * color)
                        *sr = (((int)*sr * nalpha) + ((int)color->red * alpha)) 
/ 256;
                        *sg = (((int)*sg * nalpha) + ((int)color->green * 
alpha)) / 256;
                        *sb = (((int)*sb * nalpha) + ((int)color->blue * 
alpha)) / 256;
+                       *sa = alpha + ((int)*sa * nalpha) / 256;
                }
                break;
        case RAddOperation:
diff --git a/wrlib/raster.c b/wrlib/raster.c
index 188dd51..f01db84 100644
--- a/wrlib/raster.c
+++ b/wrlib/raster.c
@@ -171,7 +171,7 @@ void RCombineImages(RImage * image, RImage * src)
                                        *d++ = *s++;
                                        *d++ = *s++;
                                        *d++ = *s++;
-                                       d++;
+                                       *d++ = 255;
                                }
                        }
                }
@@ -200,20 +200,7 @@ void RCombineImages(RImage * image, RImage * src)
                                s++;
                        }
                } else {
-                       for (i = 0; i < image->height * image->width; i++) {
-                               alpha = *(s + 3);
-                               calpha = 255 - alpha;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               d++;
-                               s++;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               d++;
-                               s++;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               d++;
-                               s++;
-                               *d++ |= *s++;
-                       }
+                       RCombineAlpha(d, s, 1, image->width, image->height, 0, 
0, 255);
                }
        }
 }
@@ -237,39 +224,25 @@ void RCombineImagesWithOpaqueness(RImage * image, RImage 
* src, int opaqueness)
 #define COP c_opaqueness
 
        if (!HAS_ALPHA(src)) {
-               int dalpha = HAS_ALPHA(image);
-               for (i = 0; i < image->width * image->height; i++) {
-                       *d = (((int)*d * (int)COP) + ((int)*s * (int)OP)) / 256;
-                       d++;
-                       s++;
-                       *d = (((int)*d * (int)COP) + ((int)*s * (int)OP)) / 256;
-                       d++;
-                       s++;
-                       *d = (((int)*d * (int)COP) + ((int)*s * (int)OP)) / 256;
-                       d++;
-                       s++;
-                       if (dalpha) {
-                               d++;
-                       }
-               }
-       } else {
-               int tmp;
-
                if (!HAS_ALPHA(image)) {
                        for (i = 0; i < image->width * image->height; i++) {
-                               tmp = (*(s + 3) * opaqueness) / 256;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
+                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
                                d++;
                                s++;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
+                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
                                d++;
                                s++;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
+                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
                                d++;
                                s++;
-                               s++;
                        }
                } else {
+                       RCombineAlpha(d, s, 0, image->width, image->height, 0, 
0, OP);
+               }
+       } else {
+               int tmp;
+
+               if (!HAS_ALPHA(image)) {
                        for (i = 0; i < image->width * image->height; i++) {
                                tmp = (*(s + 3) * opaqueness) / 256;
                                *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
@@ -281,10 +254,10 @@ void RCombineImagesWithOpaqueness(RImage * image, RImage 
* src, int opaqueness)
                                *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
                                d++;
                                s++;
-                               *d |= tmp;
-                               d++;
                                s++;
                        }
+               } else {
+                       RCombineAlpha(d, s, 1, image->width, image->height, 0, 
0, opaqueness);
                }
        }
 #undef OP
@@ -360,7 +333,7 @@ void RCombineArea(RImage * image, RImage * src, int sx, int 
sy, unsigned width,
                                        *d++ = *s++;
                                        *d++ = *s++;
                                        *d++ = *s++;
-                                       d++;
+                                       *d++ = 255;
                                }
                                d += dwi;
                                s += swi;
@@ -379,25 +352,27 @@ void RCombineArea(RImage * image, RImage * src, int sx, 
int sy, unsigned width,
                        d = image->data + (dy * (int)image->width + dx) * 3;
                }
 
-               for (y = 0; y < height; y++) {
-                       for (x = 0; x < width; x++) {
-                               alpha = *(s + 3);
-                               calpha = 255 - alpha;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               s++;
-                               d++;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               s++;
-                               d++;
-                               *d = (((int)*d * calpha) + ((int)*s * alpha)) / 
256;
-                               s++;
-                               d++;
-                               s++;
-                               if (dalpha)
+               if (!dalpha) {
+                       for (y = 0; y < height; y++) {
+                               for (x = 0; x < width; x++) {
+                                       alpha = *(s + 3);
+                                       calpha = 255 - alpha;
+                                       *d = (((int)*d * calpha) + ((int)*s * 
alpha)) / 256;
+                                       s++;
                                        d++;
+                                       *d = (((int)*d * calpha) + ((int)*s * 
alpha)) / 256;
+                                       s++;
+                                       d++;
+                                       *d = (((int)*d * calpha) + ((int)*s * 
alpha)) / 256;
+                                       s++;
+                                       d++;
+                                       s++;
+                               }
+                               d += dwi;
+                               s += swi;
                        }
-                       d += dwi;
-                       s += swi;
+               } else {
+                       RCombineAlpha(d, s, 1, width, height, dwi, swi, 255);
                }
        }
 }
@@ -502,22 +477,24 @@ RCombineAreaWithOpaqueness(RImage * image, RImage * src, 
int sx, int sy,
                s = src->data + (sy * src->width + sx) * 3;
                swi = (src->width - width) * 3;
 
-               for (y = 0; y < height; y++) {
-                       for (x = 0; x < width; x++) {
-                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
-                               s++;
-                               d++;
-                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
-                               s++;
-                               d++;
-                               *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
-                               s++;
-                               d++;
-                               if (dalpha)
+               if (!dalpha) {
+                       for (y = 0; y < height; y++) {
+                               for (x = 0; x < width; x++) {
+                                       *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
+                                       s++;
                                        d++;
+                                       *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
+                                       s++;
+                                       d++;
+                                       *d = (((int)*d * (int)COP) + ((int)*s * 
(int)OP)) / 256;
+                                       s++;
+                                       d++;
+                               }
+                               d += dwi;
+                               s += swi;
                        }
-                       d += dwi;
-                       s += swi;
+               } else {
+                       RCombineAlpha(d, s, 0, width, height, dwi, swi, OP);
                }
        } else {
                int tmp;
@@ -525,24 +502,26 @@ RCombineAreaWithOpaqueness(RImage * image, RImage * src, 
int sx, int sy,
                s = src->data + (sy * src->width + sx) * 4;
                swi = (src->width - width) * 4;
 
-               for (y = 0; y < height; y++) {
-                       for (x = 0; x < width; x++) {
-                               tmp = (*(s + 3) * opaqueness) / 256;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
-                               d++;
-                               s++;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
-                               d++;
-                               s++;
-                               *d = (((int)*d * (255 - tmp)) + ((int)*s * 
tmp)) / 256;
-                               d++;
-                               s++;
-                               s++;
-                               if (dalpha)
+               if (!dalpha) {
+                       for (y = 0; y < height; y++) {
+                               for (x = 0; x < width; x++) {
+                                       tmp = (*(s + 3) * opaqueness) / 256;
+                                       *d = (((int)*d * (255 - tmp)) + 
((int)*s * tmp)) / 256;
+                                       d++;
+                                       s++;
+                                       *d = (((int)*d * (255 - tmp)) + 
((int)*s * tmp)) / 256;
+                                       d++;
+                                       s++;
+                                       *d = (((int)*d * (255 - tmp)) + 
((int)*s * tmp)) / 256;
                                        d++;
+                                       s++;
+                                       s++;
+                               }
+                               d += dwi;
+                               s += swi;
                        }
-                       d += dwi;
-                       s += swi;
+               } else {
+                       RCombineAlpha(d, s, 1, width, height, dwi, swi, OP);
                }
        }
 #undef OP
@@ -627,12 +606,12 @@ RImage *RMakeCenteredImage(RImage * image, unsigned 
width, unsigned height, RCol
        int x, y, w, h, sx, sy;
        RImage *tmp;
 
-       tmp = RCreateImage(width, height, False);
+       tmp = RCreateImage(width, height, HAS_ALPHA(image));
        if (!tmp) {
                return NULL;
        }
 
-       RClearImage(tmp, color);
+       RFillImage(tmp, color);
 
        if (image->height < height) {
                h = image->height;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index 78bfc16..b55af32 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -356,6 +356,9 @@ void RCombineAreaWithOpaqueness(RImage *image, RImage *src, 
int sx, int sy,
                                 unsigned width, unsigned height, int dx, int 
dy,
                                 int opaqueness);
 
+void RCombineAlpha(unsigned char *d, unsigned char *s, int s_has_alpha,
+                  int width, int height, int dwi, int swi, int opacity);
+
 RImage *RScaleImage(RImage *image, unsigned new_width, unsigned new_height);
 
 RImage *RSmoothScaleImage(RImage *src, unsigned new_width,

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

Summary of changes:
 src/menu.c            |    2 ++
 src/rootmenu.c        |   27 ++++-----------------------
 src/wmspec.c          |    2 +-
 src/workspace.c       |   19 +------------------
 wrlib/alpha_combine.c |    6 ++----
 5 files changed, 10 insertions(+), 46 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 ("Fork from the last available CVS version of Window Maker")


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

Reply via email to