diff --git a/ChangeLog b/ChangeLog index a3837098..af620bea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ - removed FocusFollowMouse from wmaker and WPrefs - fixed problem with alpha images showing a blue tint on big endian machines +- fixed problem with WINGs based apps exiting with a "X_RotateProperties" + related error when text was selected in a textfiled (including WPrefs.app + and Window Maker itself). + Changes since version 0.64.0: ............................. diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 1a9793d2..fc81e94a 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -1,3 +1,7 @@ +- fixed problem with WINGs based apps exiting with a "X_RotateProperties" + related error when text was selected in a textfiled. + + Changes since wmaker 0.64.0: ............................ diff --git a/WINGs/widgets.c b/WINGs/widgets.c index 8828d1ab..0d828188 100644 --- a/WINGs/widgets.c +++ b/WINGs/widgets.c @@ -3,6 +3,7 @@ #include "WINGsP.h" #include +#include #include #include @@ -583,7 +584,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) "WM_STATE" }; Atom atoms[sizeof(atomNames)/sizeof(char*)]; - int i = 0; + int i; if (!initialized) { @@ -616,6 +617,45 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks); + /* Create missing CUT_BUFFERs */ + { + Atom *rootWinProps; + int exists[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + int count; + + rootWinProps = XListProperties(display, scrPtr->rootWin, &count); + for (i=0; iignoredModifierMask = 0; { int i; @@ -816,11 +856,8 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) XInternAtoms(display, atomNames, sizeof(atomNames)/sizeof(char*), False, atoms); #else - { - int i; - for (i = 0; i < sizeof(atomNames)/sizeof(char*); i++) { - atoms[i] = XInternAtom(display, atomNames[i], False); - } + for (i = 0; i < sizeof(atomNames)/sizeof(char*); i++) { + atoms[i] = XInternAtom(display, atomNames[i], False); } #endif @@ -852,15 +889,14 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) scrPtr->wmIconDragOffsetAtom = atoms[i++]; scrPtr->wmStateAtom = atoms[i++]; - - scrPtr->rootView = W_CreateRootView(scrPtr); + scrPtr->rootView = W_CreateRootView(scrPtr); scrPtr->balloon = W_CreateBalloon(scrPtr); W_InitApplication(scrPtr); - + return scrPtr; } diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c index 97f6c5ae..55fba043 100644 --- a/WINGs/wtextfield.c +++ b/WINGs/wtextfield.c @@ -674,7 +674,7 @@ didResizeTextField(W_ViewDelegate *self, WMView *view) tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font))/2, 1); - tPtr->usableWidth = tPtr->view->size.width - 2*tPtr->offsetWidth + 2; + tPtr->usableWidth = tPtr->view->size.width - 2*tPtr->offsetWidth /*+ 2*/; } diff --git a/src/appicon.c b/src/appicon.c index d55b9528..a9c00aab 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -319,7 +319,7 @@ updateDockNumbers(WScreen *scr) numbers_gc = XCreateGC(dpy, dicon->icon->core->window, my_v_mask, &my_gc_values); - ws_numbers = malloc(20); + ws_numbers = wmalloc(20); sprintf(ws_numbers, "%i [ %i ]", scr->current_workspace+1, ((scr->current_workspace/10)+1)); length = strlen(ws_numbers); diff --git a/src/dock.c b/src/dock.c index 37fdb650..cf128dc5 100644 --- a/src/dock.c +++ b/src/dock.c @@ -1249,7 +1249,7 @@ wClipIconPaint(WAppIcon *aicon) wIconPaint(aicon->icon); length = strlen(workspace->name); - ws_name = malloc(length + 1); + ws_name = wmalloc(length + 1); sprintf(ws_name, "%s", workspace->name); sprintf(ws_number, "%i", scr->current_workspace + 1); nlength = strlen(ws_number); diff --git a/util/geticonset.c b/util/geticonset.c index 11cb1cb2..6e750200 100644 --- a/util/geticonset.c +++ b/util/geticonset.c @@ -38,8 +38,8 @@ char *ProgName; char* defaultsPathForDomain(char *domain) { - char path[1024]; - char *gspath, *tmp; + static char path[1024]; + char *gspath; gspath = getenv("GNUSTEP_USER_ROOT"); if (gspath) { @@ -60,10 +60,7 @@ defaultsPathForDomain(char *domain) strcat(path, "/"); strcat(path, domain); - tmp = malloc(strlen(path)+2); - strcpy(tmp, path); - - return tmp; + return path; } void diff --git a/util/getstyle.c b/util/getstyle.c index 0348cfb5..4e779ea4 100644 --- a/util/getstyle.c +++ b/util/getstyle.c @@ -114,24 +114,19 @@ print_help() char* globalDefaultsPathForDomain(char *domain) { - char path[1024]; - char *tmp; + static char path[1024]; sprintf(path, "%s/WindowMaker/%s", SYSCONFDIR, domain); - tmp = malloc(strlen(path)+2); - assert(tmp!=NULL); - strcpy(tmp, path); - - return tmp; + return path; } char* defaultsPathForDomain(char *domain) { - char path[1024]; - char *gspath, *tmp; + static char path[1024]; + char *gspath; gspath = getenv("GNUSTEP_USER_ROOT"); if (gspath) { @@ -152,10 +147,7 @@ defaultsPathForDomain(char *domain) strcat(path, "/"); strcat(path, domain); - tmp = malloc(strlen(path)+2); - strcpy(tmp, path); - - return tmp; + return path; } @@ -602,7 +594,6 @@ main(int argc, char **argv) ProgName, path); exit(1); } - free(path); /* get global value */ path = globalDefaultsPathForDomain("WindowMaker"); diff --git a/util/seticons.c b/util/seticons.c index ebe41dff..fd5a171f 100644 --- a/util/seticons.c +++ b/util/seticons.c @@ -36,8 +36,8 @@ char *ProgName; char* defaultsPathForDomain(char *domain) { - char path[1024]; - char *gspath, *tmp; + static char path[1024]; + char *gspath; gspath = getenv("GNUSTEP_USER_ROOT"); if (gspath) { @@ -59,10 +59,7 @@ defaultsPathForDomain(char *domain) strcat(path, "/"); strcat(path, domain); - tmp = malloc(strlen(path)+2); - strcpy(tmp, path); - - return tmp; + return path; } diff --git a/util/setstyle.c b/util/setstyle.c index 6246d657..4b98d831 100644 --- a/util/setstyle.c +++ b/util/setstyle.c @@ -64,8 +64,8 @@ proplist_t readBlackBoxStyle(char *path); char* defaultsPathForDomain(char *domain) { - char path[1024]; - char *gspath, *tmp; + static char path[1024]; + char *gspath; gspath = getenv("GNUSTEP_USER_ROOT"); if (gspath) { @@ -87,10 +87,7 @@ defaultsPathForDomain(char *domain) strcat(path, "/"); strcat(path, domain); - tmp = malloc(strlen(path)+2); - strcpy(tmp, path); - - return tmp; + return path; } diff --git a/util/wmsetbg.c b/util/wmsetbg.c index a42458e8..9a24399c 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -1156,9 +1156,8 @@ getFullPixmapPath(char *file) char *path = wmalloc(bsize); while (!getcwd(path, bsize)) { - wfree(path); bsize += bsize/2; - path = malloc(bsize); + path = wrealloc(path, bsize); } tmp = wstrconcat(path, "/"); diff --git a/util/wxcopy.c b/util/wxcopy.c index 003a0a55..264ba219 100644 --- a/util/wxcopy.c +++ b/util/wxcopy.c @@ -1,7 +1,7 @@ /* wxcopy.c- copy stdin or file into cutbuffer - * + * * Copyright (c) 1997-1999 Alfredo K. Kojima - * + * * 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 @@ -82,7 +82,7 @@ main(int argc, char **argv) if (i