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