mirror of
https://github.com/gryf/wmaker.git
synced 2026-11-30 11:41:58 +01:00
Compare commits
5
Commits
535288cec5
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
558e67f303 | ||
|
|
9c2b6865be | ||
|
|
0dd8b6a099 | ||
|
|
c0104d56bf | ||
|
|
56ec56136f |
No files matched your search
+2
-1
@@ -71,7 +71,8 @@ WMData *WMCreateDataWithBytes(const void *bytes, unsigned length)
|
||||
|
||||
aData = WMCreateDataWithCapacity(length);
|
||||
aData->length = length;
|
||||
memcpy(aData->bytes, bytes, length);
|
||||
if (length > 0)
|
||||
memcpy(aData->bytes, bytes, length);
|
||||
|
||||
return aData;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1931,7 +1931,7 @@ static void dispatchWKBDCommand(int command, WScreen *scr, WWindow *wwin, XEvent
|
||||
|
||||
} else if (scr->selected_windows && WMGetArrayItemCount(scr->selected_windows)) {
|
||||
|
||||
if (wwin->flags.selected && scr->selected_windows) {
|
||||
if (wwin && wwin->flags.selected && scr->selected_windows) {
|
||||
if (scr->shortcutWindows[widx]) {
|
||||
WMFreeArray(scr->shortcutWindows[widx]);
|
||||
}
|
||||
|
||||
+5
-4
@@ -567,7 +567,7 @@ RContext *RCreateContext(Display * dpy, int screen_number, const RContextAttribu
|
||||
templ.visualid = context->attribs->visualid;
|
||||
vinfo = XGetVisualInfo(context->dpy, VisualIDMask | VisualScreenMask, &templ, &nret);
|
||||
if (!vinfo || nret == 0) {
|
||||
free(context);
|
||||
RDestroyContext(context);
|
||||
RErrorCode = RERR_BADVISUALID;
|
||||
return NULL;
|
||||
}
|
||||
@@ -614,13 +614,13 @@ RContext *RCreateContext(Display * dpy, int screen_number, const RContextAttribu
|
||||
|
||||
if (context->vclass == PseudoColor || context->vclass == StaticColor) {
|
||||
if (!setupPseudoColorColormap(context)) {
|
||||
free(context);
|
||||
RDestroyContext(context);
|
||||
return NULL;
|
||||
}
|
||||
} else if (context->vclass == GrayScale || context->vclass == StaticGray) {
|
||||
context->colors = allocateGrayScale(context);
|
||||
if (!context->colors) {
|
||||
free(context);
|
||||
RDestroyContext(context);
|
||||
return NULL;
|
||||
}
|
||||
} else if (context->vclass == TrueColor) {
|
||||
@@ -665,7 +665,8 @@ void RDestroyContext(RContext *context)
|
||||
XFreeGC(context->dpy, context->copy_gc);
|
||||
if (context->attribs) {
|
||||
if ((context->attribs->flags & RC_VisualID) &&
|
||||
!(context->attribs->flags & RC_DefaultVisual))
|
||||
!(context->attribs->flags & RC_DefaultVisual) &&
|
||||
context->drawable != None)
|
||||
XDestroyWindow(context->dpy, context->drawable);
|
||||
free(context->attribs);
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ static void init_cache(void)
|
||||
RImageCache = malloc(sizeof(RCachedImage) * RImageCacheSize);
|
||||
if (RImageCache == NULL) {
|
||||
fprintf(stderr, _("wrlib: out of memory for image cache\n"));
|
||||
RImageCacheSize = 0;
|
||||
return;
|
||||
}
|
||||
memset(RImageCache, 0, sizeof(RCachedImage) * RImageCacheSize);
|
||||
|
||||
@@ -578,6 +578,8 @@ RImage *RMakeTiledImage(RImage * tile, unsigned width, unsigned height)
|
||||
int has_alpha = HAS_ALPHA(tile);
|
||||
|
||||
image = RCreateImage(width, height, has_alpha);
|
||||
if (!image)
|
||||
return NULL;
|
||||
|
||||
d = image->data;
|
||||
s = tile->data;
|
||||
|
||||
Reference in new issue
Block a user