f.change_backdrop with pixmap 0 makes dtwm load the picture itself (XmGetPixmap: JPEG and PNG through Motif), and the request is parsed from its end, so a path may hold blanks. f.mcde_slideshow INTERVAL RANDOM STYLE FOLDER, and the resource Dtwm*mcdeSlideshow at the start, change the backdrop of every workspace every INTERVAL minutes, in order or at random; the folder is read anew each time. Fit and Fill scale with Xrender's bilinear filter instead of the nearest pixel. Measured on Xvfb (build/mcde-shots/slide-*.png): c-red.jpg from "My Pictures" filled the screen; the slideshow showed a-blue.jpg at once, fitted, and the next picture after one minute; dtwm kept running. Found: Motif 2.3.8 draws an RGB PNG without alpha as its blue channel only (lib/Xm/Png.c shifts right where it must shift left); docs/reference/motif-png.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
753 B
C
25 lines
753 B
C
/*
|
|
* WmSlideshow.h -- MCDE: backdrops from files and the slideshow
|
|
* (WmSlideshow.c)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*/
|
|
|
|
#ifndef _WmSlideshow_h
|
|
#define _WmSlideshow_h
|
|
|
|
#include "WmGlobal.h"
|
|
|
|
/* the request of a slideshow (WmEvent.c, HandleDtWmRequest) */
|
|
#define MCDE_REQ_SLIDESHOW "f.mcde_slideshow"
|
|
|
|
/* the picture at PATH as the backdrop of PWS, in the style IMAGETYPE */
|
|
extern void McdeBackdropFromFile(WmWorkspaceData *pWS, const char *path,
|
|
int imageType);
|
|
/* "INTERVAL RANDOM STYLE FOLDER"; INTERVAL 0 or NULL: no slideshow */
|
|
extern void McdeSlideshowSet(const char *spec);
|
|
/* at the start: the resource Dtwm*mcdeSlideshow */
|
|
extern void McdeSlideshowInit(void);
|
|
|
|
#endif /* _WmSlideshow_h */
|